Public Member Functions | List of all members
DummyStorage Class Reference

This module provides a simple storage abstraction which contains exactly nothing. More...

#include <dummystorage.h>

Inheritance diagram for DummyStorage:
Inheritance graph
[legend]

Public Member Functions

 DummyStorage (const mKCal::ExtendedCalendar::Ptr &cal)
 
void calendarModified (bool, KCalendarCore::Calendar *)
 
void calendarIncidenceAdded (const KCalendarCore::Incidence::Ptr &)
 
void calendarIncidenceChanged (const KCalendarCore::Incidence::Ptr &)
 
void calendarIncidenceDeleted (const KCalendarCore::Incidence::Ptr &, const KCalendarCore::Calendar *)
 
void calendarIncidenceAdditionCanceled (const KCalendarCore::Incidence::Ptr &)
 
bool purgeDeletedIncidences (const KCalendarCore::Incidence::List &)
 Remove from storage all incidences that have been previously marked as deleted and that matches the UID / RecID of the incidences in list. More...
 
bool open ()
 
bool load ()
 
bool save ()
 
bool save (DeleteAction)
 This is an overload of save() method. More...
 
bool close ()
 
bool load (const QString &, const QDateTime &)
 Load incidence by uid into the memory. More...
 
bool load (const QDate &)
 Load incidences at given date into the memory. More...
 
bool load (const QDate &, const QDate &)
 Load incidences between given dates into the memory. More...
 
bool loadSeries (const QString &)
 Load all incidences sharing the same uid into the memory. More...
 
bool loadIncidenceInstance (const QString &)
 Load the incidence matching the given identifier. More...
 
bool loadNotebookIncidences (const QString &)
 Load incidences of one notebook into the memory. More...
 
bool loadJournals ()
 Load journal type entries. More...
 
bool loadPlainIncidences ()
 Load plain incidences (no startdate and no enddate). More...
 
bool loadRecurringIncidences ()
 Load recurring incidences. More...
 
bool loadGeoIncidences ()
 Load incidences that have geo parameters. More...
 
bool loadGeoIncidences (float, float, float, float)
 Load incidences that have geo parameters inside given rectangle. More...
 
bool loadAttendeeIncidences ()
 Load incidences that have attendee. More...
 
int loadUncompletedTodos ()
 Load all uncompleted todos. More...
 
int loadCompletedTodos (bool, int, QDateTime *)
 Load completed todos based on parameters. More...
 
int loadIncidences (bool, int, QDateTime *)
 Load incidences based on start/due date or creation date. More...
 
int loadFutureIncidences (int, QDateTime *)
 Load future incidences based on start/due date. More...
 
int loadGeoIncidences (bool, int, QDateTime *)
 Load incidences that have location information based on parameters. More...
 
int loadUnreadInvitationIncidences ()
 
int loadOldInvitationIncidences (int, QDateTime *)
 
KCalendarCore::Person::List loadContacts ()
 Load all contacts in the database. More...
 
int loadContactIncidences (const KCalendarCore::Person &, int, QDateTime *)
 Load all incidences that have the specified attendee. More...
 
int loadJournals (int, QDateTime *)
 Load journal entries based on parameters. More...
 
bool notifyOpened (const KCalendarCore::Incidence::Ptr &)
 Mark if supported by the storage that an incidence has been opened. More...
 
bool cancel ()
 Cancel any ongoing action (load etc.). More...
 
void calendarModified (bool, const KCalendarCore::Calendar *) const
 
void calendarIncidenceAdded (const KCalendarCore::Incidence::Ptr &) const
 
void calendarIncidenceChanged (const KCalendarCore::Incidence::Ptr &) const
 
void calendarIncidenceDeleted (const KCalendarCore::Incidence::Ptr &) const
 
void calendarIncidenceAdditionCanceled (const KCalendarCore::Incidence::Ptr &) const
 
bool insertedIncidences (KCalendarCore::Incidence::List *, const QDateTime &, const QString &)
 Get inserted incidences from storage. More...
 
bool modifiedIncidences (KCalendarCore::Incidence::List *, const QDateTime &, const QString &)
 Get modified incidences from storage. More...
 
