From 85824ebc0931d4ac89e375b35dbccd1295746e31 Mon Sep 17 00:00:00 2001 From: Cho Date: Thu, 4 Jul 2013 02:13:47 +0100 Subject: Removed share callbacks from LLFacebookConnect --- indra/newview/llfacebookconnect.cpp | 19 +++---------------- indra/newview/llfacebookconnect.h | 7 ------- 2 files changed, 3 insertions(+), 23 deletions(-) diff --git a/indra/newview/llfacebookconnect.cpp b/indra/newview/llfacebookconnect.cpp index 07204531de..816947827c 100644 --- a/indra/newview/llfacebookconnect.cpp +++ b/indra/newview/llfacebookconnect.cpp @@ -133,11 +133,6 @@ public: LLFacebookConnect::instance().setConnectionState(LLFacebookConnect::FB_POSTING); } - LLFacebookShareResponder(LLFacebookConnect::share_callback_t cb) : mShareCallback(cb) - { - LLFacebookConnect::instance().setConnectionState(LLFacebookConnect::FB_POSTING); - } - virtual void completed(U32 status, const std::string& reason, const LLSD& content) { if (isGoodStatus(status)) @@ -156,11 +151,6 @@ public: LLFacebookConnect::instance().setConnectionState(LLFacebookConnect::FB_POST_FAILED); log_facebook_connect_error("Share", status, reason, content.get("error_code"), content.get("error_description")); } - - if (mShareCallback) - { - mShareCallback(isGoodStatus(status)); - } } void completedHeader(U32 status, const std::string& reason, const LLSD& content) @@ -170,9 +160,6 @@ public: LLFacebookConnect::instance().openFacebookWeb(content["location"]); } } - -private: - LLFacebookConnect::share_callback_t mShareCallback; }; /////////////////////////////////////////////////////////////////////////////// @@ -346,7 +333,7 @@ void LLFacebookConnect::postCheckin(const std::string& location, const std::stri body["message"] = message; // Note: we can use that route for different publish action. We should be able to use the same responder. - LLHTTPClient::post(getFacebookConnectURL("/share/checkin"), body, new LLFacebookShareResponder(mPostCheckinCallback)); + LLHTTPClient::post(getFacebookConnectURL("/share/checkin"), body, new LLFacebookShareResponder()); } void LLFacebookConnect::sharePhoto(const std::string& image_url, const std::string& caption) @@ -409,7 +396,7 @@ void LLFacebookConnect::sharePhoto(LLPointer image, const std: memcpy(data, body.str().data(), size); // Note: we can use that route for different publish action. We should be able to use the same responder. - LLHTTPClient::postRaw(getFacebookConnectURL("/share/photo"), data, size, new LLFacebookShareResponder(mSharePhotoCallback), headers); + LLHTTPClient::postRaw(getFacebookConnectURL("/share/photo"), data, size, new LLFacebookShareResponder(), headers); } void LLFacebookConnect::updateStatus(const std::string& message) @@ -418,7 +405,7 @@ void LLFacebookConnect::updateStatus(const std::string& message) body["message"] = message; // Note: we can use that route for different publish action. We should be able to use the same responder. - LLHTTPClient::post(getFacebookConnectURL("/share/wall"), body, new LLFacebookShareResponder(mUpdateStatusCallback)); + LLHTTPClient::post(getFacebookConnectURL("/share/wall"), body, new LLFacebookShareResponder()); } void LLFacebookConnect::storeContent(const LLSD& content) diff --git a/indra/newview/llfacebookconnect.h b/indra/newview/llfacebookconnect.h index b37c713ae5..a06e53b90e 100644 --- a/indra/newview/llfacebookconnect.h +++ b/indra/newview/llfacebookconnect.h @@ -54,7 +54,6 @@ public: FB_POST_FAILED = 6 }; - typedef boost::function share_callback_t; typedef boost::function content_updated_callback_t; void connectToFacebook(const std::string& auth_code = ""); // Initiate the complete FB connection. Please use checkConnectionToFacebook() in normal use. @@ -67,9 +66,6 @@ public: void sharePhoto(LLPointer image, const std::string& caption); void updateStatus(const std::string& message); - void setPostCheckinCallback(share_callback_t cb) { mPostCheckinCallback = cb; } - void setSharePhotoCallback(share_callback_t cb) { mSharePhotoCallback = cb; } - void setUpdateStatusCallback(share_callback_t cb) { mUpdateStatusCallback = cb; } void setContentUpdatedCallback(content_updated_callback_t cb) { mContentUpdatedCallback = cb;} void clearContent(); @@ -94,9 +90,6 @@ private: LLSD mContent; S32 mGeneration; - share_callback_t mPostCheckinCallback; - share_callback_t mSharePhotoCallback; - share_callback_t mUpdateStatusCallback; content_updated_callback_t mContentUpdatedCallback; static boost::scoped_ptr sStateWatcher; -- cgit v1.2.3