-rw-r--r-- | libkcal/calendarlocal.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libkcal/calendarlocal.h b/libkcal/calendarlocal.h index b611704..1ceabce 100644 --- a/libkcal/calendarlocal.h +++ b/libkcal/calendarlocal.h | |||
@@ -1,114 +1,115 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of libkcal. | 2 | This file is part of libkcal. |
3 | 3 | ||
4 | Copyright (c) 1998 Preston Brown | 4 | Copyright (c) 1998 Preston Brown |
5 | Copyright (c) 2001,2003 Cornelius Schumacher <schumacher@kde.org> | 5 | Copyright (c) 2001,2003 Cornelius Schumacher <schumacher@kde.org> |
6 | 6 | ||
7 | This library is free software; you can redistribute it and/or | 7 | This library is free software; you can redistribute it and/or |
8 | modify it under the terms of the GNU Library General Public | 8 | modify it under the terms of the GNU Library General Public |
9 | License as published by the Free Software Foundation; either | 9 | License as published by the Free Software Foundation; either |
10 | version 2 of the License, or (at your option) any later version. | 10 | version 2 of the License, or (at your option) any later version. |
11 | 11 | ||
12 | This library is distributed in the hope that it will be useful, | 12 | This library is distributed in the hope that it will be useful, |
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
15 | Library General Public License for more details. | 15 | Library General Public License for more details. |
16 | 16 | ||
17 | You should have received a copy of the GNU Library General Public License | 17 | You should have received a copy of the GNU Library General Public License |
18 | along with this library; see the file COPYING.LIB. If not, write to | 18 | along with this library; see the file COPYING.LIB. If not, write to |
19 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 19 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
20 | Boston, MA 02111-1307, USA. | 20 | Boston, MA 02111-1307, USA. |
21 | */ | 21 | */ |
22 | #ifndef KCAL_CALENDARLOCAL_H | 22 | #ifndef KCAL_CALENDARLOCAL_H |
23 | #define KCAL_CALENDARLOCAL_H | 23 | #define KCAL_CALENDARLOCAL_H |
24 | 24 | ||
25 | #include "calendar.h" | 25 | #include "calendar.h" |
26 | 26 | ||
27 | namespace KCal { | 27 | namespace KCal { |
28 | 28 | ||
29 | class CalFormat; | 29 | class CalFormat; |
30 | 30 | ||
31 | /** | 31 | /** |
32 | This class provides a calendar stored as a local file. | 32 | This class provides a calendar stored as a local file. |
33 | */ | 33 | */ |
34 | class CalendarLocal : public Calendar | 34 | class CalendarLocal : public Calendar |
35 | { | 35 | { |
36 | public: | 36 | public: |
37 | /** | 37 | /** |
38 | Constructs a new calendar, with variables initialized to sane values. | 38 | Constructs a new calendar, with variables initialized to sane values. |
39 | */ | 39 | */ |
40 | CalendarLocal(); | 40 | CalendarLocal(); |
41 | /** | 41 | /** |
42 | Constructs a new calendar, with variables initialized to sane values. | 42 | Constructs a new calendar, with variables initialized to sane values. |
43 | */ | 43 | */ |
44 | CalendarLocal( const QString &timeZoneId ); | 44 | CalendarLocal( const QString &timeZoneId ); |
45 | ~CalendarLocal(); | 45 | ~CalendarLocal(); |
46 | void addCalendar( Calendar* ); | 46 | void addCalendar( Calendar* ); |
47 | bool addCalendarFile( QString name, int id ); | 47 | bool addCalendarFile( QString name, int id ); |
48 | bool mergeCalendarFile( QString name ); | 48 | bool mergeCalendarFile( QString name ); |
49 | bool mergeCalendar( Calendar* cal ); | 49 | bool mergeCalendar( Calendar* cal ); |
50 | Incidence* incidenceForUid( const QString& uid, bool doNotCheckDuplicates, bool enabledOnly = false ); | 50 | Incidence* incidenceForUid( const QString& uid, bool doNotCheckDuplicates, bool enabledOnly = false,int * isDup = 0 ); |
51 | Todo* todoForUid( const QString& uid, bool doNotCheckDuplicates = true, bool enabledOnly = false ,int * isDup = 0 ); | ||
51 | void setSyncEventsReadOnly(); | 52 | void setSyncEventsReadOnly(); |
52 | void setSyncEventsEnabled(); | 53 | void setSyncEventsEnabled(); |
53 | void stopAllTodos(); | 54 | void stopAllTodos(); |
54 | /** | 55 | /** |
55 | Loads a calendar on disk in vCalendar or iCalendar format into the current | 56 | Loads a calendar on disk in vCalendar or iCalendar format into the current |
56 | calendar. Any information already present is lost. | 57 | calendar. Any information already present is lost. |
57 | @return true, if successfull, false on error. | 58 | @return true, if successfull, false on error. |
58 | @param fileName the name of the calendar on disk. | 59 | @param fileName the name of the calendar on disk. |
59 | */ | 60 | */ |
60 | bool load( const QString &fileName ); | 61 | bool load( const QString &fileName ); |
61 | /** | 62 | /** |
62 | Writes out the calendar to disk in the specified \a format. | 63 | Writes out the calendar to disk in the specified \a format. |
63 | CalendarLocal takes ownership of the CalFormat object. | 64 | CalendarLocal takes ownership of the CalFormat object. |
64 | @return true, if successfull, false on error. | 65 | @return true, if successfull, false on error. |
65 | @param fileName the name of the file | 66 | @param fileName the name of the file |
66 | */ | 67 | */ |
67 | bool save( const QString &fileName, CalFormat *format = 0 ); | 68 | bool save( const QString &fileName, CalFormat *format = 0 ); |
68 | 69 | ||
69 | /** | 70 | /** |
70 | Clears out the current calendar, freeing all used memory etc. etc. | 71 | Clears out the current calendar, freeing all used memory etc. etc. |
71 | */ | 72 | */ |
72 | void close(); | 73 | void close(); |
73 | 74 | ||
74 | void save() {} | 75 | void save() {} |
75 | 76 | ||
76 | /** | 77 | /** |
77 | Add Event to calendar. | 78 | Add Event to calendar. |
78 | */ | 79 | */ |
79 | void removeSyncInfo( QString syncProfile); | 80 | void removeSyncInfo( QString syncProfile); |
80 | bool addAnniversaryNoDup( Event *event ); | 81 | bool addAnniversaryNoDup( Event *event ); |
81 | bool addEventNoDup( Event *event ); | 82 | bool addEventNoDup( Event *event ); |
82 | bool addEvent( Event *event ); | 83 | bool addEvent( Event *event ); |
83 | /** | 84 | /** |
84 | Deletes an event from this calendar. | 85 | Deletes an event from this calendar. |
85 | */ | 86 | */ |
86 | void deleteEvent( Event *event ); | 87 | void deleteEvent( Event *event ); |
87 | 88 | ||
88 | /** | 89 | /** |
89 | Retrieves an event on the basis of the unique string ID. | 90 | Retrieves an event on the basis of the unique string ID. |
90 | */ | 91 | */ |
91 | Event *event( const QString &uid ); | 92 | Event *event( const QString &uid ); |
92 | /** | 93 | /** |
93 | Return unfiltered list of all events in calendar. | 94 | Return unfiltered list of all events in calendar. |
94 | */ | 95 | */ |
95 | QPtrList<Event> rawEvents(); | 96 | QPtrList<Event> rawEvents(); |
96 | QPtrList<Event> getExternLastSyncEvents(); | 97 | QPtrList<Event> getExternLastSyncEvents(); |
97 | /** | 98 | /** |
98 | Add a todo to the todolist. | 99 | Add a todo to the todolist. |
99 | */ | 100 | */ |
100 | bool addTodo( Todo *todo ); | 101 | bool addTodo( Todo *todo ); |
101 | bool addTodoNoDup( Todo *todo ); | 102 | bool addTodoNoDup( Todo *todo ); |
102 | /** | 103 | /** |
103 | Remove a todo from the todolist. | 104 | Remove a todo from the todolist. |
104 | */ | 105 | */ |
105 | void deleteTodo( Todo * ); | 106 | void deleteTodo( Todo * ); |
106 | /** | 107 | /** |
107 | Searches todolist for an event with this unique string identifier, | 108 | Searches todolist for an event with this unique string identifier, |
108 | returns a pointer or null. | 109 | returns a pointer or null. |
109 | */ | 110 | */ |
110 | Todo *todo( const QString &uid ); | 111 | Todo *todo( const QString &uid ); |
111 | /** | 112 | /** |
112 | Return list of all todos. | 113 | Return list of all todos. |
113 | */ | 114 | */ |
114 | QPtrList<Todo> rawTodos(); | 115 | QPtrList<Todo> rawTodos(); |