diff options
author | Loren Shih <seraph@lindenlab.com> | 2010-04-13 16:39:12 -0400 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2010-04-13 16:39:12 -0400 |
commit | 85f54aca0f9c93b60e89e79b70bdb1d88b3bc5d6 (patch) | |
tree | e605c21a938a5ba794df6e43607de8c4a0d81008 /indra/newview/llinventoryobserver.h | |
parent | 88782e75462ac3a959a59be97ff50b5fc34aabb9 (diff) | |
parent | d05353fc3997f29bcf55a2fa49936e690b0725de (diff) |
automated merge
Diffstat (limited to 'indra/newview/llinventoryobserver.h')
-rw-r--r-- | indra/newview/llinventoryobserver.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/indra/newview/llinventoryobserver.h b/indra/newview/llinventoryobserver.h index ac2eca3477..c48ffaa55d 100644 --- a/indra/newview/llinventoryobserver.h +++ b/indra/newview/llinventoryobserver.h @@ -173,6 +173,36 @@ protected: }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Class LLInventoryMovedObserver +// +// This class is used as a base class for doing something when all the +// item for observed asset ids were added into the inventory. +// Derive a class from this class and implement the done() method to do +// something useful. +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +class LLInventoryMoveFromWorldObserver : public LLInventoryObserver +{ +public: + LLInventoryMoveFromWorldObserver() : mIsDirty(false) {} + virtual void changed(U32 mask); + + void watchAsset(const LLUUID& asset_id); + bool isAssetWatched(const LLUUID& asset_id); + +protected: + virtual void onAssetAdded(const LLUUID& asset_id) {} + virtual void done() = 0; + + typedef std::vector<LLUUID> item_ref_t; + item_ref_t mAddedItems; + item_ref_t mWatchedAssets; + +private: + bool mIsDirty; +}; + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Class LLInventoryAddedObserver // // Base class for doing something when a new item arrives in inventory. |