Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Opie::OPimContactAccessBackend Class Reference

#include </home/clem/local/src/opie/libopie2/opiepim/backend/ocontactaccessbackend.h>

Inheritance diagram for Opie::OPimContactAccessBackend:

Inheritance graph
[legend]
Collaboration diagram for Opie::OPimContactAccessBackend:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 OPimContactAccessBackend ()
virtual bool wasChangedExternally ()=0
const uint querySettings () const
bool hasQuerySettings (uint querySettings) const
UIDArray queryByExample (const UIDArray &uidlist, const OPimContact &, int settings, const QDateTime &d=QDateTime()) const
UIDArray sorted (const UIDArray &, bool asc, int, int, const QArray< int > &) const
OPimBackendOccurrence::List occurrences (const QDate &, const QDate &) const

Private Attributes

Private * d

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:
OPimContactAccessBackend_VCard

OPimContactAccessBackend_XML

Definition at line 59 of file ocontactaccessbackend.h.


Constructor & Destructor Documentation

Opie::OPimContactAccessBackend::OPimContactAccessBackend  ) 
 

Definition at line 40 of file ocontactaccessbackend.cpp.


Member Function Documentation

bool Opie::OPimContactAccessBackend::hasQuerySettings uint  querySettings  )  const [virtual]
 

Check whether settings are correct.

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

Implements Opie::OPimAccessBackend< OPimContact >.

Reimplemented in Opie::OPimContactAccessBackend_SQL.

Definition at line 192 of file ocontactaccessbackend.cpp.

References Opie::OPimBase::DateDay, Opie::OPimBase::DateDiff, Opie::OPimBase::DateMonth, Opie::OPimBase::DateYear, Opie::OPimBase::ExactMatch, Opie::OPimBase::IgnoreCase, Opie::OPimBase::RegExp, and Opie::OPimBase::WildCards.

OPimBackendOccurrence::List Opie::OPimContactAccessBackend::occurrences const QDate ,
const QDate
const [virtual]
 

Reimplemented from Opie::OPimAccessBackend< OPimContact >.

Definition at line 304 of file ocontactaccessbackend.cpp.

References Opie::OPimAccessBackend< OPimContact >::allRecords(), Opie::OPimContact::anniversary(), QDate::day(), Opie::OPimAccessBackend< OPimContact >::find(), i, and QDate::month().

UIDArray Opie::OPimContactAccessBackend::queryByExample const UIDArray uidlist,
const OPimContact ,
int  settings,
const QDateTime d = QDateTime()
const [virtual]
 

Advanced search mechanism.

Implements Opie::OPimAccessBackend< OPimContact >.

Reimplemented in Opie::OPimContactAccessBackend_SQL.

Definition at line 42 of file ocontactaccessbackend.cpp.

References Opie::OPimContact::anniversary(), Qtopia::Anniversary, Opie::OPimContact::birthday(), Qtopia::Birthday, QDate::currentDate(), QDateTime::date(), Opie::OPimBase::DateDay, Opie::OPimBase::DateDiff, Opie::OPimBase::DateMonth, Opie::OPimBase::DateYear, QDate::day(), QDate::daysTo(), Opie::OPimBase::ExactMatch, false, Opie::OPimContact::field(), Opie::OPimAccessBackend< OPimContact >::find(), Qtopia::Groups, i, Opie::OPimBase::IgnoreCase, QDate::isValid(), l, Opie::OPimBase::MatchOne, QDate::month(), odebug, oendl, Opie::OPimBase::RegExp, QDate::setYMD(), true, Opie::OPimBase::WildCards, and QDate::year().

const uint Opie::OPimContactAccessBackend::querySettings  )  const [virtual]
 

Return all possible settings.

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

Implements Opie::OPimAccessBackend< OPimContact >.

Reimplemented in Opie::OPimContactAccessBackend_SQL.

Definition at line 179 of file ocontactaccessbackend.cpp.

References Opie::OPimBase::DateDay, Opie::OPimBase::DateDiff, Opie::OPimBase::DateMonth, Opie::OPimBase::DateYear, Opie::OPimBase::ExactMatch, Opie::OPimBase::IgnoreCase, Opie::OPimBase::RegExp, and Opie::OPimBase::WildCards.

UIDArray Opie::OPimContactAccessBackend::sorted const UIDArray ,
bool  asc,
int  ,
int  ,
const QArray< int > & 
const [virtual]
 

Slow and inefficent default implementation

Implements Opie::OPimAccessBackend< OPimContact >.

Reimplemented in Opie::OPimContactAccessBackend_SQL.

Definition at line 240 of file ocontactaccessbackend.cpp.

References Qtopia::Record::categories(), Opie::OPimContactAccess::DoNotShowWithCategory, Opie::OPimBase::FilterCategory, Opie::OPimAccessBackend< OPimContact >::find(), i, Opie::Internal::OPimSortVector< T >::insert(), Opie::OPimRecord::isEmpty(), odebug, oendl, and Opie::Internal::OPimSortVector< T >::uidAt().

virtual bool Opie::OPimContactAccessBackend::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 Opie::OPimContactAccessBackend_SQL, Opie::OPimContactAccessBackend_VCard, and Opie::OPimContactAccessBackend_XML.

Referenced by Opie::OPimContactAccess::wasChangedExternally().


Member Data Documentation

Private* Opie::OPimContactAccessBackend::d [private]
 

Reimplemented from Opie::OPimAccessBackend< OPimContact >.

Definition at line 106 of file ocontactaccessbackend.h.

Referenced by Opie::OPimContactAccessBackend_VCard::convVCardDateToDate().


The documentation for this class was generated from the following files:
Generated on Sat Nov 5 17:59:14 2005 for OPIE by  doxygen 1.4.2