• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.10.5 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_H
21 #define AKONADI_CALENDAR_SCHEDULER_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  };
60 
64  explicit Scheduler( QObject *parent = 0 );
65  ~Scheduler();
66 
71  virtual void publish( const KCalCore::IncidenceBase::Ptr &incidence,
72  const QString &recipients ) = 0;
80  virtual void performTransaction( const KCalCore::IncidenceBase::Ptr &incidence,
81  KCalCore::iTIPMethod method ) = 0;
82 
91  virtual void performTransaction( const KCalCore::IncidenceBase::Ptr &incidence,
92  KCalCore::iTIPMethod method,
93  const QString &recipients ) = 0;
94 
110  void acceptTransaction( const KCalCore::IncidenceBase::Ptr &incidence,
111  const Akonadi::CalendarBase::Ptr &calendar,
112  KCalCore::iTIPMethod method,
113  KCalCore::ScheduleMessage::Status status,
114  const QString &email = QString() );
115 
119  virtual QString freeBusyDir() const = 0;
120 
124  void setFreeBusyCache( KCalCore::FreeBusyCache * );
125 
129  KCalCore::FreeBusyCache *freeBusyCache() const;
130 
131 protected:
132  void acceptPublish( const KCalCore::IncidenceBase::Ptr &,
133  const Akonadi::CalendarBase::Ptr &calendar,
134  KCalCore::ScheduleMessage::Status status,
135  KCalCore::iTIPMethod method );
136 
137  void acceptRequest( const KCalCore::IncidenceBase::Ptr &,
138  const Akonadi::CalendarBase::Ptr &calendar,
139  KCalCore::ScheduleMessage::Status status,
140  const QString &email );
141 
142  void acceptAdd( const KCalCore::IncidenceBase::Ptr &,
143  KCalCore::ScheduleMessage::Status status );
144 
145  void acceptCancel( const KCalCore::IncidenceBase::Ptr &,
146  const Akonadi::CalendarBase::Ptr &calendar,
147  KCalCore::ScheduleMessage::Status status,
148  const QString &attendee );
149 
150  void acceptDeclineCounter( const KCalCore::IncidenceBase::Ptr &,
151  KCalCore::ScheduleMessage::Status status );
152 
153  void acceptReply( const KCalCore::IncidenceBase::Ptr &,
154  const Akonadi::CalendarBase::Ptr &calendar,
155  KCalCore::ScheduleMessage::Status status,
156  KCalCore::iTIPMethod method );
157 
158  void acceptRefresh( const KCalCore::IncidenceBase::Ptr &,
159  KCalCore::ScheduleMessage::Status status );
160 
161  void acceptCounter( const KCalCore::IncidenceBase::Ptr &,
162  KCalCore::ScheduleMessage::Status status );
163 
164  void acceptFreeBusy( const KCalCore::IncidenceBase::Ptr &, KCalCore::iTIPMethod method );
165  KCalCore::ICalFormat *mFormat;
166 
167 Q_SIGNALS:
168  void transactionFinished( Akonadi::Scheduler::Result, const QString &errorMessage );
169 private Q_SLOTS:
170  void handleCreateFinished( bool success, const QString &errorMessage );
171  void handleModifyFinished( bool success, const QString &errorMessage );
172  void handleDeleteFinished( bool success, const QString &errorMessage );
173 
174 private:
175  void connectCalendar( const Akonadi::CalendarBase::Ptr &calendar );
176  Q_DISABLE_COPY( Scheduler )
177  struct Private;
178  Private *const d;
179 };
180 
181 }
182 
183 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Sat Jul 13 2013 01:27:41 by doxygen 1.8.3.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.10.5 API Reference

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