diff options
Diffstat (limited to 'indra/newview/llfacebookconnect.h')
-rw-r--r-- | indra/newview/llfacebookconnect.h | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/indra/newview/llfacebookconnect.h b/indra/newview/llfacebookconnect.h index 1044c05e45..ddff87385e 100644 --- a/indra/newview/llfacebookconnect.h +++ b/indra/newview/llfacebookconnect.h @@ -31,6 +31,8 @@ #include "llsingleton.h" #include "llimage.h" +class LLEventPump; + /** * @class LLFacebookConnect * @@ -46,16 +48,17 @@ public: FB_NOT_CONNECTED = 0, FB_CONNECTION_IN_PROGRESS = 1, FB_CONNECTED = 2, - FB_CONNECTION_FAILED = 3 + FB_CONNECTION_FAILED = 3, + FB_POSTING = 4, + FB_POST_FAILED = 5 }; - typedef boost::function<void()> connect_callback_t; typedef boost::function<void(bool ok)> share_callback_t; typedef boost::function<void()> content_updated_callback_t; - void connectToFacebook(const std::string& auth_code = "", connect_callback_t cb = connect_callback_t()); // Initiate the complete FB connection. Please use getConnectionToFacebook() in normal use. - void disconnectFromFacebook(); // Disconnect from the FBC service. - void getConnectionToFacebook(bool auto_connect = false, connect_callback_t cb = connect_callback_t()); // Check if an access token is available on the FBC service. If not, call connectToFacebook(). + void connectToFacebook(const std::string& auth_code = ""); // Initiate the complete FB connection. Please use checkConnectionToFacebook() in normal use. + void disconnectFromFacebook(); // Disconnect from the FBC service. + void checkConnectionToFacebook(bool auto_connect = false); // Check if an access token is available on the FBC service. If not, call connectToFacebook(). void loadFacebookFriends(); void postCheckin(const std::string& location, const std::string& name, const std::string& description, const std::string& picture, const std::string& message); @@ -72,9 +75,9 @@ public: void storeContent(const LLSD& content); const LLSD& getContent() const; - void setConnectionState(EConnectionState connection_state) { mConnectionState = connection_state; } + void setConnectionState(EConnectionState connection_state); + bool isConnected() { return ((mConnectionState == FB_CONNECTED) || (mConnectionState == FB_POSTING)); } EConnectionState getConnectionState() { return mConnectionState; } - bool isConnected() { return (mConnectionState == FB_CONNECTED); } S32 generation() { return mGeneration; } void openFacebookWeb(std::string url); @@ -94,6 +97,8 @@ private: share_callback_t mSharePhotoCallback; share_callback_t mUpdateStatusCallback; content_updated_callback_t mContentUpdatedCallback; + + static boost::scoped_ptr<LLEventPump> sStateWatcher; }; #endif // LL_LLFACEBOOKCONNECT_H |