• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.10.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 
8  This library is free software; you can redistribute it and/or
9  modify it under the terms of the GNU Library General Public
10  License as published by the Free Software Foundation; either
11  version 2 of the License, or (at your option) any later version.
12 
13  This library is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  Library General Public 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
20  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21  Boston, MA 02110-1301, USA.
22 */
32 #ifndef KCALCORE_ICALFORMAT_P_H
33 #define KCALCORE_ICALFORMAT_P_H
34 
35 #include "exceptions.h"
36 #include "freebusy.h"
37 #include "todo.h"
38 #include "journal.h"
39 #include "event.h"
40 #include "person.h"
41 #include "calendar.h"
42 #include "schedulemessage.h"
43 
44 #include <KDateTime>
45 
46 #include <ical.h>
47 
48 class QDate;
49 
50 namespace KCalCore {
51 
52 class Alarm;
53 class Attachment;
54 class Attendee;
55 class Duration;
56 class Event;
57 class FreeBusy;
58 class ICalFormat;
59 class ICalTimeZones;
60 class Incidence;
61 class Journal;
62 class Recurrence;
63 class RecurrenceRule;
64 class Todo;
65 
70 #define _ICAL_VERSION "2.0"
71 
76 #define _ICAL_IMPLEMENTATION_VERSION "1.0"
77 
88 class ICalFormatImpl
89 {
90  public:
95  explicit ICalFormatImpl( ICalFormat *parent );
96 
100  virtual ~ICalFormatImpl();
101 
107  bool populate( const Calendar::Ptr &calendar, icalcomponent *fs,
108  bool deleted = false, const QString &notebook = QString() );
109 
110  icalcomponent *writeIncidence( const IncidenceBase::Ptr &incidence,
111  iTIPMethod method = iTIPRequest,
112  ICalTimeZones *tzList = 0,
113  ICalTimeZones *tzUsedList = 0 );
114 
115  icalcomponent *writeTodo( const Todo::Ptr &todo, ICalTimeZones *tzlist = 0,
116  ICalTimeZones *tzUsedList = 0 );
117 
118  icalcomponent *writeEvent( const Event::Ptr &event, ICalTimeZones *tzlist = 0,
119  ICalTimeZones *tzUsedList = 0 );
120 
121  icalcomponent *writeJournal( const Journal::Ptr &journal, ICalTimeZones *tzlist = 0,
122  ICalTimeZones *tzUsedList = 0 );
123 
124  icalcomponent *writeFreeBusy( const FreeBusy::Ptr &freebusy,
125  iTIPMethod method = iTIPPublish );
126 
127  void writeIncidence( icalcomponent *parent, const Incidence::Ptr &incidence,
128  ICalTimeZones *tzlist = 0, ICalTimeZones *tzUsedList = 0 );
129 
130  icalproperty *writeDescription( const QString &description, bool isRich = false );
131  icalproperty *writeSummary( const QString &summary, bool isRich = false );
132  icalproperty *writeLocation( const QString &location, bool isRich = false );
133  icalproperty *writeAttendee( const Attendee::Ptr &attendee );
134  icalproperty *writeOrganizer( const Person::Ptr &organizer );
135  icalproperty *writeAttachment( const Attachment::Ptr &attach );
136  icalproperty *writeRecurrenceRule( Recurrence * );
137  icalrecurrencetype writeRecurrenceRule( RecurrenceRule *recur );
138  icalcomponent *writeAlarm( const Alarm::Ptr &alarm );
139 
140  QString extractErrorProperty( icalcomponent * );
141  Todo::Ptr readTodo( icalcomponent *vtodo, ICalTimeZones *tzlist );
142  Event::Ptr readEvent( icalcomponent *vevent, ICalTimeZones *tzlist );
143  FreeBusy::Ptr readFreeBusy( icalcomponent *vfreebusy );
144  Journal::Ptr readJournal( icalcomponent *vjournal, ICalTimeZones *tzlist );
145  Attendee::Ptr readAttendee( icalproperty *attendee );
146  Person::Ptr readOrganizer( icalproperty *organizer );
147  Attachment::Ptr readAttachment( icalproperty *attach );
148  void readIncidence( icalcomponent *parent, Incidence::Ptr incidence,
149  ICalTimeZones *tzlist );
150  void readRecurrenceRule( icalproperty *rrule, Incidence::Ptr event );
151  void readExceptionRule( icalproperty *rrule, Incidence::Ptr incidence );
152  void readRecurrence( const struct icalrecurrencetype &r,
153  RecurrenceRule *recur );
154  void readAlarm( icalcomponent *alarm, Incidence::Ptr incidence,
155  ICalTimeZones *tzlist );
156 
160  QString loadedProductId() const;
161 
162  static icaltimetype writeICalDate( const QDate & );
163 
164  static QDate readICalDate(icaltimetype);
165 
166  static icaltimetype writeICalDateTime( const KDateTime & );
167 
168  static icaltimetype writeICalUtcDateTime( const KDateTime & );
169 
185  static icalproperty *writeICalDateTimeProperty( const icalproperty_kind kind,
186  const KDateTime &dt,
187  ICalTimeZones *tzlist = 0,
188  ICalTimeZones *tzUsedList = 0 );
189 
202  static KDateTime readICalDateTime( icalproperty *p, const icaltimetype &t,
203  ICalTimeZones *tzlist, bool utc = false );
204 
214  static KDateTime readICalUtcDateTime( icalproperty *p, icaltimetype &t,
215  ICalTimeZones *tzlist = 0 )
216  { return readICalDateTime( p, t, tzlist, true ); }
217 
228  static KDateTime readICalDateTimeProperty( icalproperty *p,
229  ICalTimeZones *tzlist, bool utc = false );
230 
235  static KDateTime readICalUtcDateTimeProperty( icalproperty *p )
236  { return readICalDateTimeProperty( p, 0, true ); }
237 
238  static icaldurationtype writeICalDuration( const Duration &duration );
239 
240  static Duration readICalDuration( icaldurationtype d );
241 
242  static icaldatetimeperiodtype writeICalDatePeriod( const QDate &date );
243 
244  icalcomponent *createCalendarComponent( const Calendar::Ptr &calendar = Calendar::Ptr() );
245 
246  icalcomponent *createScheduleComponent( const IncidenceBase::Ptr &incidence,
247  iTIPMethod method );
248 
249  protected:
250  // void dumpIcalRecurrence( const icalrecurrencetype &r );
251 
252  private:
253  //@cond PRIVATE
254  class Private;
255  Private *const d;
256  //@endcond
257 };
258 
259 }
260 
261 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Sat Jul 13 2013 01:24:51 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.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