libopie PIM API Documentation

OContactAccessBackend Class Reference

This class represents the interface of all Contact Backends. More...

#include <ocontactaccessbackend.h>

Inheritance diagram for OContactAccessBackend:

Inheritance graph
[legend]
Collaboration diagram for OContactAccessBackend:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 OContactAccessBackend ()
virtual ~OContactAccessBackend ()
virtual bool wasChangedExternally ()=0
 Return if database was changed externally.

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

virtual const uint querySettings ()=0
 Return all possible settings.

virtual bool hasQuerySettings (uint querySettings) const=0
 Check whether settings are correct.

virtual QArray< intsorted (bool ascending, int sortOrder, int sortFilter, int cat)=0
 FIXME!!! Returns a sorted list of records either ascendinf or descending for a giving criteria and category.


Detailed Description

This class represents the interface of all Contact Backends.

Derivates of this class will be used to access the contacts. As implementation currently XML and vCard exist. This class needs to be implemented if you want to provide your own storage. In all queries a list of uids is passed on instead of loading the actual record!

See also:
OContactAccessBackend_VCard

OContactAccessBackend_XML

Definition at line 72 of file ocontactaccessbackend.h.


Constructor & Destructor Documentation

OContactAccessBackend::OContactAccessBackend  )  [inline]
 

Definition at line 74 of file ocontactaccessbackend.h.

virtual OContactAccessBackend::~OContactAccessBackend  )  [inline, virtual]
 

Definition at line 75 of file ocontactaccessbackend.h.


Member Function Documentation

virtual bool OContactAccessBackend::wasChangedExternally  )  [pure virtual]
 

Return if database was changed externally.

This may just make sense on file based databases like a XML-File. It is used to prevent to overwrite the current database content if the file was already changed by something else ! If this happens, we have to reload before save our data. If we use real databases, this should be handled by the database management system themselve, therefore this function should always return false in this case. It is not our problem to handle this conflict ...

Returns:
true if the database was changed and if save without reload will be dangerous. false if the database was not changed or it is save to write in this situation.

Implemented in OContactAccessBackend_SQL, OContactAccessBackend_VCard, and OContactAccessBackend_XML.

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

return a List of records that match the regex

Implements OPimAccessBackend< OContact >.

Implemented in OContactAccessBackend_SQL, OContactAccessBackend_VCard, and OContactAccessBackend_XML.

virtual const uint OContactAccessBackend::querySettings  )  [pure virtual]
 

Return all possible settings.

Returns:
All settings provided by the current backend (i.e.: query_WildCards & query_IgnoreCase)

Implemented in OContactAccessBackend_SQL, OContactAccessBackend_VCard, and OContactAccessBackend_XML.

Referenced by OContactAccess::querySettings().

virtual bool OContactAccessBackend::hasQuerySettings uint  querySettings  )  const [pure virtual]
 

Check whether settings are correct.

Returns:
true if the given settings are correct and possible.

Implemented in OContactAccessBackend_SQL, OContactAccessBackend_VCard, and OContactAccessBackend_XML.

Referenced by OContactAccess::hasQuerySettings().

virtual QArray<int> OContactAccessBackend::sorted bool  ascending,
int  sortOrder,
int  sortFilter,
int  cat
[pure virtual]
 

FIXME!!! Returns a sorted list of records either ascendinf or descending for a giving criteria and category.

Implemented in OContactAccessBackend_SQL, OContactAccessBackend_VCard, and OContactAccessBackend_XML.


The documentation for this class was generated from the following file:
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:05 2004 by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2001