akonadi
itemsync.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef AKONADI_ITEMSYNC_H
00021 #define AKONADI_ITEMSYNC_H
00022
00023 #include "akonadi_export.h"
00024
00025 #include <akonadi/item.h>
00026 #include <akonadi/job.h>
00027
00028 namespace Akonadi {
00029
00030 class Collection;
00031 class ItemFetchScope;
00032
00053 class AKONADI_EXPORT ItemSync : public Job
00054 {
00055 Q_OBJECT
00056
00057 public:
00064 explicit ItemSync( const Collection &collection, QObject *parent = 0 );
00065
00069 ~ItemSync();
00070
00081 void setFullSyncItems( const Item::List &items );
00082
00089 void setTotalItems( int amount );
00090
00097 void setStreamingEnabled( bool enable );
00098
00103 void deliveryDone();
00104
00116 void setIncrementalSyncItems( const Item::List &changedItems,
00117 const Item::List &removedItems );
00118
00130 void setFetchScope( ItemFetchScope &fetchScope );
00131
00144 ItemFetchScope &fetchScope();
00145
00146 protected:
00147 void doStart();
00148
00155 virtual bool updateItem( const Item &storedItem, Item &newItem );
00156
00157 private:
00158
00159 class Private;
00160 Private* const d;
00161
00162 Q_PRIVATE_SLOT( d, void slotLocalListDone( KJob* ) )
00163 Q_PRIVATE_SLOT( d, void slotLocalChangeDone( KJob* ) )
00164 Q_PRIVATE_SLOT( d, void slotTransactionResult( KJob* ) )
00165
00166 };
00167
00168 }
00169
00170 #endif