summaryrefslogtreecommitdiff
path: root/indra/llinventory/lleconomy.h
diff options
context:
space:
mode:
authorDebi King (Dessie) <dessie@lindenlab.com>2011-11-29 17:18:40 -0500
committerDebi King (Dessie) <dessie@lindenlab.com>2011-11-29 17:18:40 -0500
commitae2a1ea9f10dc9bf3cc5ef59f1428ea1e5fa6495 (patch)
treef1b2c77031b49b5e78b9baca0440f85dd4bbcd09 /indra/llinventory/lleconomy.h
parentaaa085cebff88af48bbe4e8a9b41b3aeb60238c2 (diff)
parent0c36f481f13493801788ef233b96a2bfe5a44060 (diff)
merge
Diffstat (limited to 'indra/llinventory/lleconomy.h')
-rw-r--r--indra/llinventory/lleconomy.h16
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;
};