libkpimexchange Library API Documentation

KCal::ResourceExchange Class Reference

This class provides a calendar stored on a Microsoft Exchange 2000 server. More...

#include <resourceexchange.h>

List of all members.

Public Methods

 ResourceExchange (const KConfig *)
virtual ~ResourceExchange ()
virtual void writeConfig (KConfig *config)
virtual bool load ()
virtual bool save ()
KABC::Lock * lock ()
bool addEvent (Event *anEvent)
void deleteEvent (Event *)
Event * event (const QString &UniqueStr)
Event::List rawEvents ()
QString getHolidayForDate (const QDate &qd)
virtual void subscribeEvents (const QDate &start, const QDate &end)
virtual void unsubscribeEvents (const QDate &start, const QDate &end)
bool addTodo (Todo *todo)
void deleteTodo (Todo *)
Todo * todo (const QString &uid)
Todo::List rawTodos ()
Todo::List todos (const QDate &date)
virtual bool addJournal (Journal *)
virtual void deleteJournal (Journal *)
virtual Journal * journal (const QDate &)
virtual Journal * journal (const QString &UID)
Journal::List journals ()
Alarm::List alarms (const QDateTime &from, const QDateTime &to)
Alarm::List alarmsTo (const QDateTime &to)

Protected Slots

void slotMonitorNotify (const QValueList< long > &IDs, const QValueList< KURL > &urls)
void slotMonitorError (int errorCode, const QString &moreInfo)
void slotDownloadFinished (int result, const QString &moreinfo)
void downloadedEvent (KCal::Event *, const KURL &)

Protected Methods

virtual bool doOpen ()
virtual void doClose ()
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)
void update (IncidenceBase *incidence)
void incidenceUpdated (IncidenceBase *i)
void uploadEvent (Event *event)
void setTimeZoneId (const QString &tzid)

Friends

class ResourceExchangeConfig


Detailed Description

This class provides a calendar stored on a Microsoft Exchange 2000 server.

Definition at line 47 of file resourceexchange.h.


Member Function Documentation

bool ResourceExchange::save   [virtual]
 

Writes calendar to storage.

Writes calendar to disk file, writes updates to server, whatever.

Definition at line 167 of file resourceexchange.cpp.

bool ResourceExchange::addEvent Event *    anEvent
 

Add Event to calendar.

Definition at line 218 of file resourceexchange.cpp.

References uploadEvent().

void ResourceExchange::deleteEvent Event *   
 

deletes an event from this calendar.

Definition at line 242 of file resourceexchange.cpp.

References event().

Event * ResourceExchange::event const QString   UniqueStr
 

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

Definition at line 257 of file resourceexchange.cpp.

Referenced by deleteEvent(), doOpen(), update(), and uploadEvent().

Event::List ResourceExchange::rawEvents  
 

Return unfiltered list of all events in calendar.

Use with care, since this causes a LOT of network activity

Definition at line 445 of file resourceexchange.cpp.

void ResourceExchange::unsubscribeEvents const QDate   start,
const QDate   end
[virtual]
 

Stop receiving event signals for the given period (inclusive).

After this call, the calendar resource will no longer send eventsAdded, eventsModified or eventsDeleted signals for events falling completely in this period. The resource MAY delete the Events objects. The application MUST NOT dereference pointers to the relevant Events after this call.

Definition at line 292 of file resourceexchange.cpp.

bool ResourceExchange::addTodo Todo *    todo
 

Add a todo to the todolist.

Definition at line 297 of file resourceexchange.cpp.

References todo().

void ResourceExchange::deleteTodo Todo *   
 

Remove a todo from the todolist.

Definition at line 310 of file resourceexchange.cpp.

References todo().

Todo * ResourceExchange::todo const QString   uid
 

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

Definition at line 324 of file resourceexchange.cpp.

Referenced by addTodo(), and deleteTodo().

Todo::List ResourceExchange::rawTodos  
 

Return list of all todos.

Definition at line 319 of file resourceexchange.cpp.

Todo::List ResourceExchange::todos const QDate   date
 

Returns list of todos due on the specified date.

Definition at line 329 of file resourceexchange.cpp.

bool ResourceExchange::addJournal Journal *    [virtual]
 

Add a Journal entry to calendar.

Definition at line 451 of file resourceexchange.cpp.

References journal().

void ResourceExchange::deleteJournal Journal *    [virtual]
 

deletes an event from this calendar.

Definition at line 463 of file resourceexchange.cpp.

References journal().

Journal * ResourceExchange::journal const QDate   [virtual]
 

Return Journal for given date.

Definition at line 472 of file resourceexchange.cpp.

Referenced by addJournal(), and deleteJournal().

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

Return Journal with given UID.

Definition at line 480 of file resourceexchange.cpp.

Journal::List ResourceExchange::journals  
 

Return list of all Journals stored in calendar.

Definition at line 487 of file resourceexchange.cpp.

Alarm::List ResourceExchange::alarms const QDateTime   from,
const QDateTime   to
 

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

Definition at line 339 of file resourceexchange.cpp.

References QDateTime::toString().

Alarm::List ResourceExchange::alarmsTo const QDateTime   to
 

Return all alarms, which ocur before given date.

Definition at line 334 of file resourceexchange.cpp.

bool ResourceExchange::doOpen   [protected, virtual]
 

Prepare the calendar for use.

Load the calendar from disk, open connections to the calendaring server, whatever. Must be called before other methods can be called.

Definition at line 109 of file resourceexchange.cpp.

References event(), QHostAddress::setAddress(), and QApplication::topLevelWidgets().

void ResourceExchange::doClose   [protected, virtual]
 

clears out the current calendar, freeing all used memory etc.

etc.

Definition at line 144 of file resourceexchange.cpp.

Event::List ResourceExchange::rawEventsForDate const QDate   date,
bool    sorted = false
[protected]
 

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

useful for dayView, etc. etc.

Definition at line 370 of file resourceexchange.cpp.

References QDate::addMonths(), QDateTime::currentDateTime(), QMap< QDate, QDateTime >::insert(), QDate::month(), QDate::toString(), and QDate::year().

Referenced by rawEventsForDate().

Event::List ResourceExchange::rawEventsForDate const QDateTime   qdt [protected]
 

Get unfiltered events for date qdt.

Definition at line 439 of file resourceexchange.cpp.

References QDateTime::date(), and rawEventsForDate().

Event::List ResourceExchange::rawEvents const QDate   start,
const QDate   end,
bool    inclusive = false
[protected]
 

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.

Definition at line 432 of file resourceexchange.cpp.

void ResourceExchange::update IncidenceBase *    incidence [protected]
 

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

It makes sure that the calendar is internally consistent.

Definition at line 348 of file resourceexchange.cpp.

References event(), and uploadEvent().

Referenced by incidenceUpdated().

void KCal::ResourceExchange::incidenceUpdated IncidenceBase *    i [inline, protected]
 

Notification function of IncidenceBase::Observer.

Definition at line 202 of file resourceexchange.h.

References update().

void ResourceExchange::uploadEvent Event *    event [protected]
 

Append alarms of recurring events in interval to list of alarms.

Definition at line 237 of file resourceexchange.cpp.

References event().

Referenced by addEvent(), and update().


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