Cleaning out old login code ongoing
[situare] / src / facebookservice / facebookauthentication.h
index 9ac2620..aa29199 100644 (file)
@@ -25,7 +25,6 @@
 #define FACEBOOKAUTHENTICATION_H
 
 #include <QUrl>
-#include "facebookcredentials.h"
 
 /**
 * @brief FacebookAuthentication class takes care of parsing and handling of  credentials for
@@ -51,14 +50,6 @@ public:
 /*******************************************************************************
  * MEMBER FUNCTIONS AND SLOTS
  ******************************************************************************/
-public:
-    /**
-    * @brief Getter for m_loginCredentials
-    *
-    * @return FacebookCredentials
-    */
-    FacebookCredentials loginCredentials() const;
-
 public slots:
 
     /**
@@ -68,50 +59,18 @@ public slots:
     */
     void clearAccountInformation(bool keepUsername = false);
 
-    /**
-    * @brief Loads username from settings
-    *
-    * @return QString Loaded username
-    */
-    const QString loadUsername();
-
-    /**
-    * @brief Saves username to settings
-    *
-    * @param username Username to be saved
-    */
-    void saveUsername(const QString &username);
-
-    /**
-    * @brief Shows the m_webView and loads page that is specified in the m_facebookLoginPage
-    *        variable. Specifies font size for the page.
-    *
-    */
-    void start();
-
 private:
-    QString parseAccessToken(const QUrl &url);
+    QString parseSession(const QUrl &url);
 
 private slots:
 
     void loadFinished(bool ok);
 
-    /**
-    * @brief  Search credentials from URL that is given as parameter.
-    *         If credentials are found thay are stored to loginCredentials variable.
-    *
-    * @param url URL where this method tries to find credentials.
-    * @return bool if credentials are found returns true,
-    *               if credentials are not found returns false.
-    */
-    bool updateCredentials(const QUrl & url);
-
     void urlChanged(const QUrl &url);
 
 /*******************************************************************************
  * SIGNALS
  ******************************************************************************/
-
 signals:
 
     /**
@@ -122,23 +81,7 @@ signals:
     */
     void error(const int context, const int error);
 
-    /**
-    * @brief This signal is emitted if updateCredentials method finds credentials from URL.
-    *        Signal is also emitted at the beginning of the program if there is valid credentials
-    *        in the file.
-    *
-    * @param credentials New credentials
-    */
-    void credentialsReady(const FacebookCredentials &credentials);
-
-    void loggedIn(const QString accessToken);
-
-    /**
-    * @brief This signal is emitted always when login is called. At first  the application tries
-    *        to login using saved cookies
-    *
-    */
-    void loginUsingCookies();
+    void loggedIn(const QString session);
 
     /**
     * @brief Signals when credentials are invalid new login is needed
@@ -146,27 +89,12 @@ signals:
     */
     void newLoginRequest();
 
-    /**
-    * @brief This signal is emitted when new cookies need to be saved.
-    *
-    */
-    void saveCookiesRequest();
-
 /*******************************************************************************
  * DATA MEMBERS
  ******************************************************************************/
-
 private:
 
-    bool m_freshLogin;  ///< Flag for fresh login
 
-    /**
-    * @brief Dataclass that contains authorization to use facebook. Dataclass is composed of five
-    *        QStrings and setters and getters.
-    *
-    * @var m_loginCredentials
-    */
-    FacebookCredentials m_loginCredentials;
 };
 
 #endif // FACEBOOKAUTHENTICATION_H