libopie PIM API Documentation

ODateBookAccessBackend_XML Class Reference

This is the default XML implementation for DateBoook XML storage It fully implements the interface. More...

#include <odatebookaccessbackend_xml.h>

Inheritance diagram for ODateBookAccessBackend_XML:

Inheritance graph
[legend]
Collaboration diagram for ODateBookAccessBackend_XML:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ODateBookAccessBackend_XML (const QString &appName, const QString &fileName=QString::null)
 ~ODateBookAccessBackend_XML ()
bool load ()
 load the resource

bool reload ()
 reload the resource

bool save ()
 save the resource and all it's changes

QArray< intallRecords () const
 return an array of all available uids

QArray< intmatchRegexp (const QRegExp &r) const
 return a List of records that match the regex

QArray< intqueryByExample (const OEvent &, int, const QDateTime &d=QDateTime())
 queryByExample for T with the given Settings

OEvent find (int uid) const
 find the OPimRecord with uid

void clear ()
 clear the back end

bool add (const OEvent &ev)
 add T

bool remove (int uid)
 remove

bool replace (const OEvent &ev)
 replace a record with T.uid()

QArray< UIDrawEvents () const
 This method should return a list of UIDs containing all events.

QArray< UIDrawRepeats () const
 This method should return a list of UIDs containing all repeating events.

QArray< UIDnonRepeats () const
 This mthod should return a list of UIDs containing all non repeating events.

OEvent::ValueList directNonRepeats ()
 If you do not want to implement the effectiveEvents methods below you need to supply it with directNonRepeats.

OEvent::ValueList directRawRepeats ()
 Same as above but return raw repeats!


Detailed Description

This is the default XML implementation for DateBoook XML storage It fully implements the interface.

See also:
ODateBookAccessBackend

OPimAccessBackend

Definition at line 14 of file odatebookaccessbackend_xml.h.


Constructor & Destructor Documentation

ODateBookAccessBackend_XML::ODateBookAccessBackend_XML const QString appName,
const QString fileName = QString::null
 

Definition at line 169 of file odatebookaccessbackend_xml.cpp.

References Global::applicationFileName(), and QString::isEmpty().

ODateBookAccessBackend_XML::~ODateBookAccessBackend_XML  ) 
 

Definition at line 175 of file odatebookaccessbackend_xml.cpp.


Member Function Documentation

bool ODateBookAccessBackend_XML::load  )  [virtual]
 

load the resource

Implements OPimAccessBackend< OEvent >.

Definition at line 177 of file odatebookaccessbackend_xml.cpp.

Referenced by reload().

bool ODateBookAccessBackend_XML::reload  )  [virtual]
 

reload the resource

Implements OPimAccessBackend< OEvent >.

Definition at line 180 of file odatebookaccessbackend_xml.cpp.

References clear(), and load().

bool ODateBookAccessBackend_XML::save  )  [virtual]
 

save the resource and all it's changes

Implements OPimAccessBackend< OEvent >.

Definition at line 184 of file odatebookaccessbackend_xml.cpp.

References QFile::close(), QByteArray::data(), forAll(), QCString::length(), QFile::open(), QFile::remove(), QString::utf8(), and QIODevice::writeBlock().

QArray< int > ODateBookAccessBackend_XML::allRecords  )  const [virtual]
 

return an array of all available uids

Implements OPimAccessBackend< OEvent >.

Definition at line 233 of file odatebookaccessbackend_xml.cpp.

References QMap::begin(), and QMap::end().

QArray< int > ODateBookAccessBackend_XML::matchRegexp const QRegExp r  )  const [virtual]
 

return a List of records that match the regex

Implements OPimAccessBackend< OEvent >.

Definition at line 595 of file odatebookaccessbackend_xml.cpp.

References QMap< int, OEvent >::begin(), QMap< int, OEvent >::count(), QMap< int, OEvent >::end(), and QArray::resize().