bool deletedIncidences (KCalendarCore::Incidence::List *, const QDateTime &, const QString &)
 Get deleted incidences from storage. More...
 
bool allIncidences (KCalendarCore::Incidence::List *, const QString &)
 Get all incidences from storage. More...
 
bool duplicateIncidences (KCalendarCore::Incidence::List *, const KCalendarCore::Incidence::Ptr &, const QString &)
 Get possible duplicates for given incidence. More...
 
bool loadNotebooks ()
 
bool modifyNotebook (const mKCal::Notebook::Ptr &, mKCal::DBOperation)
 
QDateTime incidenceDeletedDate (const KCalendarCore::Incidence::Ptr &)
 Get deletion time of incidence. More...
 
int eventCount ()
 Get count of events. More...
 
int todoCount ()
 Get count of todos. More...
 
int journalCount ()
 Get count of journals. More...
 
void virtual_hook (int, void *)
 Standard trick to add virtuals later. More...
 
- Public Member Functions inherited from mKCal::ExtendedStorage
 ExtendedStorage (const ExtendedCalendar::Ptr &cal, bool validateNotebooks=true)
 Constructs a new ExtendedStorage object. More...
 
virtual ~ExtendedStorage ()
 Destructor. More...
 
virtual bool open ()=0
 
virtual bool load ()=0
 
virtual bool load (const QString &uid, const QDateTime &recurrenceId=QDateTime())=0
 Load incidence by uid into the memory. More...
 
virtual bool load (const QDate &date)=0
 Load incidences at given date into the memory. More...
 
virtual bool load (const QDate &start, const QDate &end)=0
 Load incidences between given dates into the memory. More...
 
virtual bool loadSeries (const QString &uid)=0
 Load all incidences sharing the same uid into the memory. More...
 
virtual bool loadIncidenceInstance (const QString &instanceIdentifier)=0
 Load the incidence matching the given identifier. More...
 
virtual bool loadNotebookIncidences (const QString &notebookUid)=0
 Load incidences of one notebook into the memory. More...
 
virtual bool loadJournals ()=0
 Load journal type entries. More...
 
virtual bool loadPlainIncidences ()=0
 Load plain incidences (no startdate and no enddate). More...
 
virtual bool loadRecurringIncidences ()=0
 Load recurring incidences. More...
 
virtual bool loadGeoIncidences ()=0
 Load incidences that have geo parameters. More...
 
virtual bool loadGeoIncidences (float geoLatitude, float geoLongitude, float diffLatitude, float diffLongitude)=0
 Load incidences that have geo parameters inside given rectangle. More...
 
virtual bool loadAttendeeIncidences ()=0
 Load incidences that have attendee. More...
 
virtual int loadUncompletedTodos ()=0
 Load all uncompleted todos. More...
 
virtual int loadCompletedTodos (bool hasDate, int limit, QDateTime *last)=0
 Load completed todos based on parameters. More...
 
virtual int loadIncidences (bool hasDate, int limit, QDateTime *last)=0
 Load incidences based on start/due date or creation date. More...
 
virtual int loadFutureIncidences (int limit, QDateTime *last)=0
 Load future incidences based on start/due date. More...
 
virtual int loadGeoIncidences (bool hasDate, int limit, QDateTime *last)=0
 Load incidences that have location information based on parameters. More...
 
virtual KCalendarCore::Person::List loadContacts ()=0
 Load all contacts in the database. More...
 
virtual int loadContactIncidences (const KCalendarCore::Person &person, int limit, QDateTime *last)=0
 Load all incidences that have the specified attendee. More...
 
virtual int loadJournals (int limit, QDateTime *last)=0
 Load journal entries based on parameters. More...
 
virtual bool purgeDeletedIncidences (const KCalendarCore::Incidence::List &list)=0
 Remove from storage all incidences that have been previously marked as deleted and that matches the UID / RecID of the incidences in list. More...
 
virtual bool save ()=0
 
virtual bool save (DeleteAction deleteAction)=0
 This is an overload of save() method. More...
 
virtual bool notifyOpened (const KCalendarCore::Incidence::Ptr &incidence)=0
 Mark if supported by the storage that an incidence has been opened. More...
 
