diff options
author | Loren Shih <seraph@lindenlab.com> | 2010-04-28 13:37:21 -0400 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2010-04-28 13:37:21 -0400 |
commit | 29e1804139691229a887144b612f147e1c9dcffb (patch) | |
tree | ef7b33360da228b7f2e078dbea5af763c1548230 /indra/newview/llinventoryobserver.h | |
parent | 26d324a2dd06ebde896f7856622a55414eb75d77 (diff) | |
parent | 96df3f3eb1351973d140ba73b507de44b1052c89 (diff) |
automated merge
Diffstat (limited to 'indra/newview/llinventoryobserver.h')
-rw-r--r-- | indra/newview/llinventoryobserver.h | 38 |
1 files changed, 36 insertions, 2 deletions
diff --git a/indra/newview/llinventoryobserver.h b/indra/newview/llinventoryobserver.h index c48ffaa55d..e63b67d2ad 100644 --- a/indra/newview/llinventoryobserver.h +++ b/indra/newview/llinventoryobserver.h @@ -148,7 +148,6 @@ public: virtual void done() = 0; protected: - BOOL mDone; LLInventoryFetchItemsObserver *mFetchItems; LLInventoryFetchDescendentsObserver *mFetchDescendents; }; @@ -262,5 +261,40 @@ protected: uuid_vec_t mIncomplete; }; -#endif // LL_LLINVENTORYOBSERVERS_H +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Class LLInventoryCategoriesObserver +// +// This class is used for monitoring a list of inventory categories +// and firing a callback when there are changes in any of them. +// Categories are identified by their UUIDs. +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +class LLInventoryCategoriesObserver : public LLInventoryObserver +{ +public: + typedef boost::function<void()> callback_t; + + LLInventoryCategoriesObserver() {}; + virtual void changed(U32 mask); + + void addCategory(const LLUUID& cat_id, callback_t cb); + void removeCategory(const LLUUID& cat_id); +protected: + struct LLCategoryData + { + LLCategoryData(callback_t cb, S32 version) + : mCallback(cb) + , mVersion(version) + {} + + callback_t mCallback; + S32 mVersion; + }; + + typedef std::map<LLUUID, LLCategoryData> category_map_t; + typedef category_map_t::value_type category_map_value_t; + + category_map_t mCategoryMap; +}; + +#endif // LL_LLINVENTORYOBSERVERS_H |