summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermessage.h
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2010-04-28 13:37:21 -0400
committerLoren Shih <seraph@lindenlab.com>2010-04-28 13:37:21 -0400
commit29e1804139691229a887144b612f147e1c9dcffb (patch)
treeef7b33360da228b7f2e078dbea5af763c1548230 /indra/newview/llviewermessage.h
parent26d324a2dd06ebde896f7856622a55414eb75d77 (diff)
parent96df3f3eb1351973d140ba73b507de44b1052c89 (diff)
automated merge
Diffstat (limited to 'indra/newview/llviewermessage.h')
-rw-r--r--indra/newview/llviewermessage.h25
1 files changed, 20 insertions, 5 deletions
diff --git a/indra/newview/llviewermessage.h b/indra/newview/llviewermessage.h
index 7c021dc05f..72ad3c8926 100644
--- a/indra/newview/llviewermessage.h
+++ b/indra/newview/llviewermessage.h
@@ -40,6 +40,7 @@
#include "lluuid.h"
#include "message.h"
#include "stdenums.h"
+#include "llnotifications.h"
//
// Forward declarations
@@ -210,11 +211,10 @@ bool highlight_offered_item(const LLUUID& item_id);
void set_dad_inventory_item(LLInventoryItem* inv_item, const LLUUID& into_folder_uuid);
-struct LLOfferInfo
+class LLOfferInfo : public LLNotificationResponderInterface
{
- LLOfferInfo()
- : mFromGroup(FALSE), mFromObject(FALSE),
- mIM(IM_NOTHING_SPECIAL), mType(LLAssetType::AT_NONE) {};
+public:
+ LLOfferInfo();
LLOfferInfo(const LLSD& sd);
LLOfferInfo(const LLOfferInfo& info);
@@ -232,12 +232,27 @@ struct LLOfferInfo
std::string mFromName;
std::string mDesc;
LLHost mHost;
+ bool mPersist;
+
+ // LLNotificationResponderInterface implementation
+ /*virtual*/ LLSD asLLSD();
+ /*virtual*/ void fromLLSD(const LLSD& params);
+ /*virtual*/ void handleRespond(const LLSD& notification, const LLSD& response);
- LLSD asLLSD();
void send_auto_receive_response(void);
+
+ // TODO - replace all references with handleRespond()
bool inventory_offer_callback(const LLSD& notification, const LLSD& response);
bool inventory_task_offer_callback(const LLSD& notification, const LLSD& response);
+private:
+
+ void initRespondFunctionMap();
+
+ typedef boost::function<bool (const LLSD&, const LLSD&)> respond_function_t;
+ typedef std::map<std::string, respond_function_t> respond_function_map_t;
+
+ respond_function_map_t mRespondFunctions;
};
void process_feature_disabled_message(LLMessageSystem* msg, void**);