libkcal Library API Documentation

KCal::ResourceIMAP Class Reference

This class provides a calendar stored on an IMAP-server via kmail. More...

#include <resourceimap.h>

Inheritance diagram for KCal::ResourceIMAP:

KCal::ResourceCalendar List of all members.

DCOP Methods

virtual bool addIncidence (const QString &type, const QString &ical)
virtual void deleteIncidence (const QString &type, const QString &uid)
virtual void slotRefresh (const QString &type)

Public Methods

 ResourceIMAP (const KConfig *)
virtual ~ResourceIMAP ()
virtual void writeConfig (KConfig *config)
bool load ()
bool save ()
KABC::Lock * lock ()
bool addEvent (Event *anEvent)
void deleteEvent (Event *)
Eventevent (const QString &UniqueStr)
Event::List rawEvents ()
Event::List rawEventsForDate (const QDate &date, bool sorted=false)
Event::List rawEventsForDate (const QDateTime &qdt)
Event::List rawEvents (const QDate &start, const QDate &end, bool inclusive=false)
bool addTodo (Todo *todo)
void deleteTodo (Todo *)
Todotodo (const QString &uid)
Todo::List rawTodos ()
Todo::List todos (const QDate &date)
virtual bool addJournal (Journal *)
void deleteJournal (Journal *)
virtual Journaljournal (const QDate &)
virtual Journaljournal (const QString &UID)
Journal::List journals ()
Alarm::List alarms (const QDateTime &from, const QDateTime &to)
Alarm::List alarmsTo (const QDateTime &to)
void update (IncidenceBase *incidence)
bool doOpen ()
void setTimeZoneId (const QString &tzid)

Protected Slots

void unregisteredFromDCOP (const QCString &)

Protected Methods

virtual void incidenceUpdated (IncidenceBase *i)

Friends

class ResourceIMAPConfig

Detailed Description

This class provides a calendar stored on an IMAP-server via kmail.

Definition at line 46 of file resourceimap.h.


Member Function Documentation

bool ResourceIMAP::load   [virtual]
 

Load resource data.

After calling this function all data is accessible by calling the incidence/event/todo/etc. accessor functions.

If data is actually loaded within this function or the loading is delayed until it is accessed by another function depends on the implementation of the resource.

If loading the data takes significant time, the resource should return cached values, if available and return the results via the resourceChanged signal. When the resource has finished loading the resourceLoaded() signal is emitted.

Calling this function multiple times should have the same effect as calling it once, given that the data isn't changed between calls.

Implements KCal::ResourceCalendar.

Definition at line 121 of file resourceimap.cpp.

bool ResourceIMAP::save   [virtual]
 

Save resource data.

After calling this function it is save to close the resource without losing data.

If data is actually saved within this function or saving is delayed depends on the implementation of the resource.

If saving the data takes significant time, the resource should return from the function, do the saving in the background and notify the end of the save by emitting the signal resourceSaved().

Implements KCal::ResourceCalendar.

Definition at line 212 of file resourceimap.cpp.

KABC::Lock * ResourceIMAP::lock   [virtual]
 

Return object for locking the resource.

Implements KCal::ResourceCalendar.

Definition at line 217 of file resourceimap.cpp.

bool ResourceIMAP::addEvent Event   anEvent [virtual]
 

Add Event to calendar.

Implements KCal::ResourceCalendar.

Definition at line 226 of file resourceimap.cpp.

References KCal::CalendarLocal::addEvent(), KCal::ICalFormat::createScheduleMessage(), KCal::IncidenceBase::registerObserver(), and KCal::IncidenceBase::uid().

void ResourceIMAP::deleteEvent Event   [virtual]
 

deletes an event from this calendar.

Implements KCal::ResourceCalendar.

Definition at line 253 of file resourceimap.cpp.

References KCal::CalendarLocal::deleteEvent(), and KCal::IncidenceBase::uid().

Event * ResourceIMAP::event const QString   UniqueStr [virtual]
 

Retrieves an event on the basis of the unique string ID.

Implements KCal::ResourceCalendar.

Definition at line 275 of file resourceimap.cpp.

References KCal::CalendarLocal::event().

Event::List ResourceIMAP::rawEvents   [virtual]
 

Return unfiltered list of all events in calendar.

Implements KCal::ResourceCalendar.

Definition at line 299 of file resourceimap.cpp.

References KCal::CalendarLocal::rawEvents().

Event::List ResourceIMAP::rawEventsForDate const QDate   date,
bool    sorted = false
[virtual]
 

Builds and then returns a list of all events that match for the date specified.

useful for dayView, etc. etc.

Implements KCal::ResourceCalendar.

Definition at line 282 of file resourceimap.cpp.

References KCal::CalendarLocal::rawEventsForDate().

Event::List ResourceIMAP::rawEventsForDate const QDateTime   qdt [virtual]
 

Get unfiltered events for date qdt.

Implements KCal::ResourceCalendar.

Definition at line 294 of file resourceimap.cpp.

References KCal::CalendarLocal::rawEventsForDate().

Event::List ResourceIMAP::rawEvents const QDate   start,
const QDate   end,
bool    inclusive = false
[virtual]
 

