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.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/libopie2/opiepim/core/ocontactaccess.h b/libopie2/opiepim/core/ocontactaccess.h
index 505c87b..cf5333a 100644
--- a/libopie2/opiepim/core/ocontactaccess.h
+++ b/libopie2/opiepim/core/ocontactaccess.h
@@ -20,84 +20,84 @@
20++= -. .` .: details. 20++= -. .` .: details.
21 : = ...= . :.=- 21 : = ...= . :.=-
22 -. .:....=;==+<; You should have received a copy of the GNU 22 -. .:....=;==+<; You should have received a copy of the GNU
23 -_. . . )=. = Library General Public License along with 23 -_. . . )=. = Library General Public License along with
24 -- :-=` this library; see the file COPYING.LIB. 24 -- :-=` this library; see the file COPYING.LIB.
25 If not, write to the Free Software Foundation, 25 If not, write to the Free Software Foundation,
26 Inc., 59 Temple Place - Suite 330, 26 Inc., 59 Temple Place - Suite 330,
27 Boston, MA 02111-1307, USA. 27 Boston, MA 02111-1307, USA.
28*/ 28*/
29/* 29/*
30 * ===================================================================== 30 * =====================================================================
31 * ToDo: Define enum for query settings 31 * ToDo: Define enum for query settings
32 * ===================================================================== 32 * =====================================================================
33 */ 33 */
34#ifndef _OCONTACTACCESS_H 34#ifndef _OCONTACTACCESS_H
35#define _OCONTACTACCESS_H 35#define _OCONTACTACCESS_H
36 36
37#include <qobject.h> 37#include <qobject.h>
38 38
39#include <qpe/qcopenvelope_qws.h> 39#include <qpe/qcopenvelope_qws.h>
40 40
41#include <qvaluelist.h> 41#include <qvaluelist.h>
42#include <qfileinfo.h> 42#include <qfileinfo.h>
43 43
44#include <opie2/ocontact.h> 44#include <opie2/opimcontact.h>
45#include <opie2/ocontactaccessbackend.h> 45#include <opie2/ocontactaccessbackend.h>
46#include <opie2/opimaccesstemplate.h> 46#include <opie2/opimaccesstemplate.h>
47 47
48namespace Opie { 48namespace Opie {
49/** 49/**
50 * Class to access the contacts database. 50 * Class to access the contacts database.
51 * This is just a frontend for the real database handling which is 51 * This is just a frontend for the real database handling which is
52 * done by the backend. 52 * done by the backend.
53 * This class is used to access the Contacts on a system. This class as any OPIE PIM 53 * This class is used to access the Contacts on a system. This class as any OPIE PIM
54 * class is backend independent. 54 * class is backend independent.
55 * @author Stefan Eilers, Holger Freyther 55 * @author Stefan Eilers, Holger Freyther
56 * @see OPimAccessTemplate 56 * @see OPimAccessTemplate
57 */ 57 */
58class OContactAccess: public QObject, public OPimAccessTemplate<OContact> 58class OPimContactAccess: public QObject, public OPimAccessTemplate<OPimContact>
59{ 59{
60 Q_OBJECT 60 Q_OBJECT
61 61
62 public: 62 public:
63 /** 63 /**
64 * Create Database with contacts (addressbook). 64 * Create Database with contacts (addressbook).
65 * @param appname Name of application which wants access to the database 65 * @param appname Name of application which wants access to the database
66 * (i.e. "todolist") 66 * (i.e. "todolist")
67 * @param filename The name of the database file. If not set, the default one 67 * @param filename The name of the database file. If not set, the default one
68 * is used. 68 * is used.
69 * @param backend Pointer to an alternative Backend. If not set, we will use 69 * @param backend Pointer to an alternative Backend. If not set, we will use
70 * the default backend. 70 * the default backend.
71 * @param handlesync If <b>true</b> the database stores the current state 71 * @param handlesync If <b>true</b> the database stores the current state
72 * automatically if it receives the signals <i>flush()</i> and <i>reload()</i> 72 * automatically if it receives the signals <i>flush()</i> and <i>reload()</i>
73 * which are used before and after synchronisation. If the application wants 73 * which are used before and after synchronisation. If the application wants
74 * 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>
75 * @see OContactAccessBackend 75 * @see OPimContactAccessBackend
76 */ 76 */
77 OContactAccess (const QString appname, const QString filename = 0l, 77 OPimContactAccess (const QString appname, const QString filename = 0l,
78 OContactAccessBackend* backend = 0l, bool handlesync = true); 78 OPimContactAccessBackend* backend = 0l, bool handlesync = true);
79 ~OContactAccess (); 79 ~OPimContactAccess ();
80 80
81 /** Constants for query. 81 /** Constants for query.
82 * Use this constants to set the query parameters. 82 * Use this constants to set the query parameters.
83 * 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 !
84 * @see queryByExample() 84 * @see queryByExample()
85 */ 85 */
86 enum QuerySettings { 86 enum QuerySettings {
87 WildCards = 0x0001, 87 WildCards = 0x0001,
88 IgnoreCase = 0x0002, 88 IgnoreCase = 0x0002,
89 RegExp = 0x0004, 89 RegExp = 0x0004,
90 ExactMatch = 0x0008, 90 ExactMatch = 0x0008,
91 MatchOne = 0x0010, // Only one Entry must match 91 MatchOne = 0x0010, // Only one Entry must match
92 DateDiff = 0x0020, // Find all entries from today until given date 92 DateDiff = 0x0020, // Find all entries from today until given date
93 DateYear = 0x0040, // The year matches 93 DateYear = 0x0040, // The year matches
94 DateMonth = 0x0080, // The month matches 94 DateMonth = 0x0080, // The month matches
95 DateDay = 0x0100, // The day matches 95 DateDay = 0x0100, // The day matches
96 }; 96 };
97 97
98 98
99 /** Return all Contacts in a sorted manner. 99 /** Return all Contacts in a sorted manner.
100 * @param ascending true: Sorted in acending order. 100 * @param ascending true: Sorted in acending order.
101 * @param sortOrder Currently not implemented. Just defined to stay compatible to otodoaccess 101 * @param sortOrder Currently not implemented. Just defined to stay compatible to otodoaccess
102 * @param sortFilter Currently not implemented. Just defined to stay compatible to otodoaccess 102 * @param sortFilter Currently not implemented. Just defined to stay compatible to otodoaccess
103 * @param cat Currently not implemented. Just defined to stay compatible to otodoaccess 103 * @param cat Currently not implemented. Just defined to stay compatible to otodoaccess
@@ -114,45 +114,45 @@ class OContactAccess: public QObject, public OPimAccessTemplate<OContact>
114 * @return <i>true</i> if the given settings are correct and possible. 114 * @return <i>true</i> if the given settings are correct and possible.
115 */ 115 */
116 bool hasQuerySettings ( int querySettings ) const; 116 bool hasQuerySettings ( int querySettings ) const;
117 117
118 /** 118 /**
119 * if the resource was changed externally. 119 * if the resource was changed externally.
120 * You should use the signal instead of polling possible changes ! 120 * You should use the signal instead of polling possible changes !
121 */ 121 */
122 bool wasChangedExternally()const; 122 bool wasChangedExternally()const;
123 123
124 124
125 /** Save contacts database. 125 /** Save contacts database.
126 * Save is more a "commit". After calling this function, all changes are public available. 126 * Save is more a "commit". After calling this function, all changes are public available.
127 * @return true if successful 127 * @return true if successful
128 */ 128 */
129 bool save(); 129 bool save();
130 130
131 signals: 131 signals:
132 /* Signal is emitted if the database was changed. Therefore 132 /* Signal is emitted if the database was changed. Therefore
133 * we may need to reload to stay consistent. 133 * we may need to reload to stay consistent.
134 * @param which Pointer to the database who created this event. This pointer 134 * @param which Pointer to the database who created this event. This pointer
135 * is useful if an application has to handle multiple databases at the same time. 135 * is useful if an application has to handle multiple databases at the same time.
136 * @see reload() 136 * @see reload()
137 */ 137 */
138 void signalChanged ( const OContactAccess *which ); 138 void signalChanged ( const OPimContactAccess *which );
139 139
140 140
141 private: 141 private:
142 // class OContactAccessPrivate; 142 // class OPimContactAccessPrivate;
143 // OContactAccessPrivate* d; 143 // OPimContactAccessPrivate* d;
144 OContactAccessBackend *m_backEnd; 144 OPimContactAccessBackend *m_backEnd;
145 bool m_loading:1; 145 bool m_loading:1;
146 146
147 private slots: 147 private slots:
148 void copMessage( const QCString &msg, const QByteArray &data ); 148 void copMessage( const QCString &msg, const QByteArray &data );
149 149
150 private: 150 private:
151 class Private; 151 class Private;
152 Private *d; 152 Private *d;
153 153
154}; 154};
155 155
156} 156}
157 157
158#endif 158#endif