Updated changelog
[grr] / src / googlereader.h
index cd47dd2..360f7dd 100644 (file)
@@ -4,7 +4,6 @@
 #include <QObject>
 #include <QNetworkReply>
 #include <QNetworkRequest>
-#include <QDomDocument>
 #include <QBuffer>
 #include <QDateTime>
 
@@ -28,6 +27,7 @@ class Feed : public QObject {
                uint newestitem;
                
                QString continuation;
+               uint updated;
 
                QDateTime lastUpdated;
 
@@ -41,12 +41,12 @@ class Feed : public QObject {
                        unread = 0;
                        reader = gr;
                        special = 0;
+                       updated = 0;
                }
 
                void fetch(bool);
                void addEntry(Entry *);
                void delEntry(Entry *);
-               void signalUpdated(); // TODO: Clean this up...
                QList<Entry *> getEntries();
                int getEntriesSize() { return entries.size(); }
                void markRead();
@@ -59,6 +59,10 @@ class Feed : public QObject {
        private:
                QHash<QString, Entry *> entries;
                QBuffer buffer;
+               QNetworkReply *reply;
+
+       private slots:
+               void fetchFinished();
 };
     
 Q_DECLARE_METATYPE(Feed *)
@@ -135,27 +139,30 @@ class GoogleReader: public QObject {
                void setLogin(QString l) { login = l; }
                void setPasswd(QString p) { passwd = p; }
                void logOut() { 
-                       SID = NULL; 
+                       auth = NULL;
                        token = NULL;
                        updateSubscriptionsPending = false;
                        updateUnreadPending = false;
-                       SIDPending = false;
+                       authPending = false;
+               }
+
+               QByteArray getAuth() {
+                       return auth;
                }
 
        private slots:
                void downloadFinished(QNetworkReply *reply);
 
        private:
-               char *SID;
+               QByteArray auth;
                QBuffer buffer;
                bool updateSubscriptionsPending;
                bool updateUnreadPending;
-               bool SIDPending;
+               bool authPending;
 
-               void getSID();
-               void parseSubscriptions(QDomDocument dom);
-               void parseUnread(QDomDocument dom);
-               void parseFeed(QDomDocument dom);
+               void clientLogin();
+               void parseSubscriptions(QByteArray data);
+               void parseUnread(QByteArray data);
 
                QUrl login_url;
                QUrl subscriptions_url;