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

akonadi

  • 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  };
61 
65  explicit Scheduler( QObject *parent = 0 );
66  ~Scheduler();
67 
74  virtual void publish( const KCalCore::IncidenceBase::Ptr &incidence,
75  const QString &recipients ) = 0;
83  virtual void performTransaction( const KCalCore::IncidenceBase::Ptr &incidence,
84  KCalCore::iTIPMethod method ) = 0;
85 
94  virtual void performTransaction( const KCalCore::IncidenceBase::Ptr &incidence,
95  KCalCore::iTIPMethod method,
96  const QString &recipients ) = 0;
97 
113  void acceptTransaction( const KCalCore::IncidenceBase::Ptr &incidence,
114  const Akonadi::CalendarBase::Ptr &calendar,
115  KCalCore::iTIPMethod method,
116  KCalCore::ScheduleMessage::Status status,
117  const QString &email = QString() );
118 
122  virtual QString freeBusyDir() const = 0;
123 
127  void setFreeBusyCache( KCalCore::FreeBusyCache * );
128 
132  KCalCore::FreeBusyCache *freeBusyCache() const;
133 
134 protected:
135  void acceptPublish( const KCalCore::IncidenceBase::Ptr &,
136  const Akonadi::CalendarBase::Ptr &calendar,
137  KCalCore::ScheduleMessage::Status status,
138  KCalCore::iTIPMethod method );
139 
140  void acceptRequest( const KCalCore::IncidenceBase::Ptr &,
141  const Akonadi::CalendarBase::Ptr &calendar,
142  KCalCore::ScheduleMessage::Status status,
143  const QString &email );
144 
145  void acceptAdd( const KCalCore::IncidenceBase::Ptr &,
146  KCalCore::ScheduleMessage::Status status );
147 
148  void acceptCancel( const KCalCore::IncidenceBase::Ptr &,
149  const Akonadi::CalendarBase::Ptr &calendar,
150  KCalCore::ScheduleMessage::Status status,
151  const QString &attendee );
152 
153  void acceptDeclineCounter( const KCalCore::IncidenceBase::Ptr &,
154  KCalCore::ScheduleMessage::Status status );
155 
156  void acceptReply( const KCalCore::IncidenceBase::Ptr &,
157  const Akonadi::CalendarBase::Ptr &calendar,
158  KCalCore::ScheduleMessage::Status status,
159  KCalCore::iTIPMethod method );
160 
161  void acceptRefresh( const KCalCore::IncidenceBase::Ptr &,
162  KCalCore::ScheduleMessage::Status status );
163 
164  void acceptCounter( const KCalCore::IncidenceBase::Ptr &,
165  KCalCore::ScheduleMessage::Status status );
166 
167  void acceptFreeBusy( const KCalCore::IncidenceBase::Ptr &, KCalCore::iTIPMethod method );
168  KCalCore::ICalFormat *mFormat;
169 
170 Q_SIGNALS:
171  void transactionFinished( Akonadi::Scheduler::Result, const QString &errorMessage );
172 private Q_SLOTS:
173  void handleCreateFinished( bool success, const QString &errorMessage );
174  void handleModifyFinished( bool success, const QString &errorMessage );
175  void handleDeleteFinished( bool success, const QString &errorMessage );
176 
177 private:
178  void connectCalendar( const Akonadi::CalendarBase::Ptr &calendar );
179  Q_DISABLE_COPY( Scheduler )
180  struct Private;
181  Private *const d;
182 };
183 
184 }
185 
186 #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-2013 The KDE developers.
Generated on Tue Nov 26 2013 09:03:18 by doxygen 1.8.5 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.11.3 API Reference

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