FacebookLoginBrowser to use cookies, re-writing NetworkCookieJar
[situare] / src / network / networkcookiejar.h
index ff05178..8f6ef62 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
 * @brief Sub-class of QNetworkCookieJar, needed for cookie saving
 *
 * @author Henri Lampela
+* @author Sami Rämö - sami.ramo (at) ixonos.com
 */
 class NetworkCookieJar : public QNetworkCookieJar
 {
     Q_OBJECT
 
 public:
-
     /**
     * @brief Constructor
     *
@@ -42,49 +43,15 @@ public:
     */
     explicit NetworkCookieJar(QObject *parent = 0);
 
-/*******************************************************************************
- * BASE CLASS INHERITED AND REIMPLEMENTED MEMBER FUNCTIONS
- ******************************************************************************/
-
-    /**
-    * @brief Sets all network cookies
-    *
-    * @param cookieList Network cookie list
-    */
-    void setAllCookies ( const QList<QNetworkCookie> & cookieList );
-
-    /**
-    * @brief Gets all networks cookies
-    *
-    * @return QList<QNetworkCookie> Network cookie list
-    */
-    QList<QNetworkCookie> allCookies() const;
-
-    /**
-    * @brief Sets network cookies from url
-    *
-    * @param cookieList Network cookie list
-    * @param url Url
-    * @return bool Return value
-    */
-    bool setCookiesFromUrl(const QList<QNetworkCookie> &cookieList, const QUrl &url);
-
-    /**
-    * @brief Empty implementation
-    *
-    * @param url Url
-    * @return QList<QNetworkCookie> Network cookie list
-    */
-    QList<QNetworkCookie> cookiesForUrl(const QUrl & url) const;
+    ~NetworkCookieJar();
 
 /*******************************************************************************
- * DATA MEMBERS
+ * MEMBER FUNCTIONS AND SLOTS
  ******************************************************************************/
-
 private:
+    void loadCookies();
 
-    QList<QNetworkCookie> m_cookieList; ///< Placeholder for network cookies
-
+    void saveCookies();
 };
 
 #endif // NETWORKCOOKIEJAR_H