KCal::ResourceRemote Class Reference
This class provides a calendar stored as a remote file. More...
#include <resourceremote.h>
Inheritance diagram for KCal::ResourceRemote:

Public Types | |
enum | { ReloadNever, ReloadOnStartup, ReloadOnceADay, ReloadAlways } |
Public Methods | |
ResourceRemote (const KConfig *) | |
ResourceRemote (const KURL &downloadUrl, const KURL &uploadUrl=KURL()) | |
virtual | ~ResourceRemote () |
void | readConfig (const KConfig *config) |
void | writeConfig (KConfig *config) |
void | setDownloadUrl (const KURL &) |
KURL | downloadUrl () const |
void | setUploadUrl (const KURL &) |
KURL | uploadUrl () const |
void | setReloadPolicy (int policy) |
int | reloadPolicy () const |
QString | cacheFile () |
bool | load () |
bool | save () |
KABC::Lock * | lock () |
bool | isSaving () |
void | dump () const |
Protected Slots | |
void | slotLoadJobResult (KIO::Job *) |
void | slotSaveJobResult (KIO::Job *) |
Protected Methods | |
bool | doOpen () |
void | doClose () |
virtual void | update (IncidenceBase *incidence) |
Detailed Description
This class provides a calendar stored as a remote file.
Definition at line 48 of file resourceremote.h.
Member Enumeration Documentation
|
Reload policy.
Definition at line 60 of file resourceremote.h. |
Constructor & Destructor Documentation
|
Create resource from configuration information stored in KConfig object.
Definition at line 55 of file resourceremote.cpp. |
|
Create remote resource.
Definition at line 65 of file resourceremote.cpp. |
Member Function Documentation
|
Set reload policy. This controls when the remote file is downloaded. ReloadNever never reload ReloadOnStartup reload when resource is loaded ReloadOnceADay reload once a day ReloadAlways reload whenever the resource is accessed Definition at line 144 of file resourceremote.cpp. |
|
Return reload policy.
Definition at line 149 of file resourceremote.cpp. |
|
Return name of file used as cache for remote file.
Definition at line 154 of file resourceremote.cpp. |
|
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 170 of file resourceremote.cpp. References cacheFile(), KCal::CalendarLocal::close(), and KCal::CalendarLocal::load(). |
|
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 216 of file resourceremote.cpp. References cacheFile(), KCal::ResourceCalendar::resourceSaved(), and KCal::CalendarLocal::save(). |
|
Return object for locking the resource.
Implements KCal::ResourceCalendar. Definition at line 273 of file resourceremote.cpp. |
|
Return true if a save operation is still in progress, otherwise return false.
Reimplemented from KCal::ResourceCalendar. Definition at line 247 of file resourceremote.cpp. |
|
clears out the current calendar, freeing all used memory etc. etc. Definition at line 265 of file resourceremote.cpp. References KCal::CalendarLocal::close(). |
|
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 278 of file resourceremote.cpp. |
The documentation for this class was generated from the following files: