2 Situare - A location system for Facebook
3 Copyright (C) 2010 Ixonos Plc. Authors:
5 Ville Tiensuu - ville.tiensuu@ixonos.com
6 Kaj Wallin - kaj.wallin@ixonos.com
7 Henri Lampela - henri.lampela@ixonos.com
9 Situare is free software; you can redistribute it and/or
10 modify it under the terms of the GNU General Public License
11 version 2 as published by the Free Software Foundation.
13 Situare is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with Situare; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
24 #ifndef FACEBOOKAUTHENTICATION_H
25 #define FACEBOOKAUTHENTICATION_H
29 class FacebookLoginBrowser;
32 * @brief FacebookAuthentication class takes care of parsing and handling of credentials for
33 * Facebook. Other components of Situare application needs credentials to communicate with
36 * @author Ville Tiensuu
38 class FacebookAuthentication : public QObject
44 * @brief FacebookAuthentication constructor
46 * -Checks if there is valid credentials stored on the file. If there is emits signal.
48 * @param parent instance of parent
50 FacebookAuthentication(QObject *parent = 0);
52 /*******************************************************************************
53 * MEMBER FUNCTIONS AND SLOTS
54 ******************************************************************************/
61 * @brief Clears account iformation from settings
63 * @param keepUsername keep = true, false otherwise
65 void clearAccountInformation(bool keepUsername = false);
67 void setBrowser(FacebookLoginBrowser *browser);
70 QString parseSession(const QUrl &url);
73 void browserDestroyed();
75 void loadFinished(bool ok);
77 void urlChanged(const QUrl &url);
79 /*******************************************************************************
81 ******************************************************************************/
83 void buildLoginBrowser();
86 * @brief Signals error
88 * @param context error context
89 * @param error error code
91 void error(const int context, const int error);
93 void loggedIn(const QString session);
95 /*******************************************************************************
97 ******************************************************************************/
99 FacebookLoginBrowser *m_browser;
102 #endif // FACEBOOKAUTHENTICATION_H