summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/core/ocontactaccess.h
authoreilers <eilers>2002-10-14 16:21:54 (UTC)
committer eilers <eilers>2002-10-14 16:21:54 (UTC)
commitf48ddfb53e49550f9fe8e9502f2a44aeb8b359cc (patch) (side-by-side diff)
tree7972f3fc9a1d61e22fe57ff0fa96fd9a0badb55d /libopie2/opiepim/core/ocontactaccess.h
parentda3868438e739310862bf65b0d0c8ffa864392e8 (diff)
downloadopie-f48ddfb53e49550f9fe8e9502f2a44aeb8b359cc.zip
opie-f48ddfb53e49550f9fe8e9502f2a44aeb8b359cc.tar.gz
opie-f48ddfb53e49550f9fe8e9502f2a44aeb8b359cc.tar.bz2
Some minor interface updates
Diffstat (limited to 'libopie2/opiepim/core/ocontactaccess.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/core/ocontactaccess.h49
1 files changed, 10 insertions, 39 deletions
diff --git a/libopie2/opiepim/core/ocontactaccess.h b/libopie2/opiepim/core/ocontactaccess.h
index 54f7f07..adc66cf 100644
--- a/libopie2/opiepim/core/ocontactaccess.h
+++ b/libopie2/opiepim/core/ocontactaccess.h
@@ -14,12 +14,15 @@
* ToDo: Define enum for query settings
* =====================================================================
* Version: $Id$
* =====================================================================
* History:
* $Log$
+ * Revision 1.2 2002/10/14 16:21:54 eilers
+ * Some minor interface updates
+ *
* Revision 1.1 2002/09/27 17:11:44 eilers
* Added API for accessing the Contact-Database ! It is compiling, but
* please do not expect that anything is working !
* I will debug that stuff in the next time ..
* Please read README_COMPILE for compiling !
*
@@ -44,73 +47,41 @@
* done by the backend.
*/
class OContactAccess: public QObject, public OPimAccessTemplate<OContact>
{
Q_OBJECT
-
- /* class Iterator{
- friend OContactAccess;
- public:
- Iterator();
- Iterator ( const Iterator& copy );
-
- bool operator== ( const Iterator& it );
- bool operator!= ( const Iterator& it );
- Iterator& operator= ( const Iterator& it );
- Iterator& operator++ (); // prefix
- Iterator operator++ ( int ); // postfix
- Iterator& operator-- (); // prefix
- Iterator operator-- ( int ); // postfix
- Contact operator*() const;
- Contact operator->() const;
-
- Iterator begin();
- Iterator end();
-
- uint count() const;
-
- private:
- QValueList<int> m_uids;
- int m_cur_position;
- bool m_end_reached;
- OContactAccess *m_db;
-
- };
-
- */
-
public:
/** Create Database with contacts (addressbook).
* @param appname Name of application which wants access to the database
* (i.e. "todolist")
* @param filename The name of the database file. If not set, the default one
* is used.
* @param backend Pointer to an alternative Backend. If not set, we will use
* the default backend.
* @param handlesync If <b>true</b> the database stores the current state
* automatically if it receives the signals <i>flush()</i> and <i>reload()</i>
* which are used before and after synchronisation. If the application wants
* to react itself, it should be disabled by setting it to <b>false</b>
- * @see OContactBackend
+ * @see OContactAccessBackend
*/
OContactAccess (const QString appname, const QString filename = 0l,
OContactAccessBackend* backend = 0l, bool handlesync = true);
~OContactAccess ();
/** Constants for query.
* Use this constants to set the query parameters.
* Note: <i>query_IgnoreCase</i> just make sense with one of the other attributes !
* @see queryByExample()
- * - why not enum - zecke?
- * -> Had some implementation problems .. Will use enum soon ! .. (se)
*/
- static const int query_WildCards = 0x0001;
- static const int query_IgnoreCase = 0x0002;
- static const int query_RegExp = 0x0004;
- static const int query_ExactMatch = 0x0008;
+ enum QuerySettings {
+ WildCards = 0x0001,
+ IgnoreCase = 0x0002,
+ RegExp = 0x0004,
+ ExactMatch = 0x0008,
+ };
/** Return all possible settings.
* @return All settings provided by the current backend
* (i.e.: query_WildCards & query_IgnoreCase)
*/
const uint querySettings();