virtual bool cancel ()=0
 Cancel any ongoing action (load etc.). More...
 
virtual bool close ()
 
virtual void calendarModified (bool modified, KCalendarCore::Calendar *calendar)=0
 
virtual void calendarIncidenceAdded (const KCalendarCore::Incidence::Ptr &incidence)=0
 
virtual void calendarIncidenceChanged (const KCalendarCore::Incidence::Ptr &incidence)=0
 
virtual void calendarIncidenceDeleted (const KCalendarCore::Incidence::Ptr &incidence, const KCalendarCore::Calendar *calendar)=0
 
virtual void calendarIncidenceAdditionCanceled (const KCalendarCore::Incidence::Ptr &incidence)=0
 
virtual bool insertedIncidences (KCalendarCore::Incidence::List *list, const QDateTime &after=QDateTime(), const QString &notebookUid=QString())=0
 Get inserted incidences from storage. More...
 
virtual bool modifiedIncidences (KCalendarCore::Incidence::List *list, const QDateTime &after=QDateTime(), const QString &notebookUid=QString())=0
 Get modified incidences from storage. More...
 
virtual bool deletedIncidences (KCalendarCore::Incidence::List *list, const QDateTime &after=QDateTime(), const QString &notebookUid=QString())=0
 Get deleted incidences from storage. More...
 
virtual bool allIncidences (KCalendarCore::Incidence::List *list, const QString &notebookUid=QString())=0
 Get all incidences from storage. More...
 
virtual bool duplicateIncidences (KCalendarCore::Incidence::List *list, const KCalendarCore::Incidence::Ptr &incidence, const QString &notebookUid=QString())=0
 Get possible duplicates for given incidence. More...
 
virtual QDateTime incidenceDeletedDate (const KCalendarCore::Incidence::Ptr &incidence)=0
 Get deletion time of incidence. More...
 
virtual int eventCount ()=0
 Get count of events. More...
 
virtual int todoCount ()=0
 Get count of todos. More...
 
virtual int journalCount ()=0
 Get count of journals. More...
 
void registerObserver (ExtendedStorageObserver *observer)
 Registers an Observer for this Storage. More...
 
void unregisterObserver (ExtendedStorageObserver *observer)
 Unregisters an Observer for this Storage. More...
 
bool addNotebook (const Notebook::Ptr &nb)
 Add new notebook to the storage. More...
 
bool updateNotebook (const Notebook::Ptr &nb)
 Update notebook parameters. More...
 
bool deleteNotebook (const Notebook::Ptr &nb)
 Delete notebook from storage. More...
 
bool setDefaultNotebook (const Notebook::Ptr &nb)
 setDefaultNotebook to the storage. More...
 
Notebook::Ptr defaultNotebook ()
 defaultNotebook. More...
 
Notebook::Ptr notebook (const QString &uid)
 Search for notebook. More...
 
Notebook::Ptr notebook (Notebook::List &list, const QString &uid)
 Search for notebook in a list. More...
 
Notebook::List notebooks ()
 List all notebooks. More...
 
void setValidateNotebooks (bool validateNotebooks)
 Determine if notebooks should be validated in saves and loads. More...
 
bool validateNotebooks ()
 Returns true if notebooks should be validated in saves and loads. More...
 
bool isValidNotebook (const QString &notebookUid)
 Returns true if the given notebook is valid for the storage. More...
 
KCalendarCore::Incidence::Ptr checkAlarm (const QString &uid, const QString &recurrenceId, bool loadAlways=false)
 Checking if an incidence has active alarms. More...
 
Notebook::Ptr createDefaultNotebook (QString name=QString(), QString color=QString())
 Creates and sets a default notebook. More...
 
virtual void virtual_hook (int id, void *data)=0
 Standard trick to add virtuals later. More...
 

Additional Inherited Members

- Public Types inherited from mKCal::ExtendedStorage
enum  DeleteAction { MarkDeleted , PurgeDeleted }
 Action to be performed on save for deleted incidences. More...
 
typedef QSharedPointer< ExtendedStoragePtr
 A shared pointer to a ExtendedStorage. More...
 
- Protected Member Functions inherited from mKCal::ExtendedStorage
virtual bool loadNotebooks ()=0
 
