/usr/include/kcal/calendarlocal.h is in kdepimlibs5-dev 4:4.13.0-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 | /*
This file is part of the kcal library.
Copyright (c) 1998 Preston Brown <pbrown@kde.org>
Copyright (c) 2001,2003 Cornelius Schumacher <schumacher@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
/**
@file
This file is part of the API for handling calendar data and
defines the CalendarLocal class.
@author Preston Brown \<pbrown@kde.org\>
@author Cornelius Schumacher \<schumacher@kde.org\>
*/
#ifndef KCAL_CALENDARLOCAL_H
#define KCAL_CALENDARLOCAL_H
#include "calendar.h"
namespace KCal {
class CalFormat;
/**
@brief
This class provides a calendar stored as a local file.
*/
class KCAL_DEPRECATED_EXPORT CalendarLocal : public Calendar
{
public:
/**
@copydoc
Calendar::Calendar(const KDateTime::Spec &)
*/
explicit CalendarLocal( const KDateTime::Spec &timeSpec );
/**
@copydoc
Calendar::Calendar(const QString &)
*/
explicit CalendarLocal( const QString &timeZoneId );
/**
@copydoc
Calendar::~Calendar()
*/
~CalendarLocal();
/**
Loads a calendar on disk in vCalendar or iCalendar format into the
current calendar. Incidences already present are preserved. If an
incidence of the file to be loaded has the same unique id as an
incidence already present the new incidence is ignored.
To load a CalendarLocal object from a file without preserving existing
incidences call close() before load().
@param fileName the name of the calendar on disk.
@param format the format to use. If 0, an attempt is made to load
iCalendar format, and if that fails tries vCalendar format.
@return true, if successful, false on error.
@see save( const QString &, CalFormat *)
*/
bool load( const QString &fileName, CalFormat *format = 0 );
/**
Reloads the contents of the storage into memory. The associated file name
must be known, in other words a previous load() must have been executed.
@return true if the reload was successful; false otherwise.
*/
bool reload();
/**
Writes the calendar to disk. The associated file name and format must
be known, in other words a previous load() must have been executed.
@return true if the save was successful; false otherwise.
@see save(const QString &, CalFormat *)
*/
bool save();
/**
Writes the calendar to disk in the specified @p format.
CalendarLocal takes ownership of the CalFormat object.
@param fileName the name of the file
@param format the format to use. If 0, iCalendar will be used.
@return true if the save was successful; false otherwise.
@see save(), load( const QString &, CalFormat *)
*/
bool save( const QString &fileName, CalFormat *format = 0 );
/**
Clears out the current calendar, freeing all used memory etc. etc.
*/
void close();
// Event Specific Methods //
/**
@copydoc
Calendar::addEvent()
*/
bool addEvent( Event *event );
/**
@copydoc
Calendar::deleteEvent()
*/
bool deleteEvent( Event *event );
/**
@copydoc
Calendar::deleteAllEvents()
*/
void deleteAllEvents();
/**
@copydoc
Calendar::rawEvents(EventSortField, SortDirection)
*/
Event::List rawEvents(
EventSortField sortField = EventSortUnsorted,
SortDirection sortDirection = SortDirectionAscending );
/**
@copydoc
Calendar::rawEvents(const QDate &, const QDate &, const KDateTime::Spec &, bool)
*/
Event::List rawEvents( const QDate &start, const QDate &end,
const KDateTime::Spec &timeSpec = KDateTime::Spec(),
bool inclusive = false );
/**
Returns an unfiltered list of all Events which occur on the given date.
@param date request unfiltered Event list for this QDate only.
@param timeSpec time zone etc. to interpret @p date, or the calendar's
default time spec if none is specified
@param sortField specifies the EventSortField.
@param sortDirection specifies the SortDirection.
@return the list of unfiltered Events occurring on the specified QDate.
*/
Event::List rawEventsForDate(
const QDate &date, const KDateTime::Spec &timeSpec = KDateTime::Spec(),
EventSortField sortField = EventSortUnsorted,
SortDirection sortDirection = SortDirectionAscending );
/**
@copydoc
Calendar::rawEventsForDate(const KDateTime &)
*/
Event::List rawEventsForDate( const KDateTime &dt );
/**
@copydoc
Calendar::event()
*/
Event *event( const QString &uid );
// To-do Specific Methods //
/**
@copydoc
Calendar::addTodo()
*/
bool addTodo( Todo *todo );
/**
@copydoc
Calendar::deleteTodo()
*/
bool deleteTodo( Todo *todo );
/**
@copydoc
Calendar::deleteAllTodos()
*/
void deleteAllTodos();
/**
@copydoc
Calendar::rawTodos()
*/
Todo::List rawTodos(
TodoSortField sortField = TodoSortUnsorted,
SortDirection sortDirection = SortDirectionAscending );
/**
@copydoc
Calendar::rawTodosForDate()
*/
Todo::List rawTodosForDate( const QDate &date );
/**
@copydoc
Calendar::todo()
*/
Todo *todo( const QString &uid );
// Journal Specific Methods //
/**
@copydoc
Calendar::addJournal()
*/
bool addJournal( Journal *journal );
/**
@copydoc
Calendar::deleteJournal()
*/
bool deleteJournal( Journal *journal );
/**
@copydoc
Calendar::deleteAllJournals()
*/
void deleteAllJournals();
/**
@copydoc
Calendar::rawJournals()
*/
Journal::List rawJournals(
JournalSortField sortField = JournalSortUnsorted,
SortDirection sortDirection = SortDirectionAscending );
/**
@copydoc
Calendar::rawJournalsForDate()
*/
Journal::List rawJournalsForDate( const QDate &date );
/**
@copydoc
Calendar::journal()
*/
Journal *journal( const QString &uid );
// Alarm Specific Methods //
/**
@copydoc
Calendar::alarms()
*/
Alarm::List alarms( const KDateTime &from, const KDateTime &to );
/**
Return a list of Alarms that occur before the specified timestamp.
@param to is the ending timestamp.
@return the list of Alarms occurring before the specified KDateTime.
*/
Alarm::List alarmsTo( const KDateTime &to );
/**
Notify the IncidenceBase::Observer that the incidence has been updated.
@param incidenceBase is a pointer to the updated IncidenceBase.
*/
void incidenceUpdated( IncidenceBase *incidenceBase );
using QObject::event; // prevent warning about hidden virtual method
private:
//@cond PRIVATE
Q_DISABLE_COPY( CalendarLocal )
class Private;
Private *const d;
//@endcond
};
}
#endif
|