X-Git-Url: http://git.maemo.org/git/?p=situare;a=blobdiff_plain;f=src%2Ffacebookservice%2Ffacebookauthentication.h;fp=src%2Ffacebookservice%2Ffacebookauthentication.h;h=28725bde91756409d23c002b789a77f55eb476fa;hp=b1c1d11980001501475f4d9281e2d34bb72c74ca;hb=b72d0f2174bd17a5016936a1cbf90dcd912c1d8a;hpb=a2f9f96e94f3edcaceb87866617799e0f9bd6996 diff --git a/src/facebookservice/facebookauthentication.h b/src/facebookservice/facebookauthentication.h index b1c1d11..28725bd 100644 --- a/src/facebookservice/facebookauthentication.h +++ b/src/facebookservice/facebookauthentication.h @@ -27,6 +27,7 @@ #include class QNetworkReply; +class QSslError; class QWebView; class MainWindow; @@ -58,7 +59,21 @@ public: /******************************************************************************* * MEMBER FUNCTIONS AND SLOTS ******************************************************************************/ -public: +public slots: + /** + * @brief Clears account information from settings + * + * @param keepUsername keep = true, false otherwise + */ + void clearAccountInformation(bool keepUsername = false); + + /** + * @brief Is the user currently logged in + * + * @returns True if the user is logged in, otherwise false + */ + bool isLoggedIn(); + /** * @brief Initiate login process * @@ -66,14 +81,10 @@ public: */ void login(); -public slots: - /** - * @brief Clears account information from settings - * - * @param keepUsername keep = true, false otherwise - */ - void clearAccountInformation(bool keepUsername = false); + * @brief Log out + */ + void logOut(); private: /** @@ -105,6 +116,11 @@ private slots: void networkReplyHandler(QNetworkReply *reply); /** + * @brief Handler for SSL errors, ignores the error + */ + void sslErrors(QNetworkReply *reply, const QList &errors); + + /** * @brief Handler for browser URL changes * * Does check the new URL and based on that invokes the login dialog with visible browser view @@ -129,14 +145,24 @@ signals: /** * @brief Emitted when logged in successfully * + * All login related actions should be connected to this signal. + * * @param session Session data */ void loggedIn(const QString session); + /** + * @brief Emitted when logged out + * + * All logout related actions should be connected to this signal. + */ + void loggedOut(); + /******************************************************************************* * DATA MEMBERS ******************************************************************************/ private: + bool m_loggedIn; ///< Is the user currently logged in QWebView *m_browser; ///< Login browser MainWindow *m_mainWindow; ///< MainWindow };