class QNetworkReply;
class FacebookLoginBrowser;
+class MainWindow;
/**
-* @brief FacebookAuthentication class takes care of parsing and handling of credentials for
-* Facebook. Other components of Situare application needs credentials to communicate with
-* facebook.
+* @brief FacebookAuthentication class takes care of Facebook login process. It creates
+ FacebookLoginBrowser instance and tries to login with cookies using hidden browser.
+ If failed, then visible login browser dialog is invoked. Class also does parse the
+ accuired credentials.
*
* @author Ville Tiensuu
+* @author Sami Rämö - sami.ramo (at) ixonos.com
*/
class FacebookAuthentication : public QObject
{
*
* -Checks if there is valid credentials stored on the file. If there is emits signal.
*
+ * @param mainWindow MainWindow instance
* @param parent instance of parent
*/
- FacebookAuthentication(QObject *parent = 0);
+ FacebookAuthentication(MainWindow *mainWindow, QObject *parent = 0);
/*******************************************************************************
* MEMBER FUNCTIONS AND SLOTS
*/
void clearAccountInformation(bool keepUsername = false);
- void setBrowser(FacebookLoginBrowser *browser);
-
private:
QString parseSession(const QUrl &url);
* SIGNALS
******************************************************************************/
signals:
- void buildLoginBrowser();
-
/**
* @brief Signals error
*
******************************************************************************/
private:
FacebookLoginBrowser *m_browser;
+ MainWindow *m_mainWindow;
};
#endif // FACEBOOKAUTHENTICATION_H