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

akonadi

  • akonadi
  • calendar
invitationhandlerhelper_p.h
1 /*
2  Copyright (c) 2002-2004 Klarälvdalens Datakonsult AB
3  <info@klaralvdalens-datakonsult.se>
4 
5  Copyright (C) 2010 Bertjan Broeksema <broeksema@kde.org>
6  Copyright (C) 2010 Klaralvdalens Datakonsult AB, a KDAB Group company <info@kdab.net>
7 
8  This library is free software; you can redistribute it and/or modify it
9  under the terms of the GNU Library General Public License as published by
10  the Free Software Foundation; either version 2 of the License, or (at your
11  option) any later version.
12 
13  This library is distributed in the hope that it will be useful, but WITHOUT
14  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
16  License for more details.
17 
18  You should have received a copy of the GNU Library General Public License
19  along with this library; see the file COPYING.LIB. If not, write to the
20  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21  02110-1301, USA.
22 */
23 
24 #ifndef AKONADI_CALENDAR_INVITATIONHANDLER_P_H
25 #define AKONADI_CALENDAR_INVITATIONHANDLER_P_H
26 
27 #include "invitationhandler.h"
28 #include "mailscheduler_p.h"
29 #include "etmcalendar.h"
30 
31 #include <kcalcore/incidence.h>
32 #include <kcalcore/schedulemessage.h>
33 
34 #include <KGuiItem>
35 #include <KLocale>
36 
37 #include <QObject>
38 
39 class QWidget;
40 
41 namespace Akonadi {
42 
43 enum Status {
44  StatusNone,
45  StatusSendingInvitation
46 };
47 
67 class InvitationHandlerHelper : public QObject
68 {
69  Q_OBJECT
70  public:
71  explicit InvitationHandlerHelper( QWidget *parent = 0 ); // TODO
72  ~InvitationHandlerHelper();
73 
74  enum SendResult {
75  ResultCanceled,
77  ResultFailKeepUpdate,
78  ResultFailAbortUpdate,
79  ResultNoSendingNeeded,
81  ResultError,
82  ResultSuccess
83  };
84 
85  enum Action {
86  ActionAsk,
87  ActionSendMessage,
88  ActionDontSendMessage
89  };
90 
99  void setDefaultAction( Action action );
100 
106  void setDialogParent( QWidget *parent );
107 
114  InvitationHandlerHelper::SendResult sendIncidenceCreatedMessage( KCalCore::iTIPMethod method,
115  const KCalCore::Incidence::Ptr &incidence );
116 
127  bool handleIncidenceAboutToBeModified( const KCalCore::Incidence::Ptr &incidence );
128 
134  InvitationHandlerHelper::SendResult sendIncidenceModifiedMessage( KCalCore::iTIPMethod method,
135  const KCalCore::Incidence::Ptr &incidence,
136  bool attendeeStatusChanged );
137 
142  InvitationHandlerHelper::SendResult sendIncidenceDeletedMessage( KCalCore::iTIPMethod method,
143  const KCalCore::Incidence::Ptr &incidence );
144 
150  InvitationHandlerHelper::SendResult sendCounterProposal( const KCalCore::Incidence::Ptr &oldIncidence,
151  const KCalCore::Incidence::Ptr &newIncidence );
152 
153  // Frees calendar if it doesn't have jobs running
154  void calendarJobFinished( bool success, const QString &errorString );
155 
156  Q_SIGNALS:
157  void finished( Akonadi::InvitationHandlerHelper::SendResult result,
158  const QString &errorMessage );
159 
160  private Q_SLOTS:
161  void onSchedulerFinished( Akonadi::Scheduler::Result result, const QString &errorMsg );
162 
163  private:
164  InvitationHandlerHelper::SendResult sentInvitation( int messageBoxReturnCode,
165  const KCalCore::Incidence::Ptr &incidence,
166  KCalCore::iTIPMethod method );
167 
168  int askUserIfNeeded( const QString &question,
169  bool ignoreDefaultAction = true,
170  const KGuiItem &buttonYes = KGuiItem( i18n( "Send Email" ) ),
171  const KGuiItem &buttonNo = KGuiItem( i18n( "Do Not Send" ) ) ) const;
172 
178  bool weAreOrganizerOf( const KCalCore::Incidence::Ptr &incidence );
179 
185  bool weNeedToSendMailFor( const KCalCore::Incidence::Ptr &incidence );
186 
187  InvitationHandlerHelper::Action mDefaultAction;
188  QWidget *mParent;
189  MailScheduler *m_scheduler;
190  Status m_status;
191 };
192 
193 }
194 
195 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Sat Jul 13 2013 01:27:37 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