2 Situare - A location system for Facebook
3 Copyright (C) 2010 Ixonos Plc. Authors:
5 Kaj Wallin - kaj.wallin@ixonos.com
6 Henri Lampela - henri.lampela@ixonos.com
8 Situare is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 version 2 as published by the Free Software Foundation.
12 Situare is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with Situare; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
29 #include "facebookservice/facebookauthentication.h"
30 #include "situareservice/situareservice.h"
31 #include <QNetworkAccessManager>
32 #include "../ui/mainwindow.h"
35 * @brief Engine class for Situare Application
37 * This class handles all the underlaying login of the Situare
40 * @class SituareEngine engine.h "engine/engine.h"
42 class SituareEngine : public QObject
51 SituareEngine(QMainWindow *parent = 0);
58 /*******************************************************************************
59 * MEMBER FUNCTIONS AND SLOTS
60 ******************************************************************************/
63 * @brief Function to start engine component
70 * @brief Slot to intercept signal from successful login
75 * @brief Calls reverseGeo from SituareService to translate coordinates to street address
78 void requestAddress();
81 * @brief Calls updateLocation from SituareService to send the location update to
84 * @param status Status message
85 * @param publish Publish on Facebook
87 void requestUpdateLocation(const QString &status, const bool &publish);
89 void updateFriendsList();
91 /*******************************************************************************
93 ******************************************************************************/
96 * @brief Signal that is emitted when UI must be showed
98 void engine_showMainWindow();
101 * @brief Signal that is emitted when UI must be closed
103 void engine_closeMainWindow();
105 /*******************************************************************************
107 ******************************************************************************/
110 FacebookAuthentication *m_facebookAuthenticator; ///< Instance for facebook authenticator
111 QNetworkAccessManager *m_networkManager; ///< NetworkManager that is passed on to SituareService
112 SituareService *m_situareService; ///< Instance of the situare server communication service
113 bool m_loggedIn; ///< Boolean value to indicate whether login has been successfull or not