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

KCalCore Library

  • kcalcore
icalformat_p.h
Go to the documentation of this file.
1 /*
2  This file is part of the kcalcore library.
3 
4  Copyright (c) 2001-2003 Cornelius Schumacher <schumacher@kde.org>
5  Copyright (C) 2003-2004 Reinhold Kainhofer <reinhold@kainhofer.com>
6  Copyright (c) 2006 David Jarvie <software@astrojar.org.uk>
7  Copyright (C) 2012 Christian Mollekopf <mollekopf@kolabsys.com>
8 
9  This library is free software; you can redistribute it and/or
10  modify it under the terms of the GNU Library General Public
11  License as published by the Free Software Foundation; either
12  version 2 of the License, or (at your option) any later version.
13 
14  This library is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  Library General Public License for more details.
18 
19  You should have received a copy of the GNU Library General Public License
20  along with this library; see the file COPYING.LIB. If not, write to
21  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22  Boston, MA 02110-1301, USA.
23 */
33 #ifndef KCALCORE_ICALFORMAT_P_H
34 #define KCALCORE_ICALFORMAT_P_H
35 
36 #include "exceptions.h"
37 #include "freebusy.h"
38 #include "todo.h"
39 #include "journal.h"
40 #include "event.h"
41 #include "person.h"
42 #include "calendar.h"
43 #include "schedulemessage.h"
44 
45 #include <KDateTime>
46 
47 #include <ical.h>
48 
49 class QDate;
50 
51 namespace KCalCore {
52 
53 class Alarm;
54 class Attachment;
55 class Attendee;
56 class Duration;
57 class Event;
58 class FreeBusy;
59 class ICalFormat;
60 class ICalTimeZones;
61 class Incidence;
62 class Journal;
63 class Recurrence;
64 class RecurrenceRule;
65 class Todo;
66 
71 #define _ICAL_VERSION "2.0"
72 
77 #define _ICAL_IMPLEMENTATION_VERSION "1.0"
78 
89 class ICalFormatImpl
90 {
91 public:
96  explicit ICalFormatImpl(ICalFormat *parent);
97 
101  virtual ~ICalFormatImpl();
102 
108  bool populate(const Calendar::Ptr &calendar, icalcomponent *fs,
109  bool deleted = false, const QString &notebook = QString());
110 
111  icalcomponent *writeIncidence(const IncidenceBase::Ptr &incidence,
112  iTIPMethod method = iTIPRequest,
113  ICalTimeZones *tzList = 0,
114  ICalTimeZones *tzUsedList = 0);
115 
116  icalcomponent *writeTodo(const Todo::Ptr &todo, ICalTimeZones *tzlist = 0,
117  ICalTimeZones *tzUsedList = 0);
118 
119  icalcomponent *writeEvent(const Event::Ptr &event, ICalTimeZones *tzlist = 0,
120  ICalTimeZones *tzUsedList = 0);
121 
122  icalcomponent *writeJournal(const Journal::Ptr &journal, ICalTimeZones *tzlist = 0,
123  ICalTimeZones *tzUsedList = 0);
124 
125  icalcomponent *writeFreeBusy(const FreeBusy::Ptr &freebusy,
126  iTIPMethod method = iTIPPublish);
127 
128  void writeIncidence(icalcomponent *parent, const Incidence::Ptr &incidence,
129  ICalTimeZones *tzlist = 0, ICalTimeZones *tzUsedList = 0);
130 
131  icalproperty *writeDescription(const QString &description, bool isRich = false);
132  icalproperty *writeSummary(const QString &summary, bool isRich = false);
133  icalproperty *writeLocation(const QString &location, bool isRich = false);
134  icalproperty *writeAttendee(const Attendee::Ptr &attendee);
135  icalproperty *writeOrganizer(const Person::Ptr &organizer);
136  icalproperty *writeAttachment(const Attachment::Ptr &attach);
137  icalproperty *writeRecurrenceRule(Recurrence *);
138  icalrecurrencetype writeRecurrenceRule(RecurrenceRule *recur);
139  icalcomponent *writeAlarm(const Alarm::Ptr &alarm);
140 
141  QString extractErrorProperty(icalcomponent *);
142  Todo::Ptr readTodo(icalcomponent *vtodo, ICalTimeZones *tzlist);
143  Event::Ptr readEvent(icalcomponent *vevent, ICalTimeZones *tzlist);
144  FreeBusy::Ptr readFreeBusy(icalcomponent *vfreebusy);
145  Journal::Ptr readJournal(icalcomponent *vjournal, ICalTimeZones *tzlist);
146  Attendee::Ptr readAttendee(icalproperty *attendee);
147  Person::Ptr readOrganizer(icalproperty *organizer);
148  Attachment::Ptr readAttachment(icalproperty *attach);
149  void readIncidence(icalcomponent *parent, Incidence::Ptr incidence,
150  ICalTimeZones *tzlist);
151  void readRecurrenceRule(icalproperty *rrule, Incidence::Ptr event);
152  void readExceptionRule(icalproperty *rrule, Incidence::Ptr incidence);
153  void readRecurrence(const struct icalrecurrencetype &r,
154  RecurrenceRule *recur);
155  void readAlarm(icalcomponent *alarm, Incidence::Ptr incidence,
156  ICalTimeZones *tzlist);
157 
161  QString loadedProductId() const;
162 
163  static icaltimetype writeICalDate(const QDate &);
164 
165  static QDate readICalDate(icaltimetype);
166 
167  static icaltimetype writeICalDateTime(const KDateTime &);
168 
169  static icaltimetype writeICalUtcDateTime(const KDateTime &);
170 
186  static icalproperty *writeICalDateTimeProperty(const icalproperty_kind kind,
187  const KDateTime &dt,
188  ICalTimeZones *tzlist = 0,
189  ICalTimeZones *tzUsedList = 0);
190 
203  static KDateTime readICalDateTime(icalproperty *p, const icaltimetype &t,
204  ICalTimeZones *tzlist, bool utc = false);
205 
215  static KDateTime readICalUtcDateTime(icalproperty *p, icaltimetype &t,
216  ICalTimeZones *tzlist = 0)
217  //TODO: KDE5, move this implementation to icalformat_p.cpp
218  {
219  return readICalDateTime(p, t, tzlist, true);
220  }
221 
232  static KDateTime readICalDateTimeProperty(icalproperty *p,
233  ICalTimeZones *tzlist, bool utc = false);
234 
239  static KDateTime readICalUtcDateTimeProperty(icalproperty *p)
240  {
241  return readICalDateTimeProperty(p, 0, true);
242  }
243 
244  static icaldurationtype writeICalDuration(const Duration &duration);
245 
246  static Duration readICalDuration(icaldurationtype d);
247 
248  static icaldatetimeperiodtype writeICalDatePeriod(const QDate &date);
249 
250  icalcomponent *createCalendarComponent(const Calendar::Ptr &calendar = Calendar::Ptr());
251 
252  icalcomponent *createScheduleComponent(const IncidenceBase::Ptr &incidence,
253  iTIPMethod method);
254 
255 protected:
256  // void dumpIcalRecurrence( const icalrecurrencetype &r );
257 
258 private:
259  //@cond PRIVATE
260  class Private;
261  Private *const d;
262  //@endcond
263 };
264 
265 }
266 
267 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Fri Jan 3 2014 22:20:29 by doxygen 1.8.3.1 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KCalCore Library

Skip menu "KCalCore Library"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdepimlibs-4.11.5 API Reference

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