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.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/libopie2/opiepim/core/ocontactaccess.h b/libopie2/opiepim/core/ocontactaccess.h
index d7ceaf2..e90db32 100644
--- a/libopie2/opiepim/core/ocontactaccess.h
+++ b/libopie2/opiepim/core/ocontactaccess.h
@@ -1,43 +1,47 @@
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.8 2003/05/08 13:55:09 tille
21 * search stuff
22 * and match, toRichText & toShortText in oevent
23 *
20 * Revision 1.7 2003/04/13 18:07:10 zecke 24 * Revision 1.7 2003/04/13 18:07:10 zecke
21 * More API doc 25 * More API doc
22 * QString -> const QString& 26 * QString -> const QString&
23 * QString = 0l -> QString::null 27 * QString = 0l -> QString::null
24 * 28 *
25 * Revision 1.6 2003/01/02 14:27:12 eilers 29 * Revision 1.6 2003/01/02 14:27:12 eilers
26 * Improved query by example: Search by date is possible.. First step 30 * Improved query by example: Search by date is possible.. First step
27 * for a today plugin for birthdays.. 31 * for a today plugin for birthdays..
28 * 32 *
29 * Revision 1.5 2002/11/13 14:14:51 eilers 33 * Revision 1.5 2002/11/13 14:14:51 eilers
30 * Added sorted for Contacts.. 34 * Added sorted for Contacts..
31 * 35 *
32 * Revision 1.4 2002/11/01 15:10:42 eilers 36 * Revision 1.4 2002/11/01 15:10:42 eilers
33 * Added regExp-search in database for all fields in a contact. 37 * Added regExp-search in database for all fields in a contact.
34 * 38 *
35 * Revision 1.3 2002/10/16 10:52:40 eilers 39 * Revision 1.3 2002/10/16 10:52:40 eilers
36 * Added some docu to the interface and now using the cache infrastucture by zecke.. :) 40 * Added some docu to the interface and now using the cache infrastucture by zecke.. :)
37 * 41 *
38 * Revision 1.2 2002/10/14 16:21:54 eilers 42 * Revision 1.2 2002/10/14 16:21:54 eilers
39 * Some minor interface updates 43 * Some minor interface updates
40 * 44 *
41 * Revision 1.1 2002/09/27 17:11:44 eilers 45 * Revision 1.1 2002/09/27 17:11:44 eilers
42 * Added API for accessing the Contact-Database ! It is compiling, but 46 * Added API for accessing the Contact-Database ! It is compiling, but
43 * please do not expect that anything is working ! 47 * please do not expect that anything is working !
@@ -89,50 +93,48 @@ class OContactAccess: public QObject, public OPimAccessTemplate<OContact>
89 * @see OContactAccessBackend 93 * @see OContactAccessBackend
90 */ 94 */
91 OContactAccess (const QString appname, const QString filename = 0l, 95 OContactAccess (const QString appname, const QString filename = 0l,
92 OContactAccessBackend* backend = 0l, bool handlesync = true); 96 OContactAccessBackend* backend = 0l, bool handlesync = true);
93 ~OContactAccess (); 97 ~OContactAccess ();
94 98
95 /** Constants for query. 99 /** Constants for query.
96 * Use this constants to set the query parameters. 100 * Use this constants to set the query parameters.
97 * Note: <i>query_IgnoreCase</i> just make sense with one of the other attributes ! 101 * Note: <i>query_IgnoreCase</i> just make sense with one of the other attributes !
98 * @see queryByExample() 102 * @see queryByExample()
99 */ 103 */
100 enum QuerySettings { 104 enum QuerySettings {
101 WildCards = 0x0001, 105 WildCards = 0x0001,
102 IgnoreCase = 0x0002, 106 IgnoreCase = 0x0002,
103 RegExp = 0x0004, 107 RegExp = 0x0004,
104 ExactMatch = 0x0008, 108 ExactMatch = 0x0008,
105 MatchOne = 0x0010, // Only one Entry must match 109 MatchOne = 0x0010, // Only one Entry must match
106 DateDiff = 0x0020, // Find all entries from today until given date 110 DateDiff = 0x0020, // Find all entries from today until given date
107 DateYear = 0x0040, // The year matches 111 DateYear = 0x0040, // The year matches
108 DateMonth = 0x0080, // The month matches 112 DateMonth = 0x0080, // The month matches
109 DateDay = 0x0100, // The day matches 113 DateDay = 0x0100, // The day matches
110 }; 114 };
111 115
112 116
113 ORecordList<OContact> matchRegexp( const QRegExp &r )const;
114
115 /** Return all Contacts in a sorted manner. 117 /** Return all Contacts in a sorted manner.
116 * @param ascending true: Sorted in acending order. 118 * @param ascending true: Sorted in acending order.
117 * @param sortOrder Currently not implemented. Just defined to stay compatible to otodoaccess 119 * @param sortOrder Currently not implemented. Just defined to stay compatible to otodoaccess
118 * @param sortFilter Currently not implemented. Just defined to stay compatible to otodoaccess 120 * @param sortFilter Currently not implemented. Just defined to stay compatible to otodoaccess
119 * @param cat Currently not implemented. Just defined to stay compatible to otodoaccess 121 * @param cat Currently not implemented. Just defined to stay compatible to otodoaccess
120 */ 122 */
121 List sorted( bool ascending, int sortOrder, int sortFilter, int cat ) const; 123 List sorted( bool ascending, int sortOrder, int sortFilter, int cat ) const;
122 124
123 /** Return all possible settings. 125 /** Return all possible settings.
124 * @return All settings provided by the current backend 126 * @return All settings provided by the current backend
125 * (i.e.: query_WildCards & query_IgnoreCase) 127 * (i.e.: query_WildCards & query_IgnoreCase)
126 */ 128 */
127 const uint querySettings(); 129 const uint querySettings();
128 130
129 /** Check whether settings are correct. 131 /** Check whether settings are correct.
130 * @return <i>true</i> if the given settings are correct and possible. 132 * @return <i>true</i> if the given settings are correct and possible.
131 */ 133 */
132 bool hasQuerySettings ( int querySettings ) const; 134 bool hasQuerySettings ( int querySettings ) const;
133 135
134 /** 136 /**
135 * if the resource was changed externally. 137 * if the resource was changed externally.
136 * You should use the signal instead of polling possible changes ! 138 * You should use the signal instead of polling possible changes !
137 */ 139 */
138 bool wasChangedExternally()const; 140 bool wasChangedExternally()const;