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

KCal Library

  • kcal
icalformat_p.h
Go to the documentation of this file.
1 /*
2  This file is part of the kcal 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 */
33 #ifndef KCAL_ICALFORMAT_P_H
34 #define KCAL_ICALFORMAT_P_H
35 
36 #include "freebusy.h"
37 #include "scheduler.h"
38 
39 #include <libical/ical.h>
40 
41 #include <kdatetime.h>
42 
43 #include <QtCore/QString>
44 #include <QtCore/QList>
45 
46 namespace KCal {
47 
48 class Alarm;
49 class Attachment;
50 class Incidence;
51 class ICalTimeZones;
52 class Recurrence;
53 class RecurrenceRule;
54 
55 #define _ICAL_VERSION "2.0"
56 
67 class ICalFormatImpl
68 {
69  public:
71  explicit ICalFormatImpl( ICalFormat *parent );
72 
73  virtual ~ICalFormatImpl();
74 
80  bool populate( Calendar *calendar, icalcomponent *fs );
81 
82  icalcomponent *writeIncidence( IncidenceBase *incidence,
83  iTIPMethod method = iTIPRequest );
84 
85  icalcomponent *writeTodo( Todo *todo, ICalTimeZones *tzlist = 0,
86  ICalTimeZones *tzUsedList = 0 );
87 
88  icalcomponent *writeEvent( Event *event, ICalTimeZones *tzlist = 0,
89  ICalTimeZones *tzUsedList = 0 );
90 
91  icalcomponent *writeFreeBusy( FreeBusy *freebusy,
92  iTIPMethod method = iTIPPublish );
93 
94  icalcomponent *writeJournal( Journal *journal, ICalTimeZones *tzlist = 0,
95  ICalTimeZones *tzUsedList = 0 );
96 
97  void writeIncidence( icalcomponent *parent, Incidence *incidence,
98  ICalTimeZones *tzlist = 0, ICalTimeZones *tzUsedList = 0 );
99 
100  icalproperty *writeDescription( const QString &description, bool isRich = false );
101  icalproperty *writeSummary( const QString &summary, bool isRich = false );
102  icalproperty *writeLocation( const QString &location, bool isRich = false );
103  icalproperty *writeAttendee( Attendee *attendee );
104  icalproperty *writeOrganizer( const Person &organizer );
105  icalproperty *writeAttachment( Attachment *attach );
106  icalproperty *writeRecurrenceRule( Recurrence * );
107  icalrecurrencetype writeRecurrenceRule( RecurrenceRule *recur );
108  icalcomponent *writeAlarm( Alarm *alarm );
109 
110  QString extractErrorProperty( icalcomponent * );
111  Todo *readTodo( icalcomponent *vtodo, ICalTimeZones *tzlist );
112  Event *readEvent( icalcomponent *vevent, ICalTimeZones *tzlist );
113  FreeBusy *readFreeBusy( icalcomponent *vfreebusy );
114  Journal *readJournal( icalcomponent *vjournal, ICalTimeZones *tzlist );
115  Attendee *readAttendee( icalproperty *attendee );
116  Person readOrganizer( icalproperty *organizer );
117  Attachment *readAttachment( icalproperty *attach );
118  void readIncidence( icalcomponent *parent, Incidence *incidence,
119  ICalTimeZones *tzlist );
120  void readRecurrenceRule( icalproperty *rrule, Incidence *event );
121  void readExceptionRule( icalproperty *rrule, Incidence *incidence );
122  void readRecurrence( const struct icalrecurrencetype &r,
123  RecurrenceRule *recur );
124  void readAlarm( icalcomponent *alarm, Incidence *incidence,
125  ICalTimeZones *tzlist );
126 
130  QString loadedProductId() const;
131 
132  static icaltimetype writeICalDate( const QDate & );
133 
134  static QDate readICalDate(icaltimetype);
135 
136  static icaltimetype writeICalDateTime( const KDateTime & );
137 
138  static icaltimetype writeICalUtcDateTime( const KDateTime & );
139 
155  static icalproperty *writeICalDateTimeProperty( const icalproperty_kind kind,
156  const KDateTime &dt,
157  ICalTimeZones *tzlist = 0,
158  ICalTimeZones *tzUsedList = 0 );
159 
172  static KDateTime readICalDateTime( icalproperty *p, const icaltimetype &t,
173  ICalTimeZones *tzlist, bool utc = false );
174 
182  static KDateTime readICalUtcDateTime( icalproperty *p, icaltimetype &t,
183  ICalTimeZones *tzlist = 0 )
184  { return readICalDateTime( p, t, tzlist, true ); }
185 
196  static KDateTime readICalDateTimeProperty( icalproperty *p,
197  ICalTimeZones *tzlist, bool utc = false );
198 
202  static KDateTime readICalUtcDateTimeProperty( icalproperty *p )
203  { return readICalDateTimeProperty( p, 0, true ); }
204 
205  static icaldurationtype writeICalDuration( const Duration &duration );
206 
207  static Duration readICalDuration( icaldurationtype d );
208 
209  static icaldatetimeperiodtype writeICalDatePeriod( const QDate &date );
210 
211  icalcomponent *createCalendarComponent( Calendar *calendar = 0 );
212 
213  icalcomponent *createScheduleComponent( IncidenceBase *incidence,
214  iTIPMethod method );
215 
216  protected:
217  void dumpIcalRecurrence( icalrecurrencetype r );
218 
219  private:
220  //@cond PRIVATE
221  class Private;
222  Private *const d;
223  //@endcond
224 };
225 
226 }
227 
228 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Sat Jul 13 2013 01:29:14 by doxygen 1.8.3.1 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KCal Library

Skip menu "KCal Library"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • 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