QArray< int > ODateBookAccessBackend_XML::queryByExample const OEvent ,
int  ,
const QDateTime d = QDateTime()
[virtual]
 

queryByExample for T with the given Settings

Implements OPimAccessBackend< OEvent >.

Definition at line 249 of file odatebookaccessbackend_xml.cpp.

OEvent ODateBookAccessBackend_XML::find int  uid  )  const [virtual]
 

find the OPimRecord with uid

Parameters:
uid returns T and T.isEmpty() if nothing was found

Implements OPimAccessBackend< OEvent >.

Definition at line 257 of file odatebookaccessbackend_xml.cpp.

References QMap< int, OEvent >::contains().

void ODateBookAccessBackend_XML::clear  )  [virtual]
 

clear the back end

Implements OPimAccessBackend< OEvent >.

Definition at line 252 of file odatebookaccessbackend_xml.cpp.

References QMap< int, OEvent >::clear().

Referenced by reload().

bool ODateBookAccessBackend_XML::add const OEvent ev  )  [virtual]
 

add T

Implements OPimAccessBackend< OEvent >.

Definition at line 263 of file odatebookaccessbackend_xml.cpp.

References OEvent::hasRecurrence(), QMap< int, OEvent >::insert(), and Qtopia::Record::uid().

Referenced by replace().

bool ODateBookAccessBackend_XML::remove int  uid  )  [virtual]
 

remove

Implements OPimAccessBackend< OEvent >.

Definition at line 272 of file odatebookaccessbackend_xml.cpp.

References QMap< int, OEvent >::remove().

bool ODateBookAccessBackend_XML::replace const OEvent ev  )  [virtual]
 

replace a record with T.uid()

Implements OPimAccessBackend< OEvent >.

Definition at line 279 of file odatebookaccessbackend_xml.cpp.

References add(), and Qtopia::Record::uid().

QArray< int > ODateBookAccessBackend_XML::rawEvents  )  const [virtual]
 

This method should return a list of UIDs containing all events.

No filter should be applied

Returns:
list of events

Implements ODateBookAccessBackend.

Definition at line 283 of file odatebookaccessbackend_xml.cpp.

QArray< int > ODateBookAccessBackend_XML::rawRepeats  )  const [virtual]
 

This method should return a list of UIDs containing all repeating events.

No filter should be applied

Returns:
list of repeating events

Implements ODateBookAccessBackend.

Definition at line 286 of file odatebookaccessbackend_xml.cpp.

References QMap::begin(), and QMap::end().

QArray< int > ODateBookAccessBackend_XML::nonRepeats  )  const [virtual]
 

This mthod should return a list of UIDs containing all non repeating events.

No filter should be applied

Returns:
list of nonrepeating events

Implements ODateBookAccessBackend.

Definition at line 298 of file odatebookaccessbackend_xml.cpp.

References QMap::begin(), and QMap::end().

OEvent::ValueList ODateBookAccessBackend_XML::directNonRepeats  )  [virtual]
 

If you do not want to implement the effectiveEvents methods below you need to supply it with directNonRepeats.

This method can return empty lists if effectiveEvents is implememted

Implements ODateBookAccessBackend.

Definition at line 310 of file odatebookaccessbackend_xml.cpp.

References QValueList::append(), QMap< int, OEvent >::begin(), QMap< int, OEvent >::end(), and OEvent::ValueList.

OEvent::ValueList ODateBookAccessBackend_XML::directRawRepeats  )  [virtual]
 

Same as above but return raw repeats!

Implements ODateBookAccessBackend.

Definition at line 318 of file odatebookaccessbackend_xml.cpp.

References QValueList::append(), QMap< int, OEvent >::begin(), QMap< int, OEvent >::end(), and OEvent::ValueList.


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for OPIE Version 1.1.
Documentation copyright © 1997-2003 the KDE developers. 2003 OPIE developers
Generated on Tue Feb 10 20:26:20 2004 by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2001