• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.14.10 API Reference
  • KDE Home
  • Contact Us
 

akonadi

  • akonadi
itemsync.h
1 /*
2  Copyright (c) 2007 Tobias Koenig <tokoe@kde.org>
3 
4  This library is free software; you can redistribute it and/or modify it
5  under the terms of the GNU Library General Public License as published by
6  the Free Software Foundation; either version 2 of the License, or (at your
7  option) any later version.
8 
9  This library is distributed in the hope that it will be useful, but WITHOUT
10  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12  License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this library; see the file COPYING.LIB. If not, write to the
16  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17  02110-1301, USA.
18 */
19 
20 #ifndef AKONADI_ITEMSYNC_H
21 #define AKONADI_ITEMSYNC_H
22 
23 #include "akonadi_export.h"
24 
25 #include <akonadi/item.h>
26 #include <akonadi/job.h>
27 
28 namespace Akonadi {
29 
30 class Collection;
31 class ItemFetchScope;
32 class ItemSyncPrivate;
33 
54 class AKONADI_EXPORT ItemSync : public Job
55 {
56  Q_OBJECT
57 
58 public:
65  explicit ItemSync(const Collection &collection, QObject *parent = 0);
66 
70  ~ItemSync();
71 
82  void setFullSyncItems(const Item::List &items);
83 
95  void setTotalItems(int amount);
96 
103  void setStreamingEnabled(bool enable);
104 
109  void deliveryDone();
110 
122  void setIncrementalSyncItems(const Item::List &changedItems,
123  const Item::List &removedItems);
124 
136  void setFetchScope(ItemFetchScope &fetchScope);
137 
150  ItemFetchScope &fetchScope();
151 
158  void rollback();
159 
164  enum TransactionMode {
165  SingleTransaction,
166  MultipleTransactions,
167  NoTransaction
168  };
169 
176  void setTransactionMode(TransactionMode mode);
177 
185  int batchSize() const;
186 
196  void setBatchSize(int);
197 
210  void setDisableAutomaticDeliveryDone(bool disable);
211 
212 Q_SIGNALS:
219  void readyForNextBatch(int remainingBatchSize);
220 
227  void transactionCommitted();
228 
229 protected:
230  void doStart();
231  void slotResult(KJob *job);
232 
242  AKONADI_DEPRECATED virtual bool updateItem(const Item &storedItem, Item &newItem);
243 
244 private:
245  //@cond PRIVATE
246  Q_DECLARE_PRIVATE(ItemSync)
247  ItemSyncPrivate *dummy; // for BC. KF5 TODO: REMOVE.
248 
249  Q_PRIVATE_SLOT(d_func(), void slotLocalListDone(KJob *))
250  Q_PRIVATE_SLOT(d_func(), void slotLocalDeleteDone(KJob *))
251  Q_PRIVATE_SLOT(d_func(), void slotLocalChangeDone(KJob *))
252  Q_PRIVATE_SLOT(d_func(), void slotTransactionResult(KJob *))
253  Q_PRIVATE_SLOT(d_func(), void slotItemsReceived(const Akonadi::Item::List &))
254  //@endcond
255 };
256 
257 }
258 
259 #endif
Akonadi::Collection
Represents a collection of PIM items.
Definition: collection.h:75
Akonadi::ItemSync::SingleTransaction
Use a single transaction for the entire sync process (default), provides maximum consistency ("all or...
Definition: itemsync.h:165
Akonadi::Job
Base class for all actions in the Akonadi storage.
Definition: job.h:86
Akonadi::ItemSync
Syncs between items known to a client (usually a resource) and the Akonadi storage.
Definition: itemsync.h:54
Akonadi::ItemFetchScope
Specifies which parts of an item should be fetched from the Akonadi storage.
Definition: itemfetchscope.h:69
Akonadi::ItemSync::MultipleTransactions
Use one transaction per chunk of delivered items, good compromise between the other two when using st...
Definition: itemsync.h:166
Akonadi::ItemSync::TransactionMode
TransactionMode
Transaction mode used by ItemSync.
Definition: itemsync.h:164
Akonadi
FreeBusyManager::Singleton.
Definition: actionstatemanager_p.h:28
This file is part of the KDE documentation.
Documentation copyright © 1996-2015 The KDE developers.
Generated on Wed Sep 16 2015 02:43:46 by doxygen 1.8.9.1 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

akonadi

Skip menu "akonadi"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • Modules
  • Related Pages

kdepimlibs-4.14.10 API Reference

Skip menu "kdepimlibs-4.14.10 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal