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

KCal Library

  • sources
  • kde-4.12
  • kdepimlibs
  • 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
KCal::Todo
Provides a To-do in the sense of RFC2445.
Definition: todo.h:44
KCal::Calendar
Represents the main calendar class.
Definition: calendar.h:119
KCal::IncidenceBase
An abstract class that provides a common base for all calendar incidence classes. ...
Definition: incidencebase.h:102
KCal::Attendee
Represents information related to an attendee of an Calendar Incidence, typically a meeting or task (...
Definition: attendee.h:58
KCal::Event
This class provides an Event in the sense of RFC2445.
Definition: event.h:41
KCal::ICalFormatImpl::readICalDateTime
static KDateTime readICalDateTime(icalproperty *p, const icaltimetype &t, ICalTimeZones *tzlist, bool utc=false)
Converts a date/time from ICal format.
KCal::ICalFormatImpl::loadedProductId
QString loadedProductId() const
Returns the PRODID string loaded from calendar file.
KCal::ICalFormatImpl::readICalDateTimeProperty
static KDateTime readICalDateTimeProperty(icalproperty *p, ICalTimeZones *tzlist, bool utc=false)
Reads a date or date/time value from a property.
KCal::ICalFormatImpl
This class provides the libical dependent functions for ICalFormat.
Definition: icalformat_p.h:67
KCal::ICalFormat
iCalendar format implementation.
Definition: icalformat.h:52
KCal::ICalFormatImpl::readICalUtcDateTime
static KDateTime readICalUtcDateTime(icalproperty *p, icaltimetype &t, ICalTimeZones *tzlist=0)
Converts a UTC date/time from ICal format.
Definition: icalformat_p.h:182
KCal::Person
Represents a person, by name ane email address.
Definition: person.h:48
KCal::Incidence
Provides the abstract base class common to non-FreeBusy (Events, To-dos, Journals) calendar component...
Definition: incidence.h:68
freebusy.h
This file is part of the API for handling calendar data and defines the FreeBusy class.
KCal::Attachment
Represents information related to an attachment for a Calendar Incidence.
Definition: attachment.h:57
KCal::Journal
Provides a Journal in the sense of RFC2445.
Definition: journal.h:43
KCal::ICalFormatImpl::ICalFormatImpl
ICalFormatImpl(ICalFormat *parent)
Create new iCal format for calendar object.
KCal::ICalFormatImpl::writeICalDateTimeProperty
static icalproperty * writeICalDateTimeProperty(const icalproperty_kind kind, const KDateTime &dt, ICalTimeZones *tzlist=0, ICalTimeZones *tzUsedList=0)
Creates an ical property from a date/time value.
KCal::ICalTimeZones
The ICalTimeZones class represents a time zone database which consists of a collection of individual ...
Definition: icaltimezones.h:64
KCal::Duration
Represents a span of time measured in seconds or days.
Definition: duration.h:52
KCal::ICalFormatImpl::populate
bool populate(Calendar *calendar, icalcomponent *fs)
Updates a calendar with data from a raw iCalendar.
KCal::ICalFormatImpl::readICalUtcDateTimeProperty
static KDateTime readICalUtcDateTimeProperty(icalproperty *p)
Reads a UTC date/time value from a property.
Definition: icalformat_p.h:202
KCal::FreeBusy
Provides information about the free/busy time of a calendar.
Definition: freebusy.h:50
KCal::Alarm
Represents an alarm notification.
Definition: alarm.h:66
KCal::Recurrence
This class represents a recurrence rule for a calendar incidence.
Definition: recurrence.h:91
KCal::RecurrenceRule
This class represents a recurrence rule for a calendar incidence.
Definition: recurrencerule.h:46
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:00:57 by doxygen 1.8.7 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
  • File Members
  • Related Pages

kdepimlibs API Reference

Skip menu "kdepimlibs API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kldap
  • kmbox
  • kmime
  • kpimidentities
  • kpimtextedit
  • kresources
  • ktnef
  • kxmlrpcclient
  • microblog

Search



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