Better wording
[kdepim.git] / calendarsupport / mailscheduler.h
blob80ac22636c7514aa9299ea7274c59c49982fdc4e
1 /*
2 Copyright (c) 2001,2004 Cornelius Schumacher <schumacher@kde.org>
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License along
15 with this program; if not, write to the Free Software Foundation, Inc.,
16 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 As a special exception, permission is given to link this program
19 with any edition of Qt, and distribute the resulting executable,
20 without including the source code for Qt in the source distribution.
22 #ifndef CALENDARSUPPORT_MAILSCHEDULER_H
23 #define CALENDARSUPPORT_MAILSCHEDULER_H
25 #include "calendarsupport_export.h"
26 #include "nepomukcalendar.h"
28 #include <KCalCore/Calendar>
29 #include <KCalCore/Incidence>
30 #include <KCalCore/IncidenceBase>
31 #include <KCalCore/ScheduleMessage>
33 namespace KCalCore {
34 class ICalFormat;
37 namespace CalendarSupport {
38 class Calendar;
40 This class implements the iTIP interface using the email interface specified
41 as Mail.
43 class CALENDARSUPPORT_EXPORT MailScheduler //: public Scheduler
45 public:
46 explicit MailScheduler( CalendarSupport::Calendar *calendar );
47 explicit MailScheduler( const NepomukCalendar::Ptr &calendar );
48 virtual ~MailScheduler();
50 bool publish ( const KCalCore::IncidenceBase::Ptr &incidence,
51 const QString &recipients );
53 bool performTransaction( const KCalCore::IncidenceBase::Ptr &incidence,
54 KCalCore::iTIPMethod method );
56 bool performTransaction( const KCalCore::IncidenceBase::Ptr &incidence,
57 KCalCore::iTIPMethod method,
58 const QString &recipients );
59 #if 0
61 QList<KCalCore::ScheduleMessage*> retrieveTransactions();
63 bool deleteTransaction( const KCalCore::IncidenceBase::Ptr &incidence );
65 #endif
67 /** Returns the directory where the free-busy information is stored */
68 virtual QString freeBusyDir() const;
70 /**
71 Accepts the transaction. The incidence argument specifies the iCal
72 component on which the transaction acts. The status is the result of
73 processing a iTIP message with the current calendar and specifies the
74 action to be taken for this incidence.
76 @param incidence the incidence for the transaction.
77 @param method iTIP transaction method to check.
78 @param status scheduling status.
79 @param email the email address of the person for whom this
80 transaction is to be performed.
82 bool acceptTransaction( const KCalCore::IncidenceBase::Ptr &incidence,
83 KCalCore::iTIPMethod method,
84 KCalCore::ScheduleMessage::Status status,
85 const QString &email );
87 /** Accepts a counter proposal */
88 bool acceptCounterProposal( const KCalCore::Incidence::Ptr &incidence );
90 private:
91 KCalCore::Calendar::Ptr calendar() const;
92 Calendar *mCalendar;
93 NepomukCalendar::Ptr mNepomukCalendar;
94 KCalCore::ICalFormat *mFormat;
95 #if 0
96 QMap<KCalCore::IncidenceBase::Ptr, QString> mEventMap;
97 #endif
102 #endif