diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2012-04-11 11:06:06 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2012-04-11 11:06:06 -0400 |
commit | 4743a2dac6af23a602c7ce8c5b5b0d351ae340e7 (patch) | |
tree | 8290203934beeb1ea5e37945a4749cf0e7eaca27 /indra/llinventory/lleconomy.h | |
parent | 4574a9a008690c64158abd6d792d6d485bf0e235 (diff) | |
parent | 46a7cdd2866c4219bb690974d9d6266e6994b431 (diff) |
Automated merge with file:///home/nat/linden/viewer-leap-temp
Diffstat (limited to 'indra/llinventory/lleconomy.h')
-rw-r--r-- | indra/llinventory/lleconomy.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/indra/llinventory/lleconomy.h b/indra/llinventory/lleconomy.h index cc6643f955..eb2ecf71ba 100644 --- a/indra/llinventory/lleconomy.h +++ b/indra/llinventory/lleconomy.h @@ -31,6 +31,16 @@ class LLMessageSystem; class LLVector3; +/** + * Register an observer to be notified of economy data updates coming from server. + */ +class LLEconomyObserver +{ +public: + virtual ~LLEconomyObserver() {} + virtual void onEconomyDataChange() = 0; +}; + class LLGlobalEconomy { public: @@ -46,6 +56,10 @@ public: virtual void print(); + void addObserver(LLEconomyObserver* observer); + void removeObserver(LLEconomyObserver* observer); + void notifyObservers(); + static void processEconomyData(LLMessageSystem *msg, LLGlobalEconomy* econ_data); S32 calculateTeleportCost(F32 distance) const; @@ -89,6 +103,8 @@ private: S32 mTeleportMinPrice; F32 mTeleportPriceExponent; S32 mPriceGroupCreate; + + std::list<LLEconomyObserver*> mObservers; }; |