diff --git a/indra/newview/llgroupactions.h b/indra/newview/llgroupactions.h index bba06890e..b59fbbe40 100644 --- a/indra/newview/llgroupactions.h +++ b/indra/newview/llgroupactions.h @@ -28,7 +28,7 @@ #define LL_LLGROUPACTIONS_H class LLFloaterGroupInfo; -struct LLOfferInfo; +class LLOfferInfo; /** * Group-related actions (join, leave, new, delete, etc) diff --git a/indra/newview/llpanelgroup.h b/indra/newview/llpanelgroup.h index e652b96b6..cc063c8bb 100644 --- a/indra/newview/llpanelgroup.h +++ b/indra/newview/llpanelgroup.h @@ -36,7 +36,7 @@ #include "llpanel.h" #include "lltimer.h" -struct LLOfferInfo; +class LLOfferInfo; const F32 UPDATE_MEMBERS_SECONDS_PER_FRAME = 0.005; // 5ms diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index a39203a8f..69fa23b92 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -1320,6 +1320,15 @@ void inventory_offer_mute_callback(const LLUUID& blocked_id, gNotifyBoxView->purgeMessagesMatching(OfferMatcher(blocked_id)); } +LLOfferInfo::LLOfferInfo() + : LLNotificationResponderInterface() + , mFromGroup(FALSE) + , mFromObject(FALSE) + , mIM(IM_NOTHING_SPECIAL) + , mType(LLAssetType::AT_NONE) +{ +} + LLOfferInfo::LLOfferInfo(const LLSD& sd) { mIM = (EInstantMessage)sd["im_type"].asInteger(); @@ -1335,6 +1344,21 @@ LLOfferInfo::LLOfferInfo(const LLSD& sd) mHost = LLHost(sd["sender"].asString()); } +LLOfferInfo::LLOfferInfo(const LLOfferInfo& info) +{ + mIM = info.mIM; + mFromID = info.mFromID; + mFromGroup = info.mFromGroup; + mFromObject = info.mFromObject; + mTransactionID = info.mTransactionID; + mFolderID = info.mFolderID; + mObjectID = info.mObjectID; + mType = info.mType; + mFromName = info.mFromName; + mDesc = info.mDesc; + mHost = info.mHost; +} + LLSD LLOfferInfo::asLLSD() { LLSD sd; diff --git a/indra/newview/llviewermessage.h b/indra/newview/llviewermessage.h index fd9745d94..a31b7f486 100644 --- a/indra/newview/llviewermessage.h +++ b/indra/newview/llviewermessage.h @@ -216,11 +216,14 @@ bool highlight_offered_object(const LLUUID& obj_id); void set_dad_inventory_item(LLInventoryItem* inv_item, const LLUUID& into_folder_uuid); void set_dad_inbox_object(const LLUUID& object_id); -struct LLOfferInfo +class LLOfferInfo { - LLOfferInfo() {}; +public: + LLOfferInfo(); LLOfferInfo(const LLSD& sd); + LLOfferInfo(const LLOfferInfo& info); + void forceResponse(InventoryOfferResponse response); EInstantMessage mIM; @@ -243,5 +246,3 @@ struct LLOfferInfo void process_feature_disabled_message(LLMessageSystem* msg, void**); #endif - -