*/
void requestFinished(QNetworkReply *reply);
+ /**
+ * @brief Update session data
+ *
+ * @param session New session data
+ */
void updateSession(const QString &session);
private:
*/
void addProfileImages(const QList<QUrl> &imageUrlList);
+ /**
+ * @brief Append access_token and other session data to the reques url
+ *
+ * @param[in,out] requestUrl Request URL with other request parameters and ending to &
+ */
void appendAccessToken(QString &requestUrl);
+ /**
+ * @brief Convert coordinate value in degrees (double) to string with enough precision
+ *
+ * @param degrees Coordinate value in degrees
+ * @returns Coordinate value as string
+ */
QString degreesToString(double degrees);
/**
*/
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
+ * the request sent if the access token is available, otherwise the request is queued.
+ *
+ * @param script Requested script pathname
+ * @param parameters Hash containing parameter key/value pairs.
+ */
void buildRequest(const QString &script, const QHash<QString,QString> ¶meters);
+ /**
+ * @brief Send request
+ *
+ * @param requestUrl Request URL containing also all parameters
+ */
void sendRequest(const QString &requestUrl);
private slots:
-
/**
* @brief Slot for received images
*
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;
- QList<User *> m_friendsList; ///< List of friends(User)
+ 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;
+ QString m_session; ///< Session data
- NetworkAccessManager *m_networkManager; ///< Pointer to QNetworkAccessManager
+ NetworkAccessManager *m_networkManager; ///< Pointer to QNetworkAccessManager
ImageFetcher *m_imageFetcher; ///< Instance of the image fetcher
User *m_user; ///< Pointer to User