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

akonadi

  • akonadi
  • calendar
incidencechanger.h
1/*
2 Copyright (C) 2004 Reinhold Kainhofer <reinhold@kainhofer.com>
3 Copyright (C) 2010-2012 Sérgio Martins <iamsergio@gmail.com>
4
5 This library is free software; you can redistribute it and/or modify it
6 under the terms of the GNU Library General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or (at your
8 option) any later version.
9
10 This library is distributed in the hope that it will be useful, but WITHOUT
11 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13 License for more details.
14
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to the
17 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18 02110-1301, USA.
19*/
20#ifndef AKONADI_INCIDENCECHANGER_H
21#define AKONADI_INCIDENCECHANGER_H
22
23#include "akonadi-calendar_export.h"
24
25#include <akonadi/item.h>
26#include <akonadi/collection.h>
27#include <kcalcore/incidence.h>
28
29#include <QWidget>
30
31namespace Akonadi {
32
79class History;
80
81class AKONADI_CALENDAR_EXPORT IncidenceChanger : public QObject
82{
83 Q_OBJECT
84public:
89 enum ResultCode {
90 ResultCodeSuccess = 0,
91 ResultCodeJobError,
92 ResultCodeAlreadyDeleted,
93 ResultCodeInvalidDefaultCollection,
94 ResultCodeRolledback,
95 ResultCodePermissions,
96 ResultCodeUserCanceled,
97 ResultCodeInvalidUserCollection,
98 ResultCodeModificationDiscarded,
99 ResultCodeDuplicateId
100 };
101
107 enum DestinationPolicy {
108 DestinationPolicyDefault,
109 DestinationPolicyAsk,
110 DestinationPolicyNeverAsk
111 };
112
120 enum InvitationPolicy {
121 InvitationPolicySend = 0,
122 InvitationPolicyAsk,
123 InvitationPolicyDontSend
124 };
125
129 enum ChangeType {
130 ChangeTypeCreate,
131 ChangeTypeModify,
132 ChangeTypeDelete
133 };
134
139 explicit IncidenceChanger(QObject *parent = 0);
140
144 ~IncidenceChanger();
145
161 int createIncidence(const KCalCore::Incidence::Ptr &incidence,
162 const Akonadi::Collection &collection = Akonadi::Collection(),
163 QWidget *parent = 0);
164
177 int deleteIncidence(const Akonadi::Item &item, QWidget *parent = 0);
178
190 int deleteIncidences(const Akonadi::Item::List &items, QWidget *parent = 0);
191
207 int modifyIncidence(const Akonadi::Item &item,
208 const KCalCore::Incidence::Ptr &originalPayload = KCalCore::Incidence::Ptr(),
209 QWidget *parent = 0);
210
227 void startAtomicOperation(const QString &operationDescription = QString());
228
235 void endAtomicOperation();
236
245 void setDefaultCollection(const Akonadi::Collection &collection);
246
253 Akonadi::Collection defaultCollection() const;
254
262 void setDestinationPolicy(DestinationPolicy destinationPolicy);
263
270 DestinationPolicy destinationPolicy() const;
271
275 void setShowDialogsOnError(bool enable);
276
283 bool showDialogsOnError() const;
284
289 void setRespectsCollectionRights(bool respect);
290
299 bool respectsCollectionRights() const;
300
308 void setHistoryEnabled(bool enable);
309
317 bool historyEnabled() const;
318
324 History* history() const;
325
337 bool deletedRecently(Akonadi::Item::Id) const;
338
344 void setGroupwareCommunication(bool enabled);
345
351 bool groupwareCommunication() const;
352
356 void setAutoAdjustRecurrence(bool enable);
357
362 bool autoAdjustRecurrence() const;
363
369 void setInvitationPolicy(InvitationPolicy policy);
370
377 InvitationPolicy invitationPolicy() const;
378
385 Akonadi::Collection lastCollectionUsed() const;
386
387Q_SIGNALS:
397 void createFinished(int changeId,
398 const Akonadi::Item &item,
399 Akonadi::IncidenceChanger::ResultCode resultCode,
400 const QString &errorString);
410 void modifyFinished(int changeId,
411 const Akonadi::Item &item,
412 Akonadi::IncidenceChanger::ResultCode resultCode,
413 const QString &errorString);
424 void deleteFinished(int changeId,
425 const QVector<Akonadi::Item::Id> &itemIdList,
426 Akonadi::IncidenceChanger::ResultCode resultCode,
427 const QString &errorString);
428
429private:
430 //@cond PRIVATE
431 friend class History;
432 friend class AtomicOperation;
433 // used internally by the History class
434 explicit IncidenceChanger(bool enableHistory, QObject *parent = 0);
435 class Private;
436 Private *const d;
437 //@endcond
438};
439
440}
441
442Q_DECLARE_METATYPE(Akonadi::IncidenceChanger::DestinationPolicy)
443Q_DECLARE_METATYPE(Akonadi::IncidenceChanger::ResultCode)
444Q_DECLARE_METATYPE(Akonadi::IncidenceChanger::ChangeType)
445
446#endif
Akonadi::Collection
Represents a collection of PIM items.
Definition collection.h:76
Akonadi
FreeBusyManager::Singleton.
Definition actionstatemanager_p.h:28
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Wed Jan 24 2024 00:00:00 by doxygen 1.10.0 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
  • 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