diff options
author | Kevin Smith <git@kismith.co.uk> | 2010-09-12 20:36:48 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2010-09-12 20:36:48 (GMT) |
commit | 0da93507bea788cf6bd8f327478caddf3ea679e5 (patch) | |
tree | 1e0e0609eea3a594b78fdad401282354db640fa6 /Swiften/MUC/MUCBookmarkManager.h | |
parent | 536df08ad0646a95ab1352fb9e2b49b00aaaaf2b (diff) | |
download | swift-contrib-0da93507bea788cf6bd8f327478caddf3ea679e5.zip swift-contrib-0da93507bea788cf6bd8f327478caddf3ea679e5.tar.bz2 |
Block MUC bookmarks until the server has responded.
Else there could be bookmarks overwritten in an infeasibly unlikely race condition.
Resolves: #340
Diffstat (limited to 'Swiften/MUC/MUCBookmarkManager.h')
-rw-r--r-- | Swiften/MUC/MUCBookmarkManager.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Swiften/MUC/MUCBookmarkManager.h b/Swiften/MUC/MUCBookmarkManager.h index a942595..8067b4b 100644 --- a/Swiften/MUC/MUCBookmarkManager.h +++ b/Swiften/MUC/MUCBookmarkManager.h @@ -32,6 +32,10 @@ namespace Swift { public: boost::signal<void (const MUCBookmark&)> onBookmarkAdded; boost::signal<void (const MUCBookmark&)> onBookmarkRemoved; + /** + * When server bookmarks are ready to be used (request response has been received). + */ + boost::signal<void ()> onBookmarksReady; private: bool containsEquivalent(const std::vector<MUCBookmark>& list, const MUCBookmark& bookmark); @@ -39,6 +43,7 @@ namespace Swift { void flush(); private: + bool ready_; std::vector<MUCBookmark> bookmarks_; IQRouter* iqRouter_; boost::shared_ptr<Storage> storage; |