• 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
KCalCore::Attachment::Ptr
QSharedPointer< Attachment > Ptr
A shared pointer to an Attachment object.
Definition: attachment.h:64
KCalCore::ICalFormatImpl::populate
bool populate(const Calendar::Ptr &calendar, icalcomponent *fs, bool deleted=false, const QString &notebook=QString())
Updates a calendar with data from a raw iCalendar.
KCalCore::ICalFormatImpl::readICalDateTimeProperty
static KDateTime readICalDateTimeProperty(icalproperty *p, ICalTimeZones *tzlist, bool utc=false)
Reads a date or date/time value from a property.
KCalCore::ICalFormatImpl::readICalDateTime
static KDateTime readICalDateTime(icalproperty *p, const icaltimetype &t, ICalTimeZones *tzlist, bool utc=false)
Converts a date/time from ICal format.
KCalCore::Duration
Represents a span of time measured in seconds or days.
Definition: duration.h:52
KCalCore::Alarm::Ptr
QSharedPointer< Alarm > Ptr
A shared pointer to an Alarm object.
Definition: alarm.h:76
KCalCore::ICalFormatImpl::loadedProductId
QString loadedProductId() const
Returns the PRODID string loaded from calendar file.
KCalCore::Event::Ptr
QSharedPointer< Event > Ptr
A shared pointer to an Event object.
Definition: event.h:55
KCalCore::ICalFormatImpl::ICalFormatImpl
ICalFormatImpl(ICalFormat *parent)
Construct a new iCal format for calendar object.
KCalCore::Incidence::Ptr
QSharedPointer< Incidence > Ptr
A shared pointer to an Incidence.
Definition: incidence.h:112
person.h
This file is part of the API for handling calendar data and defines the Person class.
KCalCore::ICalFormatImpl
This class provides the libical dependent functions for ICalFormat.
Definition: icalformat_p.h:88
KCalCore::Recurrence
This class represents a recurrence rule for a calendar incidence.
Definition: recurrence.h:87
todo.h
This file is part of the API for handling calendar data and defines the Todo class.
KCalCore::IncidenceBase::Ptr
QSharedPointer< IncidenceBase > Ptr
A shared pointer to an IncidenceBase.
Definition: incidencebase.h:113
KCalCore::iTIPMethod
iTIPMethod
iTIP methods.
Definition: schedulemessage.h:35
calendar.h
This file is part of the API for handling calendar data and defines the Calendar class.
KCalCore::ICalFormat
iCalendar format implementation.
Definition: icalformat.h:58
KCalCore::ICalFormatImpl::readICalUtcDateTimeProperty
static KDateTime readICalUtcDateTimeProperty(icalproperty *p)
Reads a UTC date/time value from a property.
Definition: icalformat_p.h:235
exceptions.h
This file is part of the API for handling calendar data and defines the Exception class...
freebusy.h
This file is part of the API for handling calendar data and defines the FreeBusy class.
journal.h
This file is part of the API for handling calendar data and defines the Journal class.
KCalCore::ICalFormatImpl::~ICalFormatImpl
virtual ~ICalFormatImpl()
Destructor.
KCalCore::Calendar::Ptr
QSharedPointer< Calendar > Ptr
A shared pointer to a Calendar.
Definition: calendar.h:138
KCalCore::ICalFormatImpl::readICalUtcDateTime
static KDateTime readICalUtcDateTime(icalproperty *p, icaltimetype &t, ICalTimeZones *tzlist=0)
Converts a UTC date/time from ICal format.
Definition: icalformat_p.h:214
KCalCore::Person::Ptr
QSharedPointer< Person > Ptr
A shared pointer to a Person object.
Definition: person.h:56
KCalCore::Attendee::Ptr
QSharedPointer< Attendee > Ptr
A shared pointer to an Attendee object.
Definition: attendee.h:94
event.h
This file is part of the API for handling calendar data and defines the Event class.
KCalCore::FreeBusy::Ptr
QSharedPointer< FreeBusy > Ptr
A shared pointer to a FreeBusy object.
Definition: freebusy.h:64
KCalCore::ICalTimeZones
The ICalTimeZones class represents a time zone database which consists of a collection of individual ...
Definition: icaltimezones.h:65
KCalCore::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.
KCalCore::iTIPPublish
Event, to-do, journal or freebusy posting.
Definition: schedulemessage.h:36
KCalCore::Todo::Ptr
QSharedPointer< Todo > Ptr
A shared pointer to a Todo object.
Definition: todo.h:50
KCalCore::Journal::Ptr
QSharedPointer< Journal > Ptr
A shared pointer to a Journal object.
Definition: journal.h:49
KCalCore::iTIPRequest
Event, to-do or freebusy scheduling request.
Definition: schedulemessage.h:37
KCalCore::RecurrenceRule
This class represents a recurrence rule for a calendar incidence.
Definition: recurrencerule.h:43
This file is part of the KDE documentation.
Documentation copyright © 1996-2017 The KDE developers.
Generated on Sat Feb 25 2017 07:46:09 by doxygen 1.8.5 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