KCalendarCore

icalformat.h
Go to the documentation of this file.
1 /*
2  This file is part of the kcalcore library.
3 
4  SPDX-FileCopyrightText: 2001-2003 Cornelius Schumacher <[email protected]>
5 
6  SPDX-License-Identifier: LGPL-2.0-or-later
7 */
15 #ifndef KCALCORE_ICALFORMAT_H
16 #define KCALCORE_ICALFORMAT_H
17 
18 #include "incidence.h"
19 #include "freebusy.h"
20 #include "kcalendarcore_export.h"
21 #include "calformat.h"
22 #include "schedulemessage.h"
23 
24 namespace KCalendarCore
25 {
26 
27 class FreeBusy;
28 class Incidence;
29 class IncidenceBase;
30 class RecurrenceRule;
31 
44 class KCALENDARCORE_EXPORT ICalFormat : public CalFormat
45 {
46 public:
50  ICalFormat();
51 
55  ~ICalFormat() override;
56 
61  bool load(const Calendar::Ptr &calendar, const QString &fileName) override;
62 
67  bool save(const Calendar::Ptr &calendar, const QString &fileName) override;
68 
75  bool fromString(const Calendar::Ptr &calendar, const QString &string,
76  bool deleted = false, const QString &notebook = QString()) override;
77 
86  Incidence::Ptr fromString(const QString &string);
87 
99  Incidence::Ptr readIncidence(const QByteArray &string);
100 
108  Q_REQUIRED_RESULT bool fromString(RecurrenceRule *rule, const QString &string);
109 
114  Q_REQUIRED_RESULT bool fromRawString(const Calendar::Ptr &calendar, const QByteArray &string,
115  bool deleted = false, const QString &notebook = QString()) override;
116 
121  Q_REQUIRED_RESULT QString toString(const Calendar::Ptr &calendar,
122  const QString &notebook = QString(), bool deleted = false) override;
123 
131  Q_REQUIRED_RESULT QString toString(const Incidence::Ptr &incidence);
132 
141  Q_REQUIRED_RESULT QByteArray toRawString(const Incidence::Ptr &incidence);
142 
150  Q_REQUIRED_RESULT QString toString(RecurrenceRule *rule);
151 
159  Q_REQUIRED_RESULT QString toICalString(const Incidence::Ptr &incidence);
160 
169  Q_REQUIRED_RESULT QString createScheduleMessage(const IncidenceBase::Ptr &incidence,
170  iTIPMethod method);
171 
182  ScheduleMessage::Ptr parseScheduleMessage(const Calendar::Ptr &calendar,
183  const QString &string);
184 
193  FreeBusy::Ptr parseFreeBusy(const QString &string);
194 
200  void setTimeZone(const QTimeZone &timeZone);
201 
206  Q_REQUIRED_RESULT QTimeZone timeZone() const;
207 
212  Q_REQUIRED_RESULT QByteArray timeZoneId() const;
213 
214 protected:
219  void virtual_hook(int id, void *data) override;
220 
221 private:
222  //@cond PRIVATE
223  Q_DISABLE_COPY(ICalFormat)
224  class Private;
225  Private *const d;
226  //@endcond
227 };
228 
229 }
230 
231 #endif
An abstract base class that provides an interface to various calendar formats.
Definition: calformat.h:36
This file is part of the API for handling calendar data and defines the CalFormat abstract base class...
iTIPMethod
iTIP methods.
This file is part of the API for handling calendar data and defines the FreeBusy class.
iCalendar format implementation.
Definition: icalformat.h:44
This file is part of the API for handling calendar data and defines the Incidence class...
This class represents a recurrence rule for a calendar incidence.
Namespace for all KCalendarCore types.
Definition: alarm.h:36
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sun May 24 2020 23:09:58 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.