diff options
Diffstat (limited to 'Swiften/MUC/MUCBookmarkManager.h')
-rw-r--r-- | Swiften/MUC/MUCBookmarkManager.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Swiften/MUC/MUCBookmarkManager.h b/Swiften/MUC/MUCBookmarkManager.h new file mode 100644 index 0000000..ade2e3e --- /dev/null +++ b/Swiften/MUC/MUCBookmarkManager.h @@ -0,0 +1,28 @@ +#pragma once + +#include <vector> + +#include <boost/shared_ptr.hpp> +#include <boost/signals.hpp> + +#include "Swiften/MUC/MUCBookmark.h" + +namespace Swift { + class IQRouter; + class MUCBookmarkManager { + public: + MUCBookmarkManager(IQRouter* iqRouter); + void addBookmark(boost::shared_ptr<MUCBookmark> bookmark); + void removeBookmark(boost::shared_ptr<MUCBookmark> bookmark); + /** Call flush after editing an existing bookmark. */ + void flush(); + /** Returns pointers to the bookmarks. These can be edited, and then flush()ed.*/ + const std::vector<boost::shared_ptr<MUCBookmark> >& getBookmarks(); + boost::signal<void (boost::shared_ptr<MUCBookmark>)> onBookmarkAdded; + boost::signal<void (boost::shared_ptr<MUCBookmark>)> onBookmarkRemoved; + private: + + std::vector<boost::shared_ptr<MUCBookmark> > bookmarks_; + IQRouter* iqRouter_; + }; +} |