Emit error instead of queuing requests when session is empty
[situare] / src / situareservice / situareservice.h
index a85127c..1f8a171 100644 (file)
@@ -3,6 +3,7 @@
    Copyright (C) 2010  Ixonos Plc. Authors:
 
       Henri Lampela - henri.lampela@ixonos.com
+      Sami Rämö - sami.ramo@ixonos.com
 
    Situare is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License
@@ -38,7 +39,7 @@ class QUrl;
 * @brief SituareService class for communicating with Situare server
 *
 * @author Henri Lampela
-* @class SituareService situareservice.h "situareservice/situareservice.h"
+* @author Sami Rämö - sami.ramo (at) ixonos.com
 */
 class SituareService : public QObject
 {
@@ -133,44 +134,6 @@ private:
     QString degreesToString(double degrees);
 
     /**
-    * @brief Forms a http cookie
-    *
-    * @param apiKeyValue application key
-    * @param expiresValue session expire date&time from Facebook
-    * @param userValue user id from Facebook
-    * @param sessionKeyValue session key from Facebook
-    * @param sessionSecretValue session secret from Facebook
-    * @param signatureValue md5 generated signature
-    * @param localeValue used locale
-    * @return QString formed cookie
-    */
-    QString formCookie(const QString &apiKeyValue, QString expiresValue, QString userValue,
-                       QString sessionKeyValue, QString sessionSecretValue,
-                       const QString &signatureValue, const QString &localeValue);
-
-    /**
-    * @brief Forms a http url
-    *
-    * @param baseUrl Server url
-    * @param phpScript Server script
-    * @param urlParameters optional parameters for url
-    * @return QUrl formed url
-    */
-    QUrl formUrl(const QString &baseUrl, const QString &phpScript,
-                 QString urlParameters = QString());
-
-    /**
-    * @brief Forms url parameters
-    *
-    * @param coordinates current coordinates
-    * @param status optional status message
-    * @param publish optional publish location on Facebook wall
-    * @return QString
-    */
-    QString formUrlParameters(const GeoCoordinate &coordinates, QString status = QString(),
-                              bool publish = false);
-
-    /**
     * @brief Parses user and friend data from JSON string
     *
     * @param jsonReply JSON string
@@ -178,15 +141,6 @@ private:
     void parseUserData(const QByteArray &jsonReply);
 
     /**
-    * @brief Sends http request
-    *
-    * @param url destination
-    * @param cookieType type of the cookie
-    * @param cookie http cookie
-    */
-    void sendRequest(const QUrl &url, const QString &cookieType, const QString &cookie);
-
-    /**
       * @brief Build and send request
       *
       * Appends script pathname and parameters to the server base URL. Access token is appended and
@@ -267,11 +221,9 @@ signals:
  ******************************************************************************/
 
 private:
-
     bool m_defaultImage;    ///< Indicates if some of the friends/user doesn't have a image
 
     QList<QNetworkReply *> m_currentRequests;       ///< List of current http requests
-    QList<QString> m_requestsWaitingAccessToken;    ///< Requests waiting for access_token
     QList<User *> m_friendsList;                    ///< List of friends(User)
 
     QString m_session;                          ///< Session data