summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/core/ocontactaccess.h
Unidiff
Diffstat (limited to 'libopie2/opiepim/core/ocontactaccess.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/core/ocontactaccess.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/libopie2/opiepim/core/ocontactaccess.h b/libopie2/opiepim/core/ocontactaccess.h
index b4921d5..961968f 100644
--- a/libopie2/opiepim/core/ocontactaccess.h
+++ b/libopie2/opiepim/core/ocontactaccess.h
@@ -1,43 +1,46 @@
1/* 1/*
2 * Class to manage the Contacts. 2 * Class to manage the Contacts.
3 * 3 *
4 * Copyright (c) 2002 by Stefan Eilers (Eilers.Stefan@epost.de) 4 * Copyright (c) 2002 by Stefan Eilers (Eilers.Stefan@epost.de)
5 * Copyright (c) 2002 by Holger Freyther (zecke@handhelds.org) 5 * Copyright (c) 2002 by Holger Freyther (zecke@handhelds.org)
6 * 6 *
7 * ===================================================================== 7 * =====================================================================
8 *This program is free software; you can redistribute it and/or 8 *This program is free software; you can redistribute it and/or
9 *modify it under the terms of the GNU Library General Public 9 *modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; 10 * License as published by the Free Software Foundation;
11 * either version 2 of the License, or (at your option) any later 11 * either version 2 of the License, or (at your option) any later
12 * version. 12 * version.
13 * ===================================================================== 13 * =====================================================================
14 * ToDo: Define enum for query settings 14 * ToDo: Define enum for query settings
15 * ===================================================================== 15 * =====================================================================
16 * Version: $Id$ 16 * Version: $Id$
17 * ===================================================================== 17 * =====================================================================
18 * History: 18 * History:
19 * $Log$ 19 * $Log$
20 * Revision 1.5 2002/11/13 14:14:51 eilers
21 * Added sorted for Contacts..
22 *
20 * Revision 1.4 2002/11/01 15:10:42 eilers 23 * Revision 1.4 2002/11/01 15:10:42 eilers
21 * Added regExp-search in database for all fields in a contact. 24 * Added regExp-search in database for all fields in a contact.
22 * 25 *
23 * Revision 1.3 2002/10/16 10:52:40 eilers 26 * Revision 1.3 2002/10/16 10:52:40 eilers
24 * Added some docu to the interface and now using the cache infrastucture by zecke.. :) 27 * Added some docu to the interface and now using the cache infrastucture by zecke.. :)
25 * 28 *
26 * Revision 1.2 2002/10/14 16:21:54 eilers 29 * Revision 1.2 2002/10/14 16:21:54 eilers
27 * Some minor interface updates 30 * Some minor interface updates
28 * 31 *
29 * Revision 1.1 2002/09/27 17:11:44 eilers 32 * Revision 1.1 2002/09/27 17:11:44 eilers
30 * Added API for accessing the Contact-Database ! It is compiling, but 33 * Added API for accessing the Contact-Database ! It is compiling, but
31 * please do not expect that anything is working ! 34 * please do not expect that anything is working !
32 * I will debug that stuff in the next time .. 35 * I will debug that stuff in the next time ..
33 * Please read README_COMPILE for compiling ! 36 * Please read README_COMPILE for compiling !
34 * 37 *
35 * ===================================================================== 38 * =====================================================================
36 */ 39 */
37#ifndef _OCONTACTACCESS_H 40#ifndef _OCONTACTACCESS_H
38#define _OCONTACTACCESS_H 41#define _OCONTACTACCESS_H
39 42
40#include <qobject.h> 43#include <qobject.h>
41 44
42#include <qpe/qcopenvelope_qws.h> 45#include <qpe/qcopenvelope_qws.h>
43 46
@@ -70,48 +73,56 @@ class OContactAccess: public QObject, public OPimAccessTemplate<OContact>
70 * which are used before and after synchronisation. If the application wants 73 * which are used before and after synchronisation. If the application wants
71 * to react itself, it should be disabled by setting it to <b>false</b> 74 * to react itself, it should be disabled by setting it to <b>false</b>
72 * @see OContactAccessBackend 75 * @see OContactAccessBackend
73 */ 76 */
74 OContactAccess (const QString appname, const QString filename = 0l, 77 OContactAccess (const QString appname, const QString filename = 0l,
75 OContactAccessBackend* backend = 0l, bool handlesync = true); 78 OContactAccessBackend* backend = 0l, bool handlesync = true);
76 ~OContactAccess (); 79 ~OContactAccess ();
77 80
78 /** Constants for query. 81 /** Constants for query.
79 * Use this constants to set the query parameters. 82 * Use this constants to set the query parameters.
80 * Note: <i>query_IgnoreCase</i> just make sense with one of the other attributes ! 83 * Note: <i>query_IgnoreCase</i> just make sense with one of the other attributes !
81 * @see queryByExample() 84 * @see queryByExample()
82 */ 85 */
83 enum QuerySettings { 86 enum QuerySettings {
84 WildCards = 0x0001, 87 WildCards = 0x0001,
85 IgnoreCase = 0x0002, 88 IgnoreCase = 0x0002,
86 RegExp = 0x0004, 89 RegExp = 0x0004,
87 ExactMatch = 0x0008, 90 ExactMatch = 0x0008,
88 MatchOne = 0x0010 // Only one Entry must match 91 MatchOne = 0x0010 // Only one Entry must match
89 }; 92 };
90 93
91 94
92 ORecordList<OContact> matchRegexp( const QRegExp &r )const; 95 ORecordList<OContact> matchRegexp( const QRegExp &r )const;
93 96
97 /** Return all Contacts in a sorted manner.
98 * @param ascending true: Sorted in acending order.
99 * @param sortOrder Currently not implemented. Just defined to stay compatible to otodoaccess
100 * @param sortFilter Currently not implemented. Just defined to stay compatible to otodoaccess
101 * @param cat Currently not implemented. Just defined to stay compatible to otodoaccess
102 */
103 List sorted( bool ascending, int sortOrder, int sortFilter, int cat ) const;
104
94 /** Return all possible settings. 105 /** Return all possible settings.
95 * @return All settings provided by the current backend 106 * @return All settings provided by the current backend
96 * (i.e.: query_WildCards & query_IgnoreCase) 107 * (i.e.: query_WildCards & query_IgnoreCase)
97 */ 108 */
98 const uint querySettings(); 109 const uint querySettings();
99 110
100 /** Check whether settings are correct. 111 /** Check whether settings are correct.
101 * @return <i>true</i> if the given settings are correct and possible. 112 * @return <i>true</i> if the given settings are correct and possible.
102 */ 113 */
103 bool hasQuerySettings ( int querySettings ) const; 114 bool hasQuerySettings ( int querySettings ) const;
104 115
105 /** 116 /**
106 * if the resource was changed externally. 117 * if the resource was changed externally.
107 * You should use the signal instead of polling possible changes ! 118 * You should use the signal instead of polling possible changes !
108 */ 119 */
109 bool wasChangedExternally()const; 120 bool wasChangedExternally()const;
110 121
111 122
112 /** Save contacts database. 123 /** Save contacts database.
113 * Save is more a "commit". After calling this function, all changes are public available. 124 * Save is more a "commit". After calling this function, all changes are public available.
114 * @return true if successful 125 * @return true if successful
115 */ 126 */
116 bool save(); 127 bool save();
117 128