virtual bool modifyNotebook (const Notebook::Ptr &nb, DBOperation dbop)=0
 
bool getLoadDates (const QDate &start, const QDate &end, QDateTime *loadStart, QDateTime *loadEnd) const
 
void addLoadedRange (const QDate &start, const QDate &end) const
 
bool isRecurrenceLoaded () const
 
void setIsRecurrenceLoaded (bool loaded)
 
void setModified (const QString &info)
 
void setFinished (bool error, const QString &info)
 
void setUpdated (const KCalendarCore::Incidence::List &added, const KCalendarCore::Incidence::List &modified, const KCalendarCore::Incidence::List &deleted)
 
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)
 
void clearLoaded ()
 

Detailed Description

This module provides a simple storage abstraction which contains exactly nothing.

It is only inteded to use for testing purposes

Constructor & Destructor Documentation

◆ DummyStorage()

DummyStorage::DummyStorage ( const mKCal::ExtendedCalendar::Ptr &  cal)
inline

Member Function Documentation

◆ allIncidences()

bool DummyStorage::allIncidences ( KCalendarCore::Incidence::List *  list,
const QString &  notebookUid 
)
inlinevirtual

Get all incidences from storage.

Parameters
listnotebook's incidences
notebookUidlist incidences for given notebook
Returns
true if execution was scheduled; false otherwise

Implements mKCal::ExtendedStorage.

◆ calendarIncidenceAdded() [1/2]

void DummyStorage::calendarIncidenceAdded ( const KCalendarCore::Incidence::Ptr &  incidence)
inlinevirtual

Calendar::CalendarObserver::calendarIncidenceAdded()

Implements mKCal::ExtendedStorage.

◆ calendarIncidenceAdded() [2/2]

void DummyStorage::calendarIncidenceAdded ( const KCalendarCore::Incidence::Ptr &  ) const
inline

◆ calendarIncidenceAdditionCanceled() [1/2]

void DummyStorage::calendarIncidenceAdditionCanceled ( const KCalendarCore::Incidence::Ptr &  incidence)
inlinevirtual

Calendar::CalendarObserver::calendarIncidenceAdditionCanceled()

Implements mKCal::ExtendedStorage.

◆ calendarIncidenceAdditionCanceled() [2/2]

void DummyStorage::calendarIncidenceAdditionCanceled ( const KCalendarCore::Incidence::Ptr &  ) const
inline

◆ calendarIncidenceChanged() [1/2]

void DummyStorage::calendarIncidenceChanged ( const KCalendarCore::Incidence::Ptr &  incidence)
inlinevirtual

Calendar::CalendarObserver::calendarIncidenceChanged()

Implements mKCal::ExtendedStorage.

◆ calendarIncidenceChanged() [2/2]

void DummyStorage::calendarIncidenceChanged ( const KCalendarCore::Incidence::Ptr &  ) const
inline

◆ calendarIncidenceDeleted() [1/2]

void DummyStorage::calendarIncidenceDeleted ( const KCalendarCore::Incidence::Ptr &  ) const
inline

◆ calendarIncidenceDeleted() [2/2]

void DummyStorage::calendarIncidenceDeleted ( const KCalendarCore::Incidence::Ptr &  incidence,
const KCalendarCore::Calendar *  calendar 
)
inlinevirtual

Calendar::CalendarObserver::calendarIncidenceDeleted()

Implements mKCal::ExtendedStorage.

◆ calendarModified() [1/2]

void DummyStorage::calendarModified ( bool  ,
const KCalendarCore::Calendar *   
) const
inline

◆ calendarModified() [2/2]

void DummyStorage::calendarModified ( bool  modified,
KCalendarCore::Calendar *  calendar 
)
inlinevirtual

Calendar::CalendarObserver::calendarModified()

Implements mKCal::ExtendedStorage.

◆ cancel()

bool DummyStorage::cancel ( )
inlinevirtual

Cancel any ongoing action (load etc.).

Returns
true cancel was successful; false otherwise

Implements mKCal::ExtendedStorage.

◆ close()

bool DummyStorage::close ( )
inlinevirtual

CalStorage::close()

Reimplemented from mKCal::ExtendedStorage.

