summaryrefslogtreecommitdiffabout
path: root/libkcal/icalformat.h
Unidiff
Diffstat (limited to 'libkcal/icalformat.h') (more/less context) (show whitespace changes)
-rw-r--r--libkcal/icalformat.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/libkcal/icalformat.h b/libkcal/icalformat.h
index a770dbb..a454b35 100644
--- a/libkcal/icalformat.h
+++ b/libkcal/icalformat.h
@@ -1,116 +1,118 @@
1/* 1/*
2 This file is part of libkcal. 2 This file is part of libkcal.
3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
4 4
5 This library is free software; you can redistribute it and/or 5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public 6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either 7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version. 8 version 2 of the License, or (at your option) any later version.
9 9
10 This library is distributed in the hope that it will be useful, 10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details. 13 Library General Public License for more details.
14 14
15 You should have received a copy of the GNU Library General Public License 15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to 16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. 18 Boston, MA 02111-1307, USA.
19*/ 19*/
20#ifndef ICALFORMAT_H 20#ifndef ICALFORMAT_H
21#define ICALFORMAT_H 21#define ICALFORMAT_H
22 22
23#include <qstring.h> 23#include <qstring.h>
24//Added by qt3to4:
25#include <Q3CString>
24 26
25#include "scheduler.h" 27#include "scheduler.h"
26 28
27#include "calformat.h" 29#include "calformat.h"
28 30
29namespace KCal { 31namespace KCal {
30 32
31class ICalFormatImpl; 33class ICalFormatImpl;
32 34
33/** 35/**
34 This class implements the iCalendar format. It provides methods for 36 This class implements the iCalendar format. It provides methods for
35 loading/saving/converting iCalendar format data into the internal KOrganizer 37 loading/saving/converting iCalendar format data into the internal KOrganizer
36 representation as Calendar and Events. 38 representation as Calendar and Events.
37 39
38 @short iCalendar format implementation 40 @short iCalendar format implementation
39*/ 41*/
40class ICalFormat : public CalFormat { 42class ICalFormat : public CalFormat {
41 public: 43 public:
42 /** Create new iCalendar format. */ 44 /** Create new iCalendar format. */
43 ICalFormat( bool pe = true); 45 ICalFormat( bool pe = true);
44 virtual ~ICalFormat(); 46 virtual ~ICalFormat();
45 47
46 /** 48 /**
47 Loads a calendar on disk in iCalendar format into calendar. 49 Loads a calendar on disk in iCalendar format into calendar.
48 Returns true if successful, else returns false. Provides more error 50 Returns true if successful, else returns false. Provides more error
49 information by exception(). 51 information by exception().
50 @param calendar Calendar object to be filled. 52 @param calendar Calendar object to be filled.
51 @param fileName The name of the calendar file on disk. 53 @param fileName The name of the calendar file on disk.
52 */ 54 */
53 bool load( Calendar *, const QString &fileName ); 55 bool load( Calendar *, const QString &fileName );
54 /** 56 /**
55 Writes out the calendar to disk in iCalendar format. Returns true if 57 Writes out the calendar to disk in iCalendar format. Returns true if
56 successful and false on error. 58 successful and false on error.
57 59
58 @param calendar The Calendar object to be written. 60 @param calendar The Calendar object to be written.
59 @param fileName The name of the calendar file on disk. 61 @param fileName The name of the calendar file on disk.
60 */ 62 */
61 bool save( Calendar *, const QString &fileName ); 63 bool save( Calendar *, const QString &fileName );
62 64
63 /** 65 /**
64 Parse string and populate calendar with that information. 66 Parse string and populate calendar with that information.
65 */ 67 */
66 bool fromString( Calendar *, const QString & ); 68 bool fromString( Calendar *, const QString & );
67 /** 69 /**
68 Parse string and return first ical component. 70 Parse string and return first ical component.
69 */ 71 */
70 Incidence *fromString( const QString & ); 72 Incidence *fromString( const QString & );
71 /** 73 /**
72 Return calendar information as string. 74 Return calendar information as string.
73 */ 75 */
74 QString toString( Calendar * ); 76 QString toString( Calendar * );
75 /** 77 /**
76 Return incidence as full iCalendar formatted text. 78 Return incidence as full iCalendar formatted text.
77 */ 79 */
78 QString toICalString( Incidence * ); 80 QString toICalString( Incidence * );
79 /** 81 /**
80 Return incidence as iCalendar formatted text. 82 Return incidence as iCalendar formatted text.
81 */ 83 */
82 QString toString( Incidence * ); 84 QString toString( Incidence * );
83 /** 85 /**
84 Return recurrence as iCalendar formatted text. 86 Return recurrence as iCalendar formatted text.
85 */ 87 */
86 QString toString( Recurrence * ); 88 QString toString( Recurrence * );
87 /** 89 /**
88 Parse string and fill recurrence object with 90 Parse string and fill recurrence object with
89 that information 91 that information
90 */ 92 */
91 //bool fromString ( Recurrence *, const QString& ); 93 //bool fromString ( Recurrence *, const QString& );
92 94
93 /** Create a scheduling message for event \a e using method \m */ 95 /** Create a scheduling message for event \a e using method \m */
94 QString createScheduleMessage(IncidenceBase *e,Scheduler::Method m); 96 QString createScheduleMessage(IncidenceBase *e,Scheduler::Method m);
95 /** Parse scheduling message provided as string \s */ 97 /** Parse scheduling message provided as string \s */
96 ScheduleMessage *parseScheduleMessage( Calendar *, const QString &s); 98 ScheduleMessage *parseScheduleMessage( Calendar *, const QString &s);
97 99
98 /** Set id of used time zone and whether this time zone is UTC or not. */ 100 /** Set id of used time zone and whether this time zone is UTC or not. */
99 void setTimeZone( const QString &id, bool utc ); 101 void setTimeZone( const QString &id, bool utc );
100 QString timeZoneId() const; 102 QString timeZoneId() const;
101 int timeOffset(); 103 int timeOffset();
102 const char * tzString(); 104 const char * tzString();
103 bool utc() const; 105 bool utc() const;
104 106
105 private: 107 private:
106 bool mProcessEvents; 108 bool mProcessEvents;
107 ICalFormatImpl *mImpl; 109 ICalFormatImpl *mImpl;
108 QString mTimeZoneId; 110 QString mTimeZoneId;
109 QCString mTzString; 111 Q3CString mTzString;
110 int tzOffsetMin; 112 int tzOffsetMin;
111 bool mUtc; 113 bool mUtc;
112}; 114};
113 115
114} 116}
115 117
116#endif 118#endif