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

akonadi

  • sources
  • kde-4.12
  • kdepimlibs
  • akonadi
  • calendar
scheduler_p.h
1 /*
2  Copyright (c) 2001-2003 Cornelius Schumacher <schumacher@kde.org>
3  Copyright (C) 2012 Sérgio Martins <iamsergio@gmail.com>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Library General Public
7  License as published by the Free Software Foundation; either
8  version 2 of the License, or (at your option) any later version.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Library General Public 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
17  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  Boston, MA 02110-1301, USA.
19 */
20 #ifndef AKONADI_CALENDAR_SCHEDULER_P_H
21 #define AKONADI_CALENDAR_SCHEDULER_P_H
22 
23 #include "calendarbase.h"
24 
25 #include <kcalcore/schedulemessage.h>
26 #include <kcalcore/incidencebase.h>
27 
28 #include <QtCore/QObject>
29 #include <QtCore/QString>
30 #include <QtCore/QList>
31 
32 namespace KCalCore {
33 class ICalFormat;
34 class FreeBusyCache;
35 }
36 
37 namespace Akonadi {
43 class Scheduler : public QObject
44 {
45  Q_OBJECT
46 public:
47  enum Result {
48  ResultSuccess,
49  ResultAssigningDifferentTypes,
50  ResultOutatedUpdate,
51  ResultErrorDelete,
52  ResultIncidenceToDeleteNotFound,
53  ResultGenericError,
54  ResultNoFreeBusyCache,
55  ResultErrorSavingFreeBusy,
56  ResultCreatingError,
57  ResultModifyingError,
58  ResultDeletingError,
59  ResultUnsupported,
60  ResultUserCancelled
61  };
62 
66  explicit Scheduler(QObject *parent = 0);
67  ~Scheduler();
68 
69  void setShowDialogs(bool enable);
70 
77  virtual void publish(const KCalCore::IncidenceBase::Ptr &incidence,
78  const QString &recipients) = 0;
86  virtual void performTransaction(const KCalCore::IncidenceBase::Ptr &incidence,
87  KCalCore::iTIPMethod method) = 0;
88 
97  virtual void performTransaction(const KCalCore::IncidenceBase::Ptr &incidence,
98  KCalCore::iTIPMethod method,
99  const QString &recipients) = 0;
100 
116  void acceptTransaction(const KCalCore::IncidenceBase::Ptr &incidence,
117  const Akonadi::CalendarBase::Ptr &calendar,
118  KCalCore::iTIPMethod method,
119  KCalCore::ScheduleMessage::Status status,
120  const QString &email = QString());
121 
125  virtual QString freeBusyDir() const = 0;
126 
130  void setFreeBusyCache(KCalCore::FreeBusyCache *);
131 
135  KCalCore::FreeBusyCache *freeBusyCache() const;
136 
137 protected:
138  void acceptPublish(const KCalCore::IncidenceBase::Ptr &,
139  const Akonadi::CalendarBase::Ptr &calendar,
140  KCalCore::ScheduleMessage::Status status,
141  KCalCore::iTIPMethod method);
142 
143  void acceptRequest(const KCalCore::IncidenceBase::Ptr &,
144  const Akonadi::CalendarBase::Ptr &calendar,
145  KCalCore::ScheduleMessage::Status status,
146  const QString &email);
147 
148  void acceptAdd(const KCalCore::IncidenceBase::Ptr &,
149  KCalCore::ScheduleMessage::Status status);
150 
151  void acceptCancel(const KCalCore::IncidenceBase::Ptr &,
152  const Akonadi::CalendarBase::Ptr &calendar,
153  KCalCore::ScheduleMessage::Status status,
154  const QString &attendee);
155 
156  void acceptDeclineCounter(const KCalCore::IncidenceBase::Ptr &,
157  KCalCore::ScheduleMessage::Status status);
158 
159  void acceptReply(const KCalCore::IncidenceBase::Ptr &,
160  const Akonadi::CalendarBase::Ptr &calendar,
161  KCalCore::ScheduleMessage::Status status,
162  KCalCore::iTIPMethod method);
163 
164  void acceptRefresh(const KCalCore::IncidenceBase::Ptr &,
165  KCalCore::ScheduleMessage::Status status);
166 
167  void acceptCounter(const KCalCore::IncidenceBase::Ptr &,
168  KCalCore::ScheduleMessage::Status status);
169 
170  void acceptFreeBusy(const KCalCore::IncidenceBase::Ptr &, KCalCore::iTIPMethod method);
171  KCalCore::ICalFormat *mFormat;
172 
173 Q_SIGNALS:
174  void transactionFinished(Akonadi::Scheduler::Result, const QString &errorMessage);
175 private Q_SLOTS:
176  void handleCreateFinished(bool success, const QString &errorMessage);
177  void handleModifyFinished(bool success, const QString &errorMessage);
178  void handleDeleteFinished(bool success, const QString &errorMessage);
179 
180 private:
181  void connectCalendar(const Akonadi::CalendarBase::Ptr &calendar);
182  Q_DISABLE_COPY(Scheduler)
183  struct Private;
184  Private *const d;
185 };
186 
187 }
188 
189 #endif
Akonadi::Scheduler::freeBusyCache
KCalCore::FreeBusyCache * freeBusyCache() const
Returns the free/busy cache.
Akonadi::Scheduler::freeBusyDir
virtual QString freeBusyDir() const =0
Returns the directory where the free-busy information is stored.
Akonadi::Scheduler::performTransaction
virtual void performTransaction(const KCalCore::IncidenceBase::Ptr &incidence, KCalCore::iTIPMethod method)=0
Performs iTIP transaction on incidence.
Akonadi::Scheduler::setFreeBusyCache
void setFreeBusyCache(KCalCore::FreeBusyCache *)
Sets the free/busy cache used to store free/busy information.
Akonadi::Scheduler
This class provides an encapsulation of iTIP transactions (RFC 2446).
Definition: scheduler_p.h:43
Akonadi::Scheduler::acceptTransaction
void acceptTransaction(const KCalCore::IncidenceBase::Ptr &incidence, const Akonadi::CalendarBase::Ptr &calendar, KCalCore::iTIPMethod method, KCalCore::ScheduleMessage::Status status, const QString &email=QString())
Accepts the transaction.
Akonadi::Scheduler::Scheduler
Scheduler(QObject *parent=0)
Creates a scheduler for calendar specified as argument.
Akonadi::Scheduler::publish
virtual void publish(const KCalCore::IncidenceBase::Ptr &incidence, const QString &recipients)=0
Notify recipients about incidence.
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:00:27 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
  • kldap
  • kmbox
  • kmime
  • kpimidentities
  • kpimtextedit
  • kresources
  • ktnef
  • kxmlrpcclient
  • microblog

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