resourcecached.h
00001 /* 00002 This file is part of libkcal. 00003 00004 Copyright (c) 2003 Cornelius Schumacher <schumacher@kde.org> 00005 00006 This library is free software; you can redistribute it and/or 00007 modify it under the terms of the GNU Library General Public 00008 License as published by the Free Software Foundation; either 00009 version 2 of the License, or (at your option) any later version. 00010 00011 This library is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 Library General Public License for more details. 00015 00016 You should have received a copy of the GNU Library General Public License 00017 along with this library; see the file COPYING.LIB. If not, write to 00018 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00019 Boston, MA 02111-1307, USA. 00020 */ 00021 #ifndef KCAL_RESOURCECACHED_H 00022 #define KCAL_RESOURCECACHED_H 00023 00024 #include <qptrlist.h> 00025 #include <qstring.h> 00026 #include <qdatetime.h> 00027 #include <kconfig.h> 00028 00029 #include "incidence.h" 00030 #include "calendarlocal.h" 00031 00032 #include "resourcecalendar.h" 00033 00034 namespace KCal { 00035 00040 class ResourceCached : public ResourceCalendar 00041 { 00042 public: 00043 ResourceCached( const KConfig * ); 00044 virtual ~ResourceCached(); 00045 00049 bool addEvent(Event *anEvent); 00053 void deleteEvent(Event *); 00054 00058 Event *event(const QString &UniqueStr); 00062 Event::List events(); 00066 Event::List rawEvents(); 00071 Event::List rawEventsForDate( const QDate &date, bool sorted = false ); 00075 Event::List rawEventsForDate( const QDateTime &qdt ); 00080 Event::List rawEvents( const QDate &start, const QDate &end, 00081 bool inclusive = false ); 00082 00083 00087 bool addTodo( Todo *todo ); 00091 void deleteTodo( Todo * ); 00096 Todo *todo( const QString &uid ); 00100 Todo::List rawTodos(); 00104 Todo::List todos( const QDate &date ); 00108 virtual bool addJournal( Journal * ); 00112 virtual void deleteJournal( Journal * ); 00116 virtual Journal *journal( const QDate & ); 00120 virtual Journal *journal( const QString &uid ); 00124 Journal::List journals(); 00125 00129 Alarm::List alarms( const QDateTime &from, const QDateTime &to ); 00130 00134 Alarm::List alarmsTo( const QDateTime &to ); 00135 00139 void setTimeZoneId( const QString& tzid ); 00140 00141 protected: 00142 CalendarLocal mCalendar; 00143 00144 private: 00145 class Private; 00146 Private *d; 00147 }; 00148 00149 } 00150 00151 #endif