• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.9.4 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 
82 class ICalFormatImpl
83 {
84  public:
89  explicit ICalFormatImpl( ICalFormat *parent );
90 
94  virtual ~ICalFormatImpl();
95 
101  bool populate( const Calendar::Ptr &calendar, icalcomponent *fs,
102  bool deleted = false, const QString &notebook = QString() );
103 
104  icalcomponent *writeIncidence( const IncidenceBase::Ptr &incidence,
105  iTIPMethod method = iTIPRequest,
106  ICalTimeZones *tzList = 0,
107  ICalTimeZones *tzUsedList = 0 );
108 
109  icalcomponent *writeTodo( const Todo::Ptr &todo, ICalTimeZones *tzlist = 0,
110  ICalTimeZones *tzUsedList = 0 );
111 
112  icalcomponent *writeEvent( const Event::Ptr &event, ICalTimeZones *tzlist = 0,
113  ICalTimeZones *tzUsedList = 0 );
114 
115  icalcomponent *writeJournal( const Journal::Ptr &journal, ICalTimeZones *tzlist = 0,
116  ICalTimeZones *tzUsedList = 0 );
117 
118  icalcomponent *writeFreeBusy( const FreeBusy::Ptr &freebusy,
119  iTIPMethod method = iTIPPublish );
120 
121  void writeIncidence( icalcomponent *parent, const Incidence::Ptr &incidence,
122  ICalTimeZones *tzlist = 0, ICalTimeZones *tzUsedList = 0 );
123 
124  icalproperty *writeDescription( const QString &description, bool isRich = false );
125  icalproperty *writeSummary( const QString &summary, bool isRich = false );
126  icalproperty *writeLocation( const QString &location, bool isRich = false );
127  icalproperty *writeAttendee( const Attendee::Ptr &attendee );
128  icalproperty *writeOrganizer( const Person::Ptr &organizer );
129  icalproperty *writeAttachment( const Attachment::Ptr &attach );
130  icalproperty *writeRecurrenceRule( Recurrence * );
131  icalrecurrencetype writeRecurrenceRule( RecurrenceRule *recur );
132  icalcomponent *writeAlarm( const Alarm::Ptr &alarm );
133 
134  QString extractErrorProperty( icalcomponent * );
135  Todo::Ptr readTodo( icalcomponent *vtodo, ICalTimeZones *tzlist );
136  Event::Ptr readEvent( icalcomponent *vevent, ICalTimeZones *tzlist );
137  FreeBusy::Ptr readFreeBusy( icalcomponent *vfreebusy );
138  Journal::Ptr readJournal( icalcomponent *vjournal, ICalTimeZones *tzlist );
139  Attendee::Ptr readAttendee( icalproperty *attendee );
140  Person::Ptr readOrganizer( icalproperty *organizer );
141  Attachment::Ptr readAttachment( icalproperty *attach );
142  void readIncidence( icalcomponent *parent, Incidence::Ptr incidence,
143  ICalTimeZones *tzlist );
144  void readRecurrenceRule( icalproperty *rrule, Incidence::Ptr event );
145  void readExceptionRule( icalproperty *rrule, Incidence::Ptr incidence );
146  void readRecurrence( const struct icalrecurrencetype &r,
147  RecurrenceRule *recur );
148  void readAlarm( icalcomponent *alarm, Incidence::Ptr incidence,
149  ICalTimeZones *tzlist );
150 
154  QString loadedProductId() const;
155 
156  static icaltimetype writeICalDate( const QDate & );
157 
158  static QDate readICalDate(icaltimetype);
159 
160  static icaltimetype writeICalDateTime( const KDateTime & );
161 
162  static icaltimetype writeICalUtcDateTime( const KDateTime & );
163 
179  static icalproperty *writeICalDateTimeProperty( const icalproperty_kind kind,
180  const KDateTime &dt,
181  ICalTimeZones *tzlist = 0,
182  ICalTimeZones *tzUsedList = 0 );
183 
196  static KDateTime readICalDateTime( icalproperty *p, const icaltimetype &t,
197  ICalTimeZones *tzlist, bool utc = false );
198 
208  static KDateTime readICalUtcDateTime( icalproperty *p, icaltimetype &t,
209  ICalTimeZones *tzlist = 0 )
210  { return readICalDateTime( p, t, tzlist, true ); }
211 
222  static KDateTime readICalDateTimeProperty( icalproperty *p,
223  ICalTimeZones *tzlist, bool utc = false );
224 
229  static KDateTime readICalUtcDateTimeProperty( icalproperty *p )
230  { return readICalDateTimeProperty( p, 0, true ); }
231 
232  static icaldurationtype writeICalDuration( const Duration &duration );
233 
234  static Duration readICalDuration( icaldurationtype d );
235 
236  static icaldatetimeperiodtype writeICalDatePeriod( const QDate &date );
237 
238  icalcomponent *createCalendarComponent( const Calendar::Ptr &calendar = Calendar::Ptr() );
239 
240  icalcomponent *createScheduleComponent( const IncidenceBase::Ptr &incidence,
241  iTIPMethod method );
242 
243  protected:
244  // void dumpIcalRecurrence( const icalrecurrencetype &r );
245 
246  private:
247  //@cond PRIVATE
248  class Private;
249  Private *const d;
250  //@endcond
251 };
252 
253 }
254 
255 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Tue Dec 11 2012 12:12:15 by doxygen 1.8.1.2 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.9.4 API Reference

Skip menu "kdepimlibs-4.9.4 API Reference"
  • akonadi
  •   contact
  •   kmime
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • 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