Hacking a way to get contacts data into akonadi: I'm reporting the
[akonadigoogledata.git] / googledataresource.h
blob54040306372ea91e3e3a74f1fbfd5c3c0d9a6525
1 #ifndef GOOGLEDATARESOURCE_H
2 #define GOOGLEDATARESOURCE_H
4 #include <akonadi/resourcebase.h>
5 #include "dlgGoogleDataConf.h"
6 extern "C" {
7 #include <gcalendar.h>
8 #include <gcontact.h>
11 class GoogleDataResource : public Akonadi::ResourceBase,
12 public Akonadi::AgentBase::Observer
14 Q_OBJECT
15 public:
16 GoogleDataResource( const QString &id );
17 ~GoogleDataResource();
19 public Q_SLOTS:
20 virtual void configure( WId windowId );
22 protected Q_SLOTS:
23 void retrieveCollections();
24 void retrieveItems( const Akonadi::Collection &col );
25 bool retrieveItem( const Akonadi::Item &item, const QSet<QByteArray> &parts );
27 protected:
28 virtual void aboutToQuit();
30 virtual void itemAdded( const Akonadi::Item &item, const Akonadi::Collection &collection );
31 virtual void itemChanged( const Akonadi::Item &item, const QSet<QByteArray> &parts );
32 virtual void itemRemoved( const Akonadi::Item &item );
34 /* Config dialog */
35 dlgGoogleDataConf *dlgConf;
36 /* Flag with authentication */
37 bool authenticated;
38 /* Google data context: holds user account name/password */
39 gcal_t gcal;
40 /* Contact array */
41 struct gcal_contact_array all_contacts;
44 #endif