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
30 * @brief FacebookAuthentication class takes care of parsing and handling of credentials for
31 * Facebook. Other components of Situare application needs credentials to communicate with
34 * @author Ville Tiensuu
36 class FacebookAuthentication : public QObject
42 * @brief FacebookAuthentication constructor
44 * -Checks if there is valid credentials stored on the file. If there is emits signal.
46 * @param parent instance of parent
48 FacebookAuthentication(QObject *parent = 0);
50 /*******************************************************************************
51 * MEMBER FUNCTIONS AND SLOTS
52 ******************************************************************************/
56 * @brief Clears account iformation from settings
58 * @param keepUsername keep = true, false otherwise
60 void clearAccountInformation(bool keepUsername = false);
63 QString parseSession(const QUrl &url);
67 void loadFinished(bool ok);
69 void urlChanged(const QUrl &url);
71 /*******************************************************************************
73 ******************************************************************************/
77 * @brief Signals error
79 * @param context error context
80 * @param error error code
82 void error(const int context, const int error);
84 void loggedIn(const QString session);
87 * @brief Signals when credentials are invalid new login is needed
90 void newLoginRequest();
92 /*******************************************************************************
94 ******************************************************************************/
100 #endif // FACEBOOKAUTHENTICATION_H