libkcal

icalformat.h
1/*
2 This file is part of libkcal.
3
4 Copyright (c) 2001-2003 Cornelius Schumacher <schumacher@kde.org>
5
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version.
10
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details.
15
16 You should have received a copy of the GNU Library General Public License
17 along with this library; see the file COPYING.LIB. If not, write to
18 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA.
20*/
21#ifndef KCAL_ICALFORMAT_H
22#define KCAL_ICALFORMAT_H
23
24#include <tqstring.h>
25
26#include "scheduler.h"
27
28#include "calformat.h"
29#include <tdemacros.h>
30
31namespace KCal {
32
33class ICalFormatImpl;
34class FreeBusy;
35
43class LIBKCAL_EXPORT ICalFormat : public CalFormat
44{
45 public:
46 ICalFormat();
47 virtual ~ICalFormat();
48
57 bool load( Calendar * calendar, const TQString &fileName );
65 bool save( Calendar * calendar, const TQString &fileName );
66
70 bool fromString( Calendar * calendar, const TQString & );
71
75 Incidence *fromString( const TQString & );
76
80 TQString toString( Calendar * );
84 TQString toICalString( Incidence * );
88 TQString toString( Incidence * );
95 TQString toString( Incidence *, Calendar * );
99 TQString toString( RecurrenceRule * );
104 bool fromString ( RecurrenceRule *, const TQString& );
105
113 ScheduleMessage *parseScheduleMessage( Calendar *, const TQString &s);
114
118 FreeBusy *parseFreeBusy( const TQString & );
119
123 void setTimeZone( const TQString &id, bool utc );
127 TQString timeZoneId() const;
131 bool utc() const;
132
133 protected:
139 bool fromRawString( Calendar * calendar, const TQCString & );
140 void setImplementation( ICalFormatImpl *impl );
141
142 private:
143 ICalFormatImpl *mImpl;
144
145 TQString mTimeZoneId;
146 bool mUtc;
147
148 class Private;
149 Private *d;
150};
151
152}
153
154#endif
CalFormat()
Constructs a new format.
Definition calformat.cpp:34
This is the main "calendar" object class.
Definition calendar.h:171
This class provides information about free/busy time of a calendar user.
Definition freebusy.h:41
void setTimeZone(const TQString &id, bool utc)
Set id of used time zone and whether this time zone is UTC or not.
bool load(Calendar *calendar, const TQString &fileName)
Loads a calendar on disk in iCalendar format into calendar.
ScheduleMessage * parseScheduleMessage(Calendar *, const TQString &s)
Parse scheduling message provided as string s.
bool utc() const
Return true if timezone used is UTC, otherwise return false.
bool fromString(Calendar *calendar, const TQString &)
Parse string and populate calendar with that information.
TQString timeZoneId() const
Return id string of timezone used.
TQString createScheduleMessage(IncidenceBase *e, Scheduler::Method m)
Create a scheduling message for event e using method m.
TQString toICalString(Incidence *)
Return incidence as full iCalendar formatted text.
bool save(Calendar *calendar, const TQString &fileName)
Writes out the calendar to disk in iCalendar format.
bool fromRawString(Calendar *calendar, const TQCString &)
Parse string and return first ical component of a raw byte array of a utf8 encoded string.
FreeBusy * parseFreeBusy(const TQString &)
Parse FREEBUSY object.
TQString toString(Calendar *)
Return calendar information as string.
This class provides the base class common to all calendar components.
This class provides the base class common to all calendar components.
Definition incidence.h:48
This class represents a recurrence rule for a calendar incidence.
This class provides an encapsulation of a scheduling message.
Definition scheduler.h:45
Method
iTIP methods.
Definition scheduler.h:103
Namespace KCal is for global classes, objects and/or functions in libkcal.
Definition alarm.h:38