◆ deletedIncidences()

bool DummyStorage::deletedIncidences ( KCalendarCore::Incidence::List *  list,
const QDateTime &  after,
const QString &  notebookUid 
)
inlinevirtual

Get deleted incidences from storage.

Parameters
listdeleted incidences
afterlist only incidences deleted after or at given datetime
notebookUidlist only incidences for given notebook
Returns
true if execution was scheduled; false otherwise

Implements mKCal::ExtendedStorage.

◆ duplicateIncidences()

bool DummyStorage::duplicateIncidences ( KCalendarCore::Incidence::List *  list,
const KCalendarCore::Incidence::Ptr &  incidence,
const QString &  notebookUid 
)
inlinevirtual

Get possible duplicates for given incidence.

Parameters
listduplicate incidences
incidenceincidence to check
notebookUidlist incidences for given notebook
Returns
true if execution was scheduled; false otherwise

Implements mKCal::ExtendedStorage.

◆ eventCount()

int DummyStorage::eventCount ( )
inlinevirtual

Get count of events.

Returns
count of events

Implements mKCal::ExtendedStorage.

◆ incidenceDeletedDate()

QDateTime DummyStorage::incidenceDeletedDate ( const KCalendarCore::Incidence::Ptr &  incidence)
inlinevirtual

Get deletion time of incidence.

Parameters
incidenceincidence to check
Returns
valid deletion time of incidence in UTC if incidence has been deleted otherwise QDateTime()

Implements mKCal::ExtendedStorage.

◆ insertedIncidences()

bool DummyStorage::insertedIncidences ( KCalendarCore::Incidence::List *  list,
const QDateTime &  after,
const QString &  notebookUid 
)
inlinevirtual

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.

Parameters
listinserted incidences
afterlist only incidences inserted after or at given datetime
notebookUidlist only incidences for given notebook
Returns
true if execution was scheduled; false otherwise

Implements mKCal::ExtendedStorage.

◆ journalCount()

int DummyStorage::journalCount ( )
inlinevirtual

Get count of journals.

Returns
count of journals

Implements mKCal::ExtendedStorage.

◆ load() [1/4]

bool DummyStorage::load ( )
inlinevirtual

ExtendedStorage::load()

Implements mKCal::ExtendedStorage.

◆ load() [2/4]

bool DummyStorage::load ( const QDate &  date)
inlinevirtual

Load incidences at given date into the memory.

All incidences that happens within date, or starts / ends within date or span during date are loaded into memory. The time zone used to expand date into points in time is the time zone of the associated calendar. In addition, all recurring events are also loaded into memory since there is no way to know in advance if they will have occurrences intersecting date. Internally, recurring incidences and incidences of date are cached to avoid loading them several times.

Parameters
datedate
Returns
true if the load was successful; false otherwise.

Implements mKCal::ExtendedStorage.

◆ load() [3/4]

bool DummyStorage::load ( const QDate &  start,
const QDate &  end 
)
inlinevirtual

Load incidences between given dates into the memory.

start is inclusive, while end is exclusive. The same definitions and restrictions for loading apply as for load(const QDate &) method.

Parameters
startis the starting date
endis the ending date, exclusive
Returns
true if the load was successful; false otherwise.

Implements mKCal::ExtendedStorage.

◆ load() [4/4]

bool DummyStorage::load ( const QString &  uid,
const QDateTime &  recurrenceId 
)
inlinevirtual

Load incidence by uid into the memory.

Parameters
uidis uid of incidence
recurrenceidis recurrenceid of incidence, default null
Returns
true if the load was successful; false otherwise.

Implements mKCal::ExtendedStorage.

◆ loadAttendeeIncidences()

bool DummyStorage::loadAttendeeIncidences ( )
inlinevirtual

Load incidences that have attendee.

Returns
true if the load was successful; false otherwise.

Implements mKCal::ExtendedStorage.

◆ loadCompletedTodos()

int DummyStorage::loadCompletedTodos ( bool  hasDate,
int  limit,
QDateTime *  last 
)
inlinevirtual

Load completed todos based on parameters.

Load direction is descending, i.e., starting from most distant upcoming todo.

