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

akonadi

  • sources
  • kde-4.14
  • kdepimlibs
  • 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:
59  enum MergeMode
60  {
61  RIDMerge,
62  GIDMerge
63  };
64 
71  explicit ItemSync(const Collection &collection, QObject *parent = 0);
72 
76  ~ItemSync();
77 
88  void setFullSyncItems(const Item::List &items);
89 
101  void setTotalItems(int amount);
102 
109  void setStreamingEnabled(bool enable);
110 
115  void deliveryDone();
116 
128  void setIncrementalSyncItems(const Item::List &changedItems,
129  const Item::List &removedItems);
130 
142  void setFetchScope(ItemFetchScope &fetchScope);
143 
156  ItemFetchScope &fetchScope();
157 
164  void rollback();
165 
170  enum TransactionMode {
171  SingleTransaction,
172  MultipleTransactions,
173  NoTransaction
174  };
175 
182  void setTransactionMode(TransactionMode mode);
183 
191  int batchSize() const;
192 
202  void setBatchSize(int);
203 
216  void setDisableAutomaticDeliveryDone(bool disable);
217 
224  MergeMode mergeMode() const;
225 
237  void setMergeMode(MergeMode mergeMode);
238 
239 Q_SIGNALS:
246  void readyForNextBatch(int remainingBatchSize);
247 
254  void transactionCommitted();
255 
256 protected:
257  void doStart();
258  void slotResult(KJob *job);
259 
269  AKONADI_DEPRECATED virtual bool updateItem(const Item &storedItem, Item &newItem);
270 
271 private:
272  //@cond PRIVATE
273  Q_DECLARE_PRIVATE(ItemSync)
274  ItemSyncPrivate *dummy; // for BC. KF5 TODO: REMOVE.
275 
276  Q_PRIVATE_SLOT(d_func(), void slotLocalListDone(KJob *))
277  Q_PRIVATE_SLOT(d_func(), void slotLocalDeleteDone(KJob *))
278  Q_PRIVATE_SLOT(d_func(), void slotLocalChangeDone(KJob *))
279  Q_PRIVATE_SLOT(d_func(), void slotTransactionResult(KJob *))
280  Q_PRIVATE_SLOT(d_func(), void slotItemsReceived(const Akonadi::Item::List &))
281  //@endcond
282 };
283 
284 }
285 
286 #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:171
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
QObject
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:172
Akonadi::ItemSync::TransactionMode
TransactionMode
Transaction mode used by ItemSync.
Definition: itemsync.h:170
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:38:03 by doxygen 1.8.7 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 API Reference

Skip menu "kdepimlibs 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

Search



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