Ignore:
Timestamp:
02/03/10 22:06:42 (2 years ago)
Author:
roeland
Message:

Basic contact retrival works.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libQtGdata/trunk/qtgdata.h

    r1 r2  
    77#include <QNetworkReply> 
    88#include <QString> 
     9#include <QByteArray> 
    910 
    1011class QtGdata : public QObject 
     
    1920    }; 
    2021 
    21     QtGdata(const QString email, const QString password, const QString appString, const GDATA_ACCOUNT_TYPE); 
     22    enum GDATA_REQUEST { 
     23      GDATA_REQUEST_SUCCESS, 
     24      GDATA_REQUEST_AUTH_ERR 
     25    }; 
     26 
     27    bool isValid(); 
     28 
     29  protected: 
     30    QtGdata(const QString email, 
     31            const QString password, 
     32            const QString service, 
     33            const QString loginURL = "https://www.google.com/accounts/ClientLogin", 
     34            const GDATA_ACCOUNT_TYPE accountType = QtGdata::GDATA_ACCOUNT_TYPE_HOSTED_OR_GOOGLE); 
     35 
     36    QByteArray getFeed(const QString url); 
     37 
     38    QString email; 
     39    QString password; 
    2240 
    2341  private: 
     42      void login(const QString email, 
     43                 const QString password, 
     44                 const QString service, 
     45                 const QString loginURL = "https://www.google.com/accounts/ClientLogin", 
     46                 const GDATA_ACCOUNT_TYPE accountType = QtGdata::GDATA_ACCOUNT_TYPE_HOSTED_OR_GOOGLE, 
     47                 const QString loginToken = QString(), 
     48                 const QString loginCaptcha = QString()); 
     49 
    2450      QString SID; 
    2551      QString LSID; 
    2652      QString Auth; 
    2753 
    28   private slots: 
    29     void finished(QNetworkReply *reply); 
    30  
    31   signals: 
    32     void loginSucces(); 
    33     void loginFailed(); 
    34     void loginCaptcha(); 
     54      bool valid; 
    3555}; 
    3656 
Note: See TracChangeset for help on using the changeset viewer.