summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorCho <cho@lindenlab.com>2013-07-04 02:13:47 +0100
committerCho <cho@lindenlab.com>2013-07-04 02:13:47 +0100
commit85824ebc0931d4ac89e375b35dbccd1295746e31 (patch)
treee618f114437c48e393bce0a1aeb5902dc90bef83 /indra/newview
parentfd4262541946770515ce8a486dd3a69245365def (diff)
Removed share callbacks from LLFacebookConnect
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfacebookconnect.cpp19
-rw-r--r--indra/newview/llfacebookconnect.h7
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<LLImageFormatted> 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<void(bool ok)> share_callback_t;
typedef boost::function<void()> 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<LLImageFormatted> 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<LLEventPump> sStateWatcher;