Get unfiltered events in a range of dates.

If inclusive is set to true, only events are returned, which are completely included in the range.

Implements KCal::ResourceCalendar.

Definition at line 288 of file resourceimap.cpp.

References KCal::CalendarLocal::rawEvents().

bool ResourceIMAP::addTodo Todo   todo [virtual]
 

Add a todo to the todolist.

Implements KCal::ResourceCalendar.

Definition at line 308 of file resourceimap.cpp.

References KCal::CalendarLocal::addTodo(), KCal::ICalFormat::createScheduleMessage(), KCal::IncidenceBase::registerObserver(), and KCal::IncidenceBase::uid().

void ResourceIMAP::deleteTodo Todo   [virtual]
 

Remove a todo from the todolist.

Implements KCal::ResourceCalendar.

Definition at line 333 of file resourceimap.cpp.

References KCal::CalendarLocal::deleteTodo(), and KCal::IncidenceBase::uid().

Todo * ResourceIMAP::todo const QString   uid [virtual]
 

Searches todolist for an event with this unique string identifier, returns a pointer or null.

Implements KCal::ResourceCalendar.

Definition at line 357 of file resourceimap.cpp.

References KCal::CalendarLocal::todo().

Todo::List ResourceIMAP::rawTodos   [virtual]
 

Return list of all todos.

Implements KCal::ResourceCalendar.

Definition at line 352 of file resourceimap.cpp.

References KCal::CalendarLocal::rawTodos().

Todo::List ResourceIMAP::todos const QDate   date [virtual]
 

Returns list of todos due on the specified date.

Implements KCal::ResourceCalendar.

Definition at line 362 of file resourceimap.cpp.

References KCal::CalendarLocal::todos().

bool ResourceIMAP::addJournal Journal   [virtual]
 

Add a Journal entry to calendar.

Implements KCal::ResourceCalendar.

Definition at line 371 of file resourceimap.cpp.

References KCal::CalendarLocal::addJournal(), KCal::ICalFormat::createScheduleMessage(), KCal::IncidenceBase::registerObserver(), and KCal::IncidenceBase::uid().

void ResourceIMAP::deleteJournal Journal   [virtual]
 

Remove a journal entry from the journal.

Implements KCal::ResourceCalendar.

Definition at line 397 of file resourceimap.cpp.

References KCal::CalendarLocal::deleteJournal(), and KCal::IncidenceBase::uid().

Journal * ResourceIMAP::journal const QDate   [virtual]
 

Return Journal for given date.

Implements KCal::ResourceCalendar.

Definition at line 415 of file resourceimap.cpp.

References KCal::CalendarLocal::journal().

Journal * ResourceIMAP::journal const QString   UID [virtual]
 

Return Journal with given UID.

Implements KCal::ResourceCalendar.

Definition at line 420 of file resourceimap.cpp.

References KCal::CalendarLocal::journal().

Journal::List ResourceIMAP::journals   [virtual]
 

Return list of all Journals stored in calendar.

Implements KCal::ResourceCalendar.

Definition at line 425 of file resourceimap.cpp.

References KCal::CalendarLocal::journals().

Alarm::List ResourceIMAP::alarms const QDateTime   from,
const QDateTime   to
[virtual]
 

Return all alarms, which ocur in the given time interval.

Implements KCal::ResourceCalendar.

Definition at line 439 of file resourceimap.cpp.

References KCal::CalendarLocal::alarms().

Alarm::List ResourceIMAP::alarmsTo const QDateTime   to [virtual]
 

Return all alarms, which ocur before given date.

Implements KCal::ResourceCalendar.

Definition at line 434 of file resourceimap.cpp.

References KCal::CalendarLocal::alarmsTo().

void ResourceIMAP::update IncidenceBase   incidence [virtual]
 

this method should be called whenever a Event is modified directly via it's pointer.

It makes sure that the calendar is internally consistent.

Implements KCal::ResourceCalendar.

Definition at line 449 of file resourceimap.cpp.

References KCal::ICalFormat::createScheduleMessage(), QDateTime::currentDateTime(), KCal::IncidenceBase::setLastModified(), KCal::IncidenceBase::setSyncStatus(), KCal::IncidenceBase::type(), and KCal::IncidenceBase::uid().

Referenced by incidenceUpdated().

void ResourceIMAP::setTimeZoneId const QString   tzid [virtual]
 

Set time zone id used by this resource, e.g.

"Europe/Berlin".

Implements KCal::ResourceCalendar.

Definition at line 609 of file resourceimap.cpp.

References KCal::Calendar::setTimeZoneId().

virtual void KCal::ResourceIMAP::incidenceUpdated IncidenceBase   i [inline, protected, virtual]
 

Notification function of IncidenceBase::Observer.

Definition at line 164 of file resourceimap.h.

References update().

void ResourceIMAP::unregisteredFromDCOP const QCString   [protected, slot]
 

Append alarms of incidence in interval to list of alarms.

Definition at line 598 of file resourceimap.cpp.


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for libkcal Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat May 1 11:36:24 2004 by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2003