Parameters
hasDateset true to load todos that have due date
limitload only that many todos
lastlast loaded todo due/creation date in return
Returns
number of loaded todos, or -1 on error

Implements mKCal::ExtendedStorage.

◆ loadContactIncidences()

int DummyStorage::loadContactIncidences ( const KCalendarCore::Person &  person,
int  limit,
QDateTime *  last 
)
inlinevirtual

Load all incidences that have the specified attendee.

Also includes all shared notes (in a shared notebook).

Parameters
personperson in question
limitload only that many incidences
lastlast loaded incidence due/creation date in return
Returns
number of loaded incidences, or -1 on error

Implements mKCal::ExtendedStorage.

◆ loadContacts()

KCalendarCore::Person::List DummyStorage::loadContacts ( )
inlinevirtual

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.

Returns
ordered list of persons

Implements mKCal::ExtendedStorage.

◆ loadFutureIncidences()

int DummyStorage::loadFutureIncidences ( int  limit,
QDateTime *  last 
)
inlinevirtual

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).

Parameters
limitload only that many incidences
lastlast loaded incidence start date in return
Returns
number of loaded incidences, or -1 on error

Implements mKCal::ExtendedStorage.

◆ loadGeoIncidences() [1/3]

bool DummyStorage::loadGeoIncidences ( )
inlinevirtual

Load incidences that have geo parameters.

Returns
true if the load was successful; false otherwise.

Implements mKCal::ExtendedStorage.

◆ loadGeoIncidences() [2/3]

int DummyStorage::loadGeoIncidences ( bool  hasDate,
int  limit,
QDateTime *  last 
)
inlinevirtual

Load incidences that have location information based on parameters.

Load direction is descending, i.e., starting from most distant upcoming incidence.

Parameters
hasDateset true to load incidences that have start/due date
limitload only that many incidences
lastlast loaded incidence due/creation date in return
Returns
number of loaded incidences, or -1 on error

Implements mKCal::ExtendedStorage.

◆ loadGeoIncidences() [3/3]

bool DummyStorage::loadGeoIncidences ( float  geoLatitude,
float  geoLongitude,
float  diffLatitude,
float  diffLongitude 
)
inlinevirtual

Load incidences that have geo parameters inside given rectangle.

Parameters
geoLatitudelatitude
geoLongitudelongitude
diffLatitudemaximum latitudinal difference
diffLongitudemaximum longitudinal difference
Returns
true if the load was successful; false otherwise.

Implements mKCal::ExtendedStorage.

◆ loadIncidenceInstance()

bool DummyStorage::loadIncidenceInstance ( const QString &  instanceIdentifier)
inlinevirtual

Load the incidence matching the given identifier.

This method may be more fragile than load(uid, recid) though since the instanceIdentifier is not saved as is in the database.

Parameters
instanceIdentifieris an identifier returned by Incidence::instanceIdentifier()
Returns
true if the load was successful; false otherwise.

Implements mKCal::ExtendedStorage.

◆ loadIncidences()

int DummyStorage::loadIncidences ( bool  hasDate,
int  limit,
QDateTime *  last 
)
inlinevirtual

Load incidences based on start/due date or creation date.

Load direction is descending, i.e., starting from most distant upcoming incidence.

Parameters
hasDateset true to load incidences that have start/due date
limitload only that many incidences
lastlast loaded incidence due/creation date in return
Returns
number of loaded incidences, or -1 on error

Implements mKCal::ExtendedStorage.

◆ loadJournals() [1/2]

bool DummyStorage::loadJournals ( )
inlinevirtual

Load journal type entries.

Implements mKCal::ExtendedStorage.

◆ loadJournals() [2/2]

int DummyStorage::loadJournals ( int  limit,
QDateTime *  last 
)
inlinevirtual

Load journal entries based on parameters.

Load direction is descending, i.e. starting from the most recently modified journal.

Parameters
limitload only that many incidences
lastlast loaded incidence due/creation date in return
Returns
number of loaded incidences, or -1 on error

Implements mKCal::ExtendedStorage.

◆ loadNotebookIncidences()

bool DummyStorage::loadNotebookIncidences ( const QString &  notebookUid)
inlinevirtual

Load incidences of one notebook into the memory.

