Adding a flag to hold if user correctly authenticated with google servers.
[akonadigoogledata.git] / googledataresource.h
blob815430a9e59b65e316b2e778313ccfc4fbd2697d
1 #ifndef GOOGLEDATARESOURCE_H
2 #define GOOGLEDATARESOURCE_H
4 #include <akonadi/resourcebase.h>
5 extern "C" {
6 #include <gcalendar.h>
7 #include <gcontact.h>
10 class GoogleDataResource : public Akonadi::ResourceBase,
11 public Akonadi::AgentBase::Observer
13 Q_OBJECT
14 public:
15 GoogleDataResource( const QString &id );
16 ~GoogleDataResource();
18 public Q_SLOTS:
19 virtual void configure( WId windowId );
21 protected Q_SLOTS:
22 void retrieveCollections();
23 void retrieveItems( const Akonadi::Collection &col );
24 bool retrieveItem( const Akonadi::Item &item, const QSet<QByteArray> &parts );
26 protected:
27 virtual void aboutToQuit();
29 virtual void itemAdded( const Akonadi::Item &item, const Akonadi::Collection &collection );
30 virtual void itemChanged( const Akonadi::Item &item, const QSet<QByteArray> &parts );
31 virtual void itemRemoved( const Akonadi::Item &item );
33 /* Flag with authentication */
34 bool authenticated;
35 /* Google data context: holds user account name/password */
36 gcal_t gcal;
37 /* Contact array */
38 struct gcal_contact_array all_contacts;
41 #endif