• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.14.10 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 Copyright (C) 2012 Christian Mollekopf <mollekopf@kolabsys.com>
8
9 This library is free software; you can redistribute it and/or
10 modify it under the terms of the GNU Library General Public
11 License as published by the Free Software Foundation; either
12 version 2 of the License, or (at your option) any later version.
13
14 This library is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 Library General Public License for more details.
18
19 You should have received a copy of the GNU Library General Public License
20 along with this library; see the file COPYING.LIB. If not, write to
21 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22 Boston, MA 02110-1301, USA.
23*/
33#ifndef KCALCORE_ICALFORMAT_P_H
34#define KCALCORE_ICALFORMAT_P_H
35
36#include "exceptions.h"
37#include "freebusy.h"
38#include "todo.h"
39#include "journal.h"
40#include "event.h"
41#include "person.h"
42#include "calendar.h"
43#include "schedulemessage.h"
44
45#include <KDateTime>
46
47#include <libical/ical.h>
48
49class QDate;
50
51namespace KCalCore {
52
53class Alarm;
54class Attachment;
55class Attendee;
56class Duration;
57class Event;
58class FreeBusy;
59class ICalFormat;
60class ICalTimeZones;
61class Incidence;
62class Journal;
63class Recurrence;
64class RecurrenceRule;
65class Todo;
66
71#define _ICAL_VERSION "2.0"
72
77#define _ICAL_IMPLEMENTATION_VERSION "1.0"
78
89class ICalFormatImpl
90{
91public:
96 explicit ICalFormatImpl(ICalFormat *parent);
97
101 virtual ~ICalFormatImpl();
102
108 bool populate(const Calendar::Ptr &calendar, icalcomponent *fs,
109 bool deleted = false, const QString &notebook = QString());
110
111 icalcomponent *writeIncidence(const IncidenceBase::Ptr &incidence,
112 iTIPMethod method = iTIPRequest,
113 ICalTimeZones *tzList = 0,
114 ICalTimeZones *tzUsedList = 0);
115
116 icalcomponent *writeTodo(const Todo::Ptr &todo, ICalTimeZones *tzlist = 0,
117 ICalTimeZones *tzUsedList = 0);
118
119 icalcomponent *writeEvent(const Event::Ptr &event, ICalTimeZones *tzlist = 0,
120 ICalTimeZones *tzUsedList = 0);
121
122 icalcomponent *writeJournal(const Journal::Ptr &journal, ICalTimeZones *tzlist = 0,
123 ICalTimeZones *tzUsedList = 0);
124
125 icalcomponent *writeFreeBusy(const FreeBusy::Ptr &freebusy,
126 iTIPMethod method = iTIPPublish);
127
128 void writeIncidence(icalcomponent *parent, const Incidence::Ptr &incidence,
129 ICalTimeZones *tzlist = 0, ICalTimeZones *tzUsedList = 0);
130
131 icalproperty *writeDescription(const QString &description, bool isRich = false);
132 icalproperty *writeSummary(const QString &summary, bool isRich = false);
133 icalproperty *writeLocation(const QString &location, bool isRich = false);
134 icalproperty *writeAttendee(const Attendee::Ptr &attendee);
135 icalproperty *writeOrganizer(const Person::Ptr &organizer);
136 icalproperty *writeAttachment(const Attachment::Ptr &attach);
137 icalproperty *writeRecurrenceRule(Recurrence *);
138 icalrecurrencetype writeRecurrenceRule(RecurrenceRule *recur);
139 icalcomponent *writeAlarm(const Alarm::Ptr &alarm);
140
141 QString extractErrorProperty(icalcomponent *);
142 Todo::Ptr readTodo(icalcomponent *vtodo, ICalTimeZones *tzlist);
143 Event::Ptr readEvent(icalcomponent *vevent, ICalTimeZones *tzlist);
144 FreeBusy::Ptr readFreeBusy(icalcomponent *vfreebusy);
145 Journal::Ptr readJournal(icalcomponent *vjournal, ICalTimeZones *tzlist);
146 Attendee::Ptr readAttendee(icalproperty *attendee);
147 Person::Ptr readOrganizer(icalproperty *organizer);
148 Attachment::Ptr readAttachment(icalproperty *attach);
149 void readIncidence(icalcomponent *parent, Incidence::Ptr incidence,
150 ICalTimeZones *tzlist);
151 void readRecurrenceRule(icalproperty *rrule, Incidence::Ptr event);
152 void readExceptionRule(icalproperty *rrule, Incidence::Ptr incidence);
153 void readRecurrence(const struct icalrecurrencetype &r,
154 RecurrenceRule *recur);
155 void readAlarm(icalcomponent *alarm, Incidence::Ptr incidence,
156 ICalTimeZones *tzlist);
157
161 QString loadedProductId() const;
162
163 static icaltimetype writeICalDate(const QDate &);
164
165 static QDate readICalDate(icaltimetype);
166
167 static icaltimetype writeICalDateTime(const KDateTime &);
168
169 static icaltimetype writeICalUtcDateTime(const KDateTime &);
170
186 static icalproperty *writeICalDateTimeProperty(const icalproperty_kind kind,
187 const KDateTime &dt,
188 ICalTimeZones *tzlist = 0,
189 ICalTimeZones *tzUsedList = 0);
190
203 static KDateTime readICalDateTime(icalproperty *p, const icaltimetype &t,
204 ICalTimeZones *tzlist, bool utc = false);
205
215 static KDateTime readICalUtcDateTime(icalproperty *p, icaltimetype &t,
216 ICalTimeZones *tzlist = 0)
217 //TODO: KDE5, move this implementation to icalformat_p.cpp
218 {
219 return readICalDateTime(p, t, tzlist, true);
220 }
221
232 static KDateTime readICalDateTimeProperty(icalproperty *p,
233 ICalTimeZones *tzlist, bool utc = false);
234
239 static KDateTime readICalUtcDateTimeProperty(icalproperty *p)
240 {
241 return readICalDateTimeProperty(p, 0, true);
242 }
243
244 static icaldurationtype writeICalDuration(const Duration &duration);
245
246 static Duration readICalDuration(icaldurationtype d);
247
248 static icaldatetimeperiodtype writeICalDatePeriod(const QDate &date);
249
250 icalcomponent *createCalendarComponent(const Calendar::Ptr &calendar = Calendar::Ptr());
251
252 icalcomponent *createScheduleComponent(const IncidenceBase::Ptr &incidence,
253 iTIPMethod method);
254
255protected:
256 // void dumpIcalRecurrence( const icalrecurrencetype &r );
257
258private:
259 //@cond PRIVATE
260 class Private;
261 Private *const d;
262 //@endcond
263};
264
265}
266
267#endif
calendar.h
This file is part of the API for handling calendar data and defines the Calendar class.
KCalCore::Alarm::Ptr
QSharedPointer< Alarm > Ptr
A shared pointer to an Alarm object.
Definition alarm.h:78
KCalCore::Attachment::Ptr
QSharedPointer< Attachment > Ptr
A shared pointer to an Attachment object.
Definition attachment.h:65
KCalCore::Attendee::Ptr
QSharedPointer< Attendee > Ptr
A shared pointer to an Attendee object.
Definition attendee.h:113
KCalCore::Calendar::Ptr
QSharedPointer< Calendar > Ptr
A shared pointer to a Calendar.
Definition calendar.h:138
KCalCore::Duration
Represents a span of time measured in seconds or days.
Definition duration.h:56
KCalCore::Event::Ptr
QSharedPointer< Event > Ptr
A shared pointer to an Event object.
Definition event.h:55
KCalCore::FreeBusy::Ptr
QSharedPointer< FreeBusy > Ptr
A shared pointer to a FreeBusy object.
Definition freebusy.h:64
KCalCore::ICalFormatImpl
This class provides the libical dependent functions for ICalFormat.
Definition icalformat_p.h:90
KCalCore::ICalFormatImpl::readICalUtcDateTimeProperty
static KDateTime readICalUtcDateTimeProperty(icalproperty *p)
Reads a UTC date/time value from a property.
Definition icalformat_p.h:239
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::ICalFormatImpl::loadedProductId
QString loadedProductId() const
Returns the PRODID string loaded from calendar file.
KCalCore::ICalFormatImpl::~ICalFormatImpl
virtual ~ICalFormatImpl()
Destructor.
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::readICalUtcDateTime
static KDateTime readICalUtcDateTime(icalproperty *p, icaltimetype &t, ICalTimeZones *tzlist=0)
Converts a UTC date/time from ICal format.
Definition icalformat_p.h:215
KCalCore::ICalFormatImpl::readICalDateTime
static KDateTime readICalDateTime(icalproperty *p, const icaltimetype &t, ICalTimeZones *tzlist, bool utc=false)
Converts a date/time from ICal format.
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::ICalFormatImpl
ICalFormatImpl(ICalFormat *parent)
Construct a new iCal format for calendar object.
KCalCore::ICalFormat
iCalendar format implementation.
Definition icalformat.h:59
KCalCore::ICalTimeZones
The ICalTimeZones class represents a time zone database which consists of a collection of individual ...
Definition icaltimezones.h:66
KCalCore::IncidenceBase::Ptr
QSharedPointer< IncidenceBase > Ptr
A shared pointer to an IncidenceBase.
Definition incidencebase.h:115
KCalCore::Incidence::Ptr
QSharedPointer< Incidence > Ptr
A shared pointer to an Incidence.
Definition incidence.h:112
KCalCore::Journal::Ptr
QSharedPointer< Journal > Ptr
A shared pointer to a Journal object.
Definition journal.h:49
KCalCore::Person::Ptr
QSharedPointer< Person > Ptr
A shared pointer to a Person object.
Definition person.h:56
KCalCore::RecurrenceRule
This class represents a recurrence rule for a calendar incidence.
Definition recurrencerule.h:44
KCalCore::Recurrence
This class represents a recurrence rule for a calendar incidence.
Definition recurrence.h:88
KCalCore::Todo::Ptr
QSharedPointer< Todo > Ptr
A shared pointer to a Todo object.
Definition todo.h:50
event.h
This file is part of the API for handling calendar data and defines the Event class.
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
TODO: KDE5:
Definition alarm.h:47
KCalCore::iTIPMethod
iTIPMethod
iTIP methods.
Definition schedulemessage.h:35
KCalCore::iTIPPublish
@ iTIPPublish
Event, to-do, journal or freebusy posting.
Definition schedulemessage.h:36
KCalCore::iTIPRequest
@ iTIPRequest
Event, to-do or freebusy scheduling request.
Definition schedulemessage.h:37
qHash
static uint qHash(const KDateTime &dt)
Private class that helps to provide binary compatibility between releases.
Definition occurrenceiterator.cpp:157
person.h
This file is part of the API for handling calendar data and defines the Person class.
todo.h
This file is part of the API for handling calendar data and defines the Todo class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Wed Jan 24 2024 00:00:00 by doxygen 1.10.0 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.14.10 API Reference

Skip menu "kdepimlibs-4.14.10 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