Parameters
notebookUidis uid of notebook
Returns
true if the load was successful; false otherwise.

Implements mKCal::ExtendedStorage.

◆ loadNotebooks()

bool DummyStorage::loadNotebooks ( )
inlinevirtual

◆ loadOldInvitationIncidences()

int DummyStorage::loadOldInvitationIncidences ( int  ,
QDateTime *   
)
inline

◆ loadPlainIncidences()

bool DummyStorage::loadPlainIncidences ( )
inlinevirtual

Load plain incidences (no startdate and no enddate).

Returns
true if the load was successful; false otherwise.

Implements mKCal::ExtendedStorage.

◆ loadRecurringIncidences()

bool DummyStorage::loadRecurringIncidences ( )
inlinevirtual

Load recurring incidences.

Returns
true if the load was successful; false otherwise.

Implements mKCal::ExtendedStorage.

◆ loadSeries()

bool DummyStorage::loadSeries ( const QString &  uid)
inlinevirtual

Load all incidences sharing the same uid into the memory.

Parameters
uidis uid of the series
Returns
true if the load was successful; false otherwise.

Implements mKCal::ExtendedStorage.

◆ loadUncompletedTodos()

int DummyStorage::loadUncompletedTodos ( )
inlinevirtual

Load all uncompleted todos.

Returns
number of loaded todos, or -1 on error

Implements mKCal::ExtendedStorage.

◆ loadUnreadInvitationIncidences()

int DummyStorage::loadUnreadInvitationIncidences ( )
inline

◆ modifiedIncidences()

bool DummyStorage::modifiedIncidences ( KCalendarCore::Incidence::List *  list,
const QDateTime &  after,
const QString &  notebookUid 
)
inlinevirtual

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!

Parameters
listmodified incidences
afterlist only incidences modified after or at given datetime
notebookUidlist only incidences for given notebook
Returns
true if execution was scheduled; false otherwise

Implements mKCal::ExtendedStorage.

◆ modifyNotebook()

bool DummyStorage::modifyNotebook ( const mKCal::Notebook::Ptr ,
mKCal::DBOperation   
)
inlinevirtual

◆ notifyOpened()

bool DummyStorage::notifyOpened ( const KCalendarCore::Incidence::Ptr &  incidence)
inlinevirtual

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.

Parameters
incidenceThe incidence that has been opened
Returns
True if sucessful; false otherwise

Implements mKCal::ExtendedStorage.

◆ open()

bool DummyStorage::open ( )
inlinevirtual

ExtendedStorage::open()

Implements mKCal::ExtendedStorage.

◆ purgeDeletedIncidences()

bool DummyStorage::purgeDeletedIncidences ( const KCalendarCore::Incidence::List &  list)
inlinevirtual

Remove from storage all incidences that have been previously marked as deleted and that matches the UID / RecID of the incidences in list.

The action is performed immediately on database.

Returns
True on success, false otherwise.

Implements mKCal::ExtendedStorage.

◆ save() [1/2]

bool DummyStorage::save ( )
inlinevirtual

ExtendedStorage::save()

Implements mKCal::ExtendedStorage.

◆ save() [2/2]

bool DummyStorage::save ( DeleteAction  deleteAction)
inlinevirtual

This is an overload of save() method.

When @deleteAction is PurgeDeleted, the deleted incidences are not marked as deleted but completely removed from the database and won't appear anymore when calling deletedIncidences().

Parameters
deleteActionthe action to apply to deleted incidences
Returns
True if successful; false otherwise

Implements mKCal::ExtendedStorage.

◆ todoCount()

int DummyStorage::todoCount ( )
inlinevirtual

Get count of todos.

Returns
count of todos

Implements mKCal::ExtendedStorage.

◆ virtual_hook()

void DummyStorage::virtual_hook ( int  id,
void *  data 
)
inlinevirtual

Standard trick to add virtuals later.

Parameters
idis any integer unique to this class which we will use to identify the method to be called.
datais a pointer to some glob of data, typically a struct.

Implements mKCal::ExtendedStorage.


The documentation for this class was generated from the following file:

Generated on Mon May 30 2022 06:54:51 for libextendedkcal by doxygen 1.9.4