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

OContactAccess Class Reference

#include </home/clem/local/src/opie/noncore/unsupported/libopie/pim/ocontactaccess.h>

Inheritance diagram for OContactAccess:

Inheritance graph
[legend]
Collaboration diagram for OContactAccess:

Collaboration graph
[legend]
List of all members.

Public Types

enum  QuerySettings {
  WildCards = 0x0001, IgnoreCase = 0x0002, RegExp = 0x0004, ExactMatch = 0x0008,
  MatchOne = 0x0010, DateDiff = 0x0020, DateYear = 0x0040, DateMonth = 0x0080,
  DateDay = 0x0100
}

Signals

void signalChanged (const OContactAccess *which)

Public Member Functions

 OContactAccess (const QString appname, const QString filename=0l, OContactAccessBackend *backend=0l, bool handlesync=true)
 ~OContactAccess ()
List sorted (bool ascending, int sortOrder, int sortFilter, int cat) const
const uint querySettings ()
bool hasQuerySettings (int querySettings) const
bool wasChangedExternally () const
bool save ()

Private Slots

void copMessage (const QCString &msg, const QByteArray &data)

Private Attributes

OContactAccessBackendm_backEnd
bool m_loading:1
Private * d

Detailed Description

Class to access the contacts database. This is just a frontend for the real database handling which is done by the backend. This class is used to access the Contacts on a system. This class as any OPIE PIM class is backend independent.
Author:
Stefan Eilers, Holger Freyther
See also:
OPimAccessTemplate

Definition at line 99 of file ocontactaccess.h.


Member Enumeration Documentation

enum OContactAccess::QuerySettings
 

Constants for query. Use this constants to set the query parameters. Note: query_IgnoreCase just make sense with one of the other attributes !

See also:
queryByExample()
Enumeration values:
WildCards 
IgnoreCase 
RegExp 
ExactMatch 
MatchOne 
DateDiff 
DateYear 
DateMonth 
DateDay 

Definition at line 127 of file ocontactaccess.h.


Constructor & Destructor Documentation

OContactAccess::OContactAccess const QString  appname,
const QString  filename = 0l,
OContactAccessBackend backend = 0l,
bool  handlesync = true
 

Create Database with contacts (addressbook).

Parameters:
appname Name of application which wants access to the database (i.e. "todolist")
filename The name of the database file. If not set, the default one is used.
backend Pointer to an alternative Backend. If not set, we will use the default backend.
handlesync If true the database stores the current state automatically if it receives the signals flush() and reload() which are used before and after synchronisation. If the application wants to react itself, it should be disabled by setting it to false
See also:
OContactAccessBackend

Definition at line 84 of file ocontactaccess.cpp.

References copMessage(), OBackendFactory< T >::Default(), m_backEnd, qWarning(), and OPimAccessTemplate< T >::setBackEnd().

OContactAccess::~OContactAccess  ) 
 

Definition at line 112 of file ocontactaccess.cpp.

References save().


Member Function Documentation

void OContactAccess::copMessage const QCString msg,
const QByteArray data
[private, slot]
 

Definition at line 163 of file ocontactaccess.cpp.

References qWarning(), OPimAccessTemplate< OContact >::reload(), save(), and signalChanged().

Referenced by OContactAccess().

bool OContactAccess::hasQuerySettings int  querySettings  )  const
 

Check whether settings are correct.

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

Definition at line 146 of file ocontactaccess.cpp.

References OContactAccessBackend::hasQuerySettings(), and m_backEnd.

const uint OContactAccess::querySettings  ) 
 

Return all possible settings.

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

Definition at line 141 of file ocontactaccess.cpp.

References m_backEnd, and OContactAccessBackend::querySettings().

bool OContactAccess::save  )  [virtual]
 

Save contacts database. Save is more a "commit". After calling this function, all changes are public available.

Returns:
true if successful

Reimplemented from OPimAccessTemplate< OContact >.

Definition at line 122 of file ocontactaccess.cpp.

References OPimAccessTemplate< OContact >::reload(), OPimAccessTemplate< T >::save(), and wasChangedExternally().

Referenced by copMessage(), and ~OContactAccess().

void OContactAccess::signalChanged const OContactAccess which  )  [signal]
 

Referenced by copMessage().

ORecordList< OContact > OContactAccess::sorted bool  ascending,
int  sortOrder,
int  sortFilter,
int  cat
const
 

Return all Contacts in a sorted manner.

Parameters:
ascending true: Sorted in acending order.
sortOrder Currently not implemented. Just defined to stay compatible to otodoaccess
sortFilter Currently not implemented. Just defined to stay compatible to otodoaccess
cat Currently not implemented. Just defined to stay compatible to otodoaccess

Definition at line 150 of file ocontactaccess.cpp.

References m_backEnd.

Referenced by AddressList::read().

bool OContactAccess::wasChangedExternally  )  const
 

if the resource was changed externally. You should use the signal instead of polling possible changes !

Reimplemented from OPimAccessTemplate< OContact >.

Definition at line 157 of file ocontactaccess.cpp.

References m_backEnd, and OContactAccessBackend::wasChangedExternally().

Referenced by save().


Member Data Documentation

Private* OContactAccess::d [private]
 

Reimplemented from OPimAccessTemplate< OContact >.

Definition at line 192 of file ocontactaccess.h.

OContactAccessBackend* OContactAccess::m_backEnd [private]
 

Reimplemented from OPimAccessTemplate< OContact >.

Definition at line 185 of file ocontactaccess.h.

Referenced by hasQuerySettings(), OContactAccess(), querySettings(), sorted(), and wasChangedExternally().

bool OContactAccess::m_loading [private]
 

Definition at line 186 of file ocontactaccess.h.


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