This class provides a calendar storage interface. More...
#include <extendedstorage.h>
Public Types | |
typedef QSharedPointer < ExtendedStorage > | Ptr |
A shared pointer to a ExtendedStorage. | |
Public Member Functions | |
ExtendedStorage (const ExtendedCalendar::Ptr &cal, bool validateNotebooks=false) | |
Constructs a new ExtendedStorage object. | |
virtual | ~ExtendedStorage () |
Destructor. | |
virtual bool | open ()=0 |
virtual bool | load ()=0 |
virtual bool | load (const QString &uid, const KDateTime &recurrenceId=KDateTime())=0 |
Load incidence by uid into the memory. | |
virtual bool | load (const QDate &date)=0 |
Load incidences at given date into the memory. | |
virtual bool | load (const QDate &start, const QDate &end)=0 |
Load incidences between given dates into the memory. | |
virtual bool | loadNotebookIncidences (const QString ¬ebookUid)=0 |
Load incidences of one notebook into the memory. | |
virtual bool | loadJournals ()=0 |
Load journal type entries. | |
virtual bool | loadPlainIncidences ()=0 |
Load plain incidences (no startdate and no enddate). | |
virtual bool | loadRecurringIncidences ()=0 |
Load recurring incidences. | |
virtual bool | loadGeoIncidences ()=0 |
Load incidences that have geo parameters. | |
virtual bool | loadGeoIncidences (float geoLatitude, float geoLongitude, float diffLatitude, float diffLongitude)=0 |
Load incidences that have geo parameters inside given rectangle. | |
virtual bool | loadAttendeeIncidences ()=0 |
Load incidences that have attendee. | |
virtual int | loadUncompletedTodos ()=0 |
Load all uncompleted todos. | |
virtual int | loadCompletedTodos (bool hasDate, int limit, KDateTime *last)=0 |
Load completed todos based on parameters. | |
virtual int | loadIncidences (bool hasDate, int limit, KDateTime *last)=0 |
Load incidences based on start/due date or creation date. | |
virtual int | loadFutureIncidences (int limit, KDateTime *last)=0 |
Load future incidences based on start/due date. | |
virtual int | loadGeoIncidences (bool hasDate, int limit, KDateTime *last)=0 |
Load incidences that have location information based on parameters. | |
virtual int | loadUnreadInvitationIncidences ()=0 |
Load all unread incidences that are related to an invitation. | |
virtual int | loadOldInvitationIncidences (int limit, KDateTime *last)=0 |
Load incidences that are related to an invitation. | |
virtual KCalCore::Person::List | loadContacts ()=0 |
Load all contacts in the database. | |
virtual int | loadContactIncidences (const KCalCore::Person::Ptr &person, int limit, KDateTime *last)=0 |
Load all incidences that have the specified attendee. | |
virtual int | loadJournals (int limit, KDateTime *last)=0 |
Load journal entries based on parameters. | |
virtual bool | save ()=0 |
virtual bool | notifyOpened (const KCalCore::Incidence::Ptr &incidence)=0 |
Mark if supported by the storage that an incidence has been opened. | |
virtual bool | cancel ()=0 |
Cancel any ongoing action (load etc. | |
virtual bool | close ()=0 |
virtual void | calendarModified (bool modified, KCalCore::Calendar *calendar)=0 |
virtual void | calendarIncidenceAdded (const KCalCore::Incidence::Ptr &incidence)=0 |
virtual void | calendarIncidenceChanged (const KCalCore::Incidence::Ptr &incidence)=0 |
virtual void | calendarIncidenceDeleted (const KCalCore::Incidence::Ptr &incidence)=0 |
virtual void | calendarIncidenceAdditionCanceled (const KCalCore::Incidence::Ptr &incidence)=0 |
virtual bool | insertedIncidences (KCalCore::Incidence::List *list, const KDateTime &after=KDateTime(), const QString ¬ebookUid=QString())=0 |
Get inserted incidences from storage. | |
virtual bool | modifiedIncidences (KCalCore::Incidence::List *list, const KDateTime &after=KDateTime(), const QString ¬ebookUid=QString())=0 |
Get modified incidences from storage. | |
virtual bool | deletedIncidences (KCalCore::Incidence::List *list, const KDateTime &after=KDateTime(), const QString ¬ebookUid=QString())=0 |
Get deleted incidences from storage. | |
virtual bool | deletedIncidencesCreatedAfter (KCalCore::Incidence::List *list, const KDateTime &after=KDateTime(), const QString ¬ebookUid=QString())=0 |
Get deleted incidences from storage, that are created and deleted after given datetime. | |
virtual bool | allIncidences (KCalCore::Incidence::List *list, const QString ¬ebookUid=QString())=0 |
Get all incidences from storage. | |
virtual bool | duplicateIncidences (KCalCore::Incidence::List *list, const KCalCore::Incidence::Ptr &incidence, const QString ¬ebookUid=QString())=0 |
Get possible duplicates for given incidence. | |
virtual KDateTime | incidenceDeletedDate (const KCalCore::Incidence::Ptr &incidence)=0 |
Get deletion time of incidence. | |
virtual int | eventCount ()=0 |
Get count of events. | |
virtual int | todoCount ()=0 |
Get count of todos. | |
virtual int | journalCount ()=0 |
Get count of journals. | |
void | registerObserver (ExtendedStorageObserver *observer) |
Registers an Observer for this Storage. | |
void | unregisterObserver (ExtendedStorageObserver *observer) |
Unregisters an Observer for this Storage. | |
bool | addNotebook (const Notebook::Ptr &nb, bool signal=true) |
Add new notebook to the storage. | |
bool | updateNotebook (const Notebook::Ptr &nb) |
Update notebook parameters. | |
bool | deleteNotebook (const Notebook::Ptr &nb, bool onlyMemory=false) |
Delete notebook from storage. | |
bool | setDefaultNotebook (const Notebook::Ptr &nb) |
setDefaultNotebook to the storage. | |
Notebook::Ptr | defaultNotebook () |
defaultNotebook. | |
Notebook::Ptr | notebook (const QString &uid) |
Search for notebook. | |
Notebook::Ptr | notebook (Notebook::List &list, const QString &uid) |
Search for notebook in a list. | |
Notebook::List | notebooks () |
List all notebooks. | |
void | setValidateNotebooks (bool validateNotebooks) |
Determine if notebooks should be validated in saves and loads. | |
bool | validateNotebooks () |
Returns true if notebooks should be validated in saves and loads. | |
bool | isValidNotebook (const QString ¬ebookUid) |
Returns true if the given notebook is valid for the storage. | |
KCalCore::Incidence::Ptr | checkAlarm (const QString &uid, const QString &recurrenceId, bool loadAlways=false) |
Checking if an incidence has active alarms. | |
void | resetAlarms (const KCalCore::Incidence::Ptr &incidence) |
Reset alarms for the incidence. | |
void | resetAlarms (const KCalCore::Incidence::List &incidences) |
Reset alarms for list of incidences. | |
void | setAlarms (const KCalCore::Incidence::Ptr &incidence) |
Set alarms for the incidence without removing old alarms. | |
void | clearAlarms (const QString ¬ebookUid) |
Remove all alarms for defined notebook. | |
Notebook::Ptr | createDefaultNotebook (QString name="", QString color="") |
Creates and sets a default notebook. | |
virtual void | virtual_hook (int id, void *data)=0 |
Standard trick to add virtuals later. | |
bool | isOwnSave () |
Returns true if the save is "own save". | |
void | setNotebookVisibility (const QString &id, bool visible) |
Sets notebook visiblity. | |
void | resetDefaultNotebook () |
Reset default notebook algorithm. | |
Protected Member Functions | |
virtual bool | loadNotebooks ()=0 |
virtual bool | reloadNotebooks ()=0 |
virtual bool | modifyNotebook (const Notebook::Ptr &nb, DBOperation dbop, bool signal=true)=0 |
bool | getLoadDates (const QDate &start, const QDate &end, KDateTime &loadStart, KDateTime &loadEnd) |
void | setLoadDates (const QDate &start, const QDate &end) |
void | setModified (const QString &info, bool mySave=false) |
void | setProgress (const QString &info) |
void | setFinished (bool error, const QString &info) |
void | clearAlarms (const KCalCore::Incidence::Ptr &incidence) |
void | clearAlarms (const KCalCore::Incidence::List &incidences) |
bool | isUncompletedTodosLoaded () |
void | setIsUncompletedTodosLoaded (bool loaded) |
bool | isCompletedTodosDateLoaded () |
void | setIsCompletedTodosDateLoaded (bool loaded) |
bool | isCompletedTodosCreatedLoaded () |
void | setIsCompletedTodosCreatedLoaded (bool loaded) |
bool | isJournalsLoaded () |
void | setIsJournalsLoaded (bool loaded) |
bool | isDateLoaded () |
void | setIsDateLoaded (bool loaded) |
bool | isCreatedLoaded () |
void | setIsCreatedLoaded (bool loaded) |
bool | isFutureDateLoaded () |
void | setIsFutureDateLoaded (bool loaded) |
bool | isGeoDateLoaded () |
void | setIsGeoDateLoaded (bool loaded) |
bool | isGeoCreatedLoaded () |
void | setIsGeoCreatedLoaded (bool loaded) |
bool | isUnreadIncidencesLoaded () |
void | setIsUnreadIncidencesLoaded (bool loaded) |
bool | isInvitationIncidencesLoaded () |
void | setIsInvitationIncidencesLoaded (bool loaded) |
void | clearLoaded (bool mySave=false) |
Static Protected Member Functions | |
static bool | notebookModifiedEarlierThan (const Notebook::Ptr &nb1, const Notebook::Ptr &nb2) |
This class provides a calendar storage interface.
Every action on the storage can be asynchronous, which means that actions are only scheduled for execution. Caller must use ExtendedStorageObserver to get notified about the completion.
typedef QSharedPointer<ExtendedStorage> mKCal::ExtendedStorage::Ptr |
A shared pointer to a ExtendedStorage.
Reimplemented in mKCal::SqliteStorage.
ExtendedStorage::ExtendedStorage | ( | const ExtendedCalendar::Ptr & | cal, | |
bool | validateNotebooks = false | |||
) | [explicit] |
Constructs a new ExtendedStorage object.
Private class that helps to provide binary compatibility between releases.
cal | is a pointer to a valid Calendar object. | |
validateNotebooks | set to true for loading/saving only those incidences that belong to an existing notebook of this storage |
GRP::calendar TrackerWriteAccess
ExtendedStorage::~ExtendedStorage | ( | ) | [virtual] |
Destructor.
bool ExtendedStorage::addNotebook | ( | const Notebook::Ptr & | nb, | |
bool | signal = true | |||
) |
Add new notebook to the storage.
Notebook object is owned by the storage if operation succeeds. Operation is executed immediately into storage,
nb | notebook | |
signal | for modifynotebook. Default true, false only when database is initialized |
virtual bool mKCal::ExtendedStorage::allIncidences | ( | KCalCore::Incidence::List * | list, | |
const QString & | notebookUid = QString() | |||
) | [pure virtual] |
Get all incidences from storage.
list | notebook's incidences | |
notebookUid | list incidences for given notebook |
Implemented in DummyStorage, and mKCal::SqliteStorage.
virtual void mKCal::ExtendedStorage::calendarIncidenceAdded | ( | const KCalCore::Incidence::Ptr & | incidence | ) | [pure virtual] |
Implemented in DummyStorage, and mKCal::SqliteStorage.
virtual void mKCal::ExtendedStorage::calendarIncidenceAdditionCanceled | ( | const KCalCore::Incidence::Ptr & | incidence | ) | [pure virtual] |
Implemented in DummyStorage, and mKCal::SqliteStorage.
virtual void mKCal::ExtendedStorage::calendarIncidenceChanged | ( | const KCalCore::Incidence::Ptr & | incidence | ) | [pure virtual] |
Implemented in DummyStorage, and mKCal::SqliteStorage.
virtual void mKCal::ExtendedStorage::calendarIncidenceDeleted | ( | const KCalCore::Incidence::Ptr & | incidence | ) | [pure virtual] |
Implemented in DummyStorage, and mKCal::SqliteStorage.
virtual void mKCal::ExtendedStorage::calendarModified | ( | bool | modified, | |
KCalCore::Calendar * | calendar | |||
) | [pure virtual] |
Implemented in DummyStorage, and mKCal::SqliteStorage.
virtual bool mKCal::ExtendedStorage::cancel | ( | ) | [pure virtual] |
Cancel any ongoing action (load etc.
).
Implemented in DummyStorage, and mKCal::SqliteStorage.
Incidence::Ptr ExtendedStorage::checkAlarm | ( | const QString & | uid, | |
const QString & | recurrenceId, | |||
bool | loadAlways = false | |||
) |
Checking if an incidence has active alarms.
Application can use this function for getting the incidence in question, for example, displaying the incidence after an alarm.
uid | uid | |
recurrenceId | recurrenceId | |
loadAlways | set true to load always from storage |
void mKCal::ExtendedStorage::clearAlarms | ( | const KCalCore::Incidence::Ptr & | incidence | ) | [protected] |
void ExtendedStorage::clearAlarms | ( | const KCalCore::Incidence::List & | incidences | ) | [protected] |
void ExtendedStorage::clearAlarms | ( | const QString & | notebookUid | ) |
Remove all alarms for defined notebook.
void ExtendedStorage::clearLoaded | ( | bool | mySave = false |
) | [protected] |
virtual bool mKCal::ExtendedStorage::close | ( | ) | [pure virtual] |
Implemented in DummyStorage, and mKCal::SqliteStorage.
Notebook::Ptr ExtendedStorage::createDefaultNotebook | ( | QString | name = "" , |
|
QString | color = "" | |||
) |
Creates and sets a default notebook.
Usually called for an empty calendar.
name | notebook's name, if empty default used | |
color | notebook's color in format "#FF0042", if empty default used |
Notebook::Ptr ExtendedStorage::defaultNotebook | ( | ) |
defaultNotebook.
virtual bool mKCal::ExtendedStorage::deletedIncidences | ( | KCalCore::Incidence::List * | list, | |
const KDateTime & | after = KDateTime() , |
|||
const QString & | notebookUid = QString() | |||
) | [pure virtual] |
Get deleted incidences from storage.
list | deleted incidences | |
after | list only incidences deleted after or at given datetime and created before given datetime | |
notebookUid | list only incidences for given notebook |
Implemented in DummyStorage, and mKCal::SqliteStorage.
virtual bool mKCal::ExtendedStorage::deletedIncidencesCreatedAfter | ( | KCalCore::Incidence::List * | list, | |
const KDateTime & | after = KDateTime() , |
|||
const QString & | notebookUid = QString() | |||
) | [pure virtual] |
Get deleted incidences from storage, that are created and deleted after given datetime.
list | deleted incidences | |
after | list only incidences deleted after or at given datetime | |
notebookUid | list only incidences for given notebook |
Implemented in DummyStorage, and mKCal::SqliteStorage.
bool ExtendedStorage::deleteNotebook | ( | const Notebook::Ptr & | nb, | |
bool | onlyMemory = false | |||
) |
Delete notebook from storage.
Operation is executed immediately into storage,
nb | notebook | |
onlyMemory. | If true deleting notebooks only from memory but not from database. Default false, true only when notebooks are reloaded from database |
virtual bool mKCal::ExtendedStorage::duplicateIncidences | ( | KCalCore::Incidence::List * | list, | |
const KCalCore::Incidence::Ptr & | incidence, | |||
const QString & | notebookUid = QString() | |||
) | [pure virtual] |
Get possible duplicates for given incidence.
list | duplicate incidences | |
incidence | incidence to check | |
notebookUid | list incidences for given notebook |
Implemented in DummyStorage, and mKCal::SqliteStorage.
virtual int mKCal::ExtendedStorage::eventCount | ( | ) | [pure virtual] |
bool ExtendedStorage::getLoadDates | ( | const QDate & | start, | |
const QDate & | end, | |||
KDateTime & | loadStart, | |||
KDateTime & | loadEnd | |||
) | [protected] |
virtual KDateTime mKCal::ExtendedStorage::incidenceDeletedDate | ( | const KCalCore::Incidence::Ptr & | incidence | ) | [pure virtual] |
Get deletion time of incidence.
incidence | incidence to check |
Implemented in DummyStorage, and mKCal::SqliteStorage.
virtual bool mKCal::ExtendedStorage::insertedIncidences | ( | KCalCore::Incidence::List * | list, | |
const KDateTime & | after = KDateTime() , |
|||
const QString & | notebookUid = QString() | |||
) | [pure virtual] |
Get inserted incidences from storage.
NOTE: time stamps assigned by KCalExtended are created during save(). To obtain a time stamp that is guaranteed to not included recent changes, sleep for a second or increment the current time by a second.
list | inserted incidences | |
after | list only incidences inserted after or at given datetime | |
notebookUid | list only incidences for given notebook |
Implemented in DummyStorage, and mKCal::SqliteStorage.
bool ExtendedStorage::isCompletedTodosCreatedLoaded | ( | ) | [protected] |
bool ExtendedStorage::isCompletedTodosDateLoaded | ( | ) | [protected] |
bool ExtendedStorage::isCreatedLoaded | ( | ) | [protected] |
bool ExtendedStorage::isDateLoaded | ( | ) | [protected] |
bool ExtendedStorage::isFutureDateLoaded | ( | ) | [protected] |
bool ExtendedStorage::isGeoCreatedLoaded | ( | ) | [protected] |
bool ExtendedStorage::isGeoDateLoaded | ( | ) | [protected] |
bool ExtendedStorage::isInvitationIncidencesLoaded | ( | ) | [protected] |
bool ExtendedStorage::isJournalsLoaded | ( | ) | [protected] |
bool ExtendedStorage::isOwnSave | ( | ) |
Returns true if the save is "own save".
bool ExtendedStorage::isUncompletedTodosLoaded | ( | ) | [protected] |
bool ExtendedStorage::isUnreadIncidencesLoaded | ( | ) | [protected] |
bool ExtendedStorage::isValidNotebook | ( | const QString & | notebookUid | ) |
Returns true if the given notebook is valid for the storage.
That means that storage can load/save incidences on this notebook.
notebookUid | notebook uid |
virtual int mKCal::ExtendedStorage::journalCount | ( | ) | [pure virtual] |
Get count of journals.
Implemented in DummyStorage, and mKCal::SqliteStorage.
virtual bool mKCal::ExtendedStorage::load | ( | const QDate & | date | ) | [pure virtual] |
Load incidences at given date into the memory.
date | date |
Implemented in DummyStorage, and mKCal::SqliteStorage.
virtual bool mKCal::ExtendedStorage::load | ( | const QDate & | start, | |
const QDate & | end | |||
) | [pure virtual] |
Load incidences between given dates into the memory.
start | is the starting date | |
end | is the ending date |
Implemented in DummyStorage, and mKCal::SqliteStorage.
virtual bool mKCal::ExtendedStorage::load | ( | const QString & | uid, | |
const KDateTime & | recurrenceId = KDateTime() | |||
) | [pure virtual] |
Load incidence by uid into the memory.
uid | is uid of incidence | |
recurrenceid | is recurrenceid of incidence, default null |
Implemented in DummyStorage, and mKCal::SqliteStorage.
virtual bool mKCal::ExtendedStorage::load | ( | ) | [pure virtual] |
Implemented in DummyStorage, and mKCal::SqliteStorage.
virtual bool mKCal::ExtendedStorage::loadAttendeeIncidences | ( | ) | [pure virtual] |
Load incidences that have attendee.
Implemented in DummyStorage, and mKCal::SqliteStorage.
virtual int mKCal::ExtendedStorage::loadCompletedTodos | ( | bool | hasDate, | |
int | limit, | |||
KDateTime * | last | |||
) | [pure virtual] |
Load completed todos based on parameters.
Load direction is descending, i.e., starting from most distant upcoming todo.
hasDate | set true to load todos that have due date | |
limit | load only that many todos | |
last | last loaded todo due/creation date in return |
Implemented in DummyStorage, and mKCal::SqliteStorage.
virtual int mKCal::ExtendedStorage::loadContactIncidences | ( | const KCalCore::Person::Ptr & | person, | |
int | limit, | |||
KDateTime * | last | |||
) | [pure virtual] |
Load all incidences that have the specified attendee.
Also includes all shared notes (in a shared notebook).
person | person in question | |
limit | load only that many incidences | |
last | last loaded incidence due/creation date in return |
Implemented in DummyStorage, and mKCal::SqliteStorage.
virtual KCalCore::Person::List mKCal::ExtendedStorage::loadContacts | ( | ) | [pure virtual] |
Load all contacts in the database.
Doesn't put anything into calendar. Resulting list of persons is ordered by the number of appearances. Use Person::count to get the number of appearances.
Implemented in DummyStorage, and mKCal::SqliteStorage.
virtual int mKCal::ExtendedStorage::loadFutureIncidences | ( | int | limit, | |
KDateTime * | last | |||
) | [pure virtual] |
Load future incidences based on start/due date.
Load direction is ascending, i.e., starting from the oldest event that is still valid at the day of the loadIncidences call. (=end time > 00:00:00 on that day).
limit | load only that many incidences | |
last | last loaded incidence start date in return |
Implemented in DummyStorage, and mKCal::SqliteStorage.
virtual int mKCal::ExtendedStorage::loadGeoIncidences | ( | bool | hasDate, | |
int | limit, | |||
KDateTime * | last | |||
) | [pure virtual] |
Load incidences that have location information based on parameters.
Load direction is descending, i.e., starting from most distant upcoming incidence.
hasDate | set true to load incidences that have start/due date | |
limit | load only that many incidences | |
last | last loaded incidence due/creation date in return |
Implemented in DummyStorage, and mKCal::SqliteStorage.
virtual bool mKCal::ExtendedStorage::loadGeoIncidences | ( | ) | [pure virtual] |
Load incidences that have geo parameters.
Implemented in DummyStorage, and mKCal::SqliteStorage.
virtual bool mKCal::ExtendedStorage::loadGeoIncidences | ( | float | geoLatitude, | |
float | geoLongitude, | |||
float | diffLatitude, | |||
float | diffLongitude | |||
) | [pure virtual] |
Load incidences that have geo parameters inside given rectangle.
geoLatitude | latitude | |
geoLongitude | longitude | |
diffLatitude | maximum latitudinal difference | |
diffLongitude | maximum longitudinal difference |
Implemented in DummyStorage, and mKCal::SqliteStorage.
virtual int mKCal::ExtendedStorage::loadIncidences | ( | bool | hasDate, | |
int | limit, | |||
KDateTime * | last | |||
) | [pure virtual] |
Load incidences based on start/due date or creation date.
Load direction is descending, i.e., starting from most distant upcoming incidence.
hasDate | set true to load incidences that have start/due date | |
limit | load only that many incidences | |
last | last loaded incidence due/creation date in return |
Implemented in DummyStorage, and mKCal::SqliteStorage.
virtual int mKCal::ExtendedStorage::loadJournals | ( | int | limit, | |
KDateTime * | last | |||
) | [pure virtual] |
Load journal entries based on parameters.
Load direction is descending, i.e. starting from the most recently modified journal.
limit | load only that many incidences | |
last | last loaded incidence due/creation date in return |
Implemented in DummyStorage, and mKCal::SqliteStorage.
virtual bool mKCal::ExtendedStorage::loadJournals | ( | ) | [pure virtual] |
Load journal type entries.
Implemented in DummyStorage, and mKCal::SqliteStorage.
virtual bool mKCal::ExtendedStorage::loadNotebookIncidences | ( | const QString & | notebookUid | ) | [pure virtual] |
Load incidences of one notebook into the memory.
notebookUid | is uid of notebook |
Implemented in DummyStorage, and mKCal::SqliteStorage.
virtual bool mKCal::ExtendedStorage::loadNotebooks | ( | ) | [protected, pure virtual] |
Implemented in DummyStorage, and mKCal::SqliteStorage.
virtual int mKCal::ExtendedStorage::loadOldInvitationIncidences | ( | int | limit, | |
KDateTime * | last | |||
) | [pure virtual] |
Load incidences that are related to an invitation.
Load direction is descending, i.e., starting from most distant upcoming incidence.
limit | load only that many incidences | |
last | last loaded incidence due/creation date in return |
Implemented in DummyStorage, and mKCal::SqliteStorage.
virtual bool mKCal::ExtendedStorage::loadPlainIncidences | ( | ) | [pure virtual] |
Load plain incidences (no startdate and no enddate).
Implemented in DummyStorage, and mKCal::SqliteStorage.
virtual bool mKCal::ExtendedStorage::loadRecurringIncidences | ( | ) | [pure virtual] |
Load recurring incidences.
Implemented in DummyStorage, and mKCal::SqliteStorage.
virtual int mKCal::ExtendedStorage::loadUncompletedTodos | ( | ) | [pure virtual] |
Load all uncompleted todos.
Implemented in DummyStorage, and mKCal::SqliteStorage.
virtual int mKCal::ExtendedStorage::loadUnreadInvitationIncidences | ( | ) | [pure virtual] |
Load all unread incidences that are related to an invitation.
Implemented in DummyStorage, and mKCal::SqliteStorage.
virtual bool mKCal::ExtendedStorage::modifiedIncidences | ( | KCalCore::Incidence::List * | list, | |
const KDateTime & | after = KDateTime() , |
|||
const QString & | notebookUid = QString() | |||
) | [pure virtual] |
Get modified incidences from storage.
NOTE: if an incidence is both created and modified after the given time, it will be returned in insertedIncidences only, not here!
list | modified incidences | |
after | list only incidences modified after or at given datetime | |
notebookUid | list only incidences for given notebook |
Implemented in DummyStorage, and mKCal::SqliteStorage.
virtual bool mKCal::ExtendedStorage::modifyNotebook | ( | const Notebook::Ptr & | nb, | |
DBOperation | dbop, | |||
bool | signal = true | |||
) | [protected, pure virtual] |
Implemented in DummyStorage, and mKCal::SqliteStorage.
Notebook::Ptr ExtendedStorage::notebook | ( | const QString & | uid | ) |
Search for notebook.
uid | notebook uid |
Notebook::Ptr mKCal::ExtendedStorage::notebook | ( | Notebook::List & | list, | |
const QString & | uid | |||
) |
Search for notebook in a list.
list | notebook list | |
uid | notebook uid |
bool ExtendedStorage::notebookModifiedEarlierThan | ( | const Notebook::Ptr & | nb1, | |
const Notebook::Ptr & | nb2 | |||
) | [static, protected] |
Notebook::List ExtendedStorage::notebooks | ( | ) |
List all notebooks.
virtual bool mKCal::ExtendedStorage::notifyOpened | ( | const KCalCore::Incidence::Ptr & | incidence | ) | [pure virtual] |
Mark if supported by the storage that an incidence has been opened.
This should be called only if the Incidence has been opened by the user and displayed all the contents. Being in a list doesn't qualify for it.
incidence | The incidence that has been opened |
Implemented in DummyStorage, and mKCal::SqliteStorage.
virtual bool mKCal::ExtendedStorage::open | ( | ) | [pure virtual] |
Implemented in DummyStorage, and mKCal::SqliteStorage.
void ExtendedStorage::registerObserver | ( | ExtendedStorageObserver * | observer | ) |
Registers an Observer for this Storage.
observer | is a pointer to an Observer object that will be watching this Storage. |
virtual bool mKCal::ExtendedStorage::reloadNotebooks | ( | ) | [protected, pure virtual] |
Implemented in DummyStorage, and mKCal::SqliteStorage.
void mKCal::ExtendedStorage::resetAlarms | ( | const KCalCore::Incidence::Ptr & | incidence | ) |
Reset alarms for the incidence.
This function will be called automatically if application changes incidence alarms and calls save. Alarm information is communicated via DBus to the new timed, which will call the notification dialog when alarm triggers. If user presses open on the dialog, a DBus call is made to organiser application for displaying the incidence in question. See the documentation in extendedcalendar.h for the general architecture.
incidence | incidence |
void mKCal::ExtendedStorage::resetAlarms | ( | const KCalCore::Incidence::List & | incidences | ) |
Reset alarms for list of incidences.
void ExtendedStorage::resetDefaultNotebook | ( | ) |
Reset default notebook algorithm.
virtual bool mKCal::ExtendedStorage::save | ( | ) | [pure virtual] |
Implemented in DummyStorage, and mKCal::SqliteStorage.
void mKCal::ExtendedStorage::setAlarms | ( | const KCalCore::Incidence::Ptr & | incidence | ) |
Set alarms for the incidence without removing old alarms.
This is the same as resetAlarms except that the old alarms are not removed.
bool ExtendedStorage::setDefaultNotebook | ( | const Notebook::Ptr & | nb | ) |
setDefaultNotebook to the storage.
nb | notebook |
void ExtendedStorage::setFinished | ( | bool | error, | |
const QString & | info | |||
) | [protected] |
void ExtendedStorage::setIsCompletedTodosCreatedLoaded | ( | bool | loaded | ) | [protected] |
void ExtendedStorage::setIsCompletedTodosDateLoaded | ( | bool | loaded | ) | [protected] |
void ExtendedStorage::setIsCreatedLoaded | ( | bool | loaded | ) | [protected] |
void ExtendedStorage::setIsDateLoaded | ( | bool | loaded | ) | [protected] |
void ExtendedStorage::setIsFutureDateLoaded | ( | bool | loaded | ) | [protected] |
void ExtendedStorage::setIsGeoCreatedLoaded | ( | bool | loaded | ) | [protected] |
void ExtendedStorage::setIsGeoDateLoaded | ( | bool | loaded | ) | [protected] |
void ExtendedStorage::setIsInvitationIncidencesLoaded | ( | bool | loaded | ) | [protected] |
void ExtendedStorage::setIsJournalsLoaded | ( | bool | loaded | ) | [protected] |
void ExtendedStorage::setIsUncompletedTodosLoaded | ( | bool | loaded | ) | [protected] |
void ExtendedStorage::setIsUnreadIncidencesLoaded | ( | bool | loaded | ) | [protected] |
void ExtendedStorage::setLoadDates | ( | const QDate & | start, | |
const QDate & | end | |||
) | [protected] |
void ExtendedStorage::setModified | ( | const QString & | info, | |
bool | mySave = false | |||
) | [protected] |
void ExtendedStorage::setNotebookVisibility | ( | const QString & | id, | |
bool | visible | |||
) |
Sets notebook visiblity.
id | notebook id | |
visible | visiblity state if true notebook visible and false otherwise |
void ExtendedStorage::setProgress | ( | const QString & | info | ) | [protected] |
void ExtendedStorage::setValidateNotebooks | ( | bool | validateNotebooks | ) |
Determine if notebooks should be validated in saves and loads.
That means that storage can only load/save incidences into/from existing notebooks.
validate | true to validate |
virtual int mKCal::ExtendedStorage::todoCount | ( | ) | [pure virtual] |
void ExtendedStorage::unregisterObserver | ( | ExtendedStorageObserver * | observer | ) |
Unregisters an Observer for this Storage.
observer | is a pointer to an Observer object that has been watching this Storage. |
bool ExtendedStorage::updateNotebook | ( | const Notebook::Ptr & | nb | ) |
Update notebook parameters.
Operation is executed immediately into storage,
nb | notebook |
bool ExtendedStorage::validateNotebooks | ( | ) |
Returns true if notebooks should be validated in saves and loads.
That means that storage can only load/save incidences into/from existing notebooks.
virtual void mKCal::ExtendedStorage::virtual_hook | ( | int | id, | |
void * | data | |||
) | [pure virtual] |
Standard trick to add virtuals later.
id | is any integer unique to this class which we will use to identify the method to be called. | |
data | is a pointer to some glob of data, typically a struct. |
Implemented in DummyStorage, and mKCal::SqliteStorage.