-rw-r--r-- | libopie2/opiepim/core/ocontactaccess.cpp | 4 | ||||
-rw-r--r-- | libopie2/opiepim/core/ocontactaccess.h | 49 | ||||
-rw-r--r-- | libopie2/opiepim/core/opimaccesstemplate.h | 12 |
3 files changed, 16 insertions, 49 deletions
diff --git a/libopie2/opiepim/core/ocontactaccess.cpp b/libopie2/opiepim/core/ocontactaccess.cpp index b5f358b..e8c0a45 100644 --- a/libopie2/opiepim/core/ocontactaccess.cpp +++ b/libopie2/opiepim/core/ocontactaccess.cpp | |||
@@ -22,4 +22,7 @@ | |||
22 | * History: | 22 | * History: |
23 | * $Log$ | 23 | * $Log$ |
24 | * Revision 1.4 2002/10/14 16:21:54 eilers | ||
25 | * Some minor interface updates | ||
26 | * | ||
24 | * Revision 1.3 2002/10/07 17:34:24 eilers | 27 | * Revision 1.3 2002/10/07 17:34:24 eilers |
25 | * added OBackendFactory for advanced backend access | 28 | * added OBackendFactory for advanced backend access |
@@ -67,5 +70,4 @@ OContactAccess::OContactAccess ( const QString appname, const QString , | |||
67 | */ | 70 | */ |
68 | if( end == 0 ) { | 71 | if( end == 0 ) { |
69 | // __asm__("int3"); | ||
70 | qWarning ("Using BackendFactory !"); | 72 | qWarning ("Using BackendFactory !"); |
71 | end = OBackendFactory<OContactAccessBackend>::Default( "contact", appname ); | 73 | end = OBackendFactory<OContactAccessBackend>::Default( "contact", appname ); |
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 | |||
@@ -18,4 +18,7 @@ | |||
18 | * History: | 18 | * History: |
19 | * $Log$ | 19 | * $Log$ |
20 | * Revision 1.2 2002/10/14 16:21:54 eilers | ||
21 | * Some minor interface updates | ||
22 | * | ||
20 | * Revision 1.1 2002/09/27 17:11:44 eilers | 23 | * Revision 1.1 2002/09/27 17:11:44 eilers |
21 | * Added API for accessing the Contact-Database ! It is compiling, but | 24 | * Added API for accessing the Contact-Database ! It is compiling, but |
@@ -48,36 +51,4 @@ class OContactAccess: public QObject, public OPimAccessTemplate<OContact> | |||
48 | Q_OBJECT | 51 | Q_OBJECT |
49 | 52 | ||
50 | |||
51 | /* class Iterator{ | ||
52 | friend OContactAccess; | ||
53 | public: | ||
54 | Iterator(); | ||
55 | Iterator ( const Iterator& copy ); | ||
56 | |||
57 | bool operator== ( const Iterator& it ); | ||
58 | bool operator!= ( const Iterator& it ); | ||
59 | Iterator& operator= ( const Iterator& it ); | ||
60 | Iterator& operator++ (); // prefix | ||
61 | Iterator operator++ ( int ); // postfix | ||
62 | Iterator& operator-- (); // prefix | ||
63 | Iterator operator-- ( int ); // postfix | ||
64 | Contact operator*() const; | ||
65 | Contact operator->() const; | ||
66 | |||
67 | Iterator begin(); | ||
68 | Iterator end(); | ||
69 | |||
70 | uint count() const; | ||
71 | |||
72 | private: | ||
73 | QValueList<int> m_uids; | ||
74 | int m_cur_position; | ||
75 | bool m_end_reached; | ||
76 | OContactAccess *m_db; | ||
77 | |||
78 | }; | ||
79 | |||
80 | */ | ||
81 | |||
82 | public: | 53 | public: |
83 | /** Create Database with contacts (addressbook). | 54 | /** Create Database with contacts (addressbook). |
@@ -92,5 +63,5 @@ class OContactAccess: public QObject, public OPimAccessTemplate<OContact> | |||
92 | * which are used before and after synchronisation. If the application wants | 63 | * which are used before and after synchronisation. If the application wants |
93 | * to react itself, it should be disabled by setting it to <b>false</b> | 64 | * to react itself, it should be disabled by setting it to <b>false</b> |
94 | * @see OContactBackend | 65 | * @see OContactAccessBackend |
95 | */ | 66 | */ |
96 | OContactAccess (const QString appname, const QString filename = 0l, | 67 | OContactAccess (const QString appname, const QString filename = 0l, |
@@ -102,11 +73,11 @@ class OContactAccess: public QObject, public OPimAccessTemplate<OContact> | |||
102 | * Note: <i>query_IgnoreCase</i> just make sense with one of the other attributes ! | 73 | * Note: <i>query_IgnoreCase</i> just make sense with one of the other attributes ! |
103 | * @see queryByExample() | 74 | * @see queryByExample() |
104 | * - why not enum - zecke? | ||
105 | * -> Had some implementation problems .. Will use enum soon ! .. (se) | ||
106 | */ | 75 | */ |
107 | static const int query_WildCards = 0x0001; | 76 | enum QuerySettings { |
108 | static const int query_IgnoreCase = 0x0002; | 77 | WildCards = 0x0001, |
109 | static const int query_RegExp = 0x0004; | 78 | IgnoreCase = 0x0002, |
110 | static const int query_ExactMatch = 0x0008; | 79 | RegExp = 0x0004, |
80 | ExactMatch = 0x0008, | ||
81 | }; | ||
111 | 82 | ||
112 | /** Return all possible settings. | 83 | /** Return all possible settings. |
diff --git a/libopie2/opiepim/core/opimaccesstemplate.h b/libopie2/opiepim/core/opimaccesstemplate.h index a0d8f63..3e1f393 100644 --- a/libopie2/opiepim/core/opimaccesstemplate.h +++ b/libopie2/opiepim/core/opimaccesstemplate.h | |||
@@ -28,11 +28,4 @@ public: | |||
28 | 28 | ||
29 | /** | 29 | /** |
30 | * our sort order | ||
31 | * should be safe explaining | ||
32 | */ | ||
33 | enum SortOrder { WildCards = 0, IgnoreCase = 1, | ||
34 | RegExp = 2, ExactMatch = 4 }; | ||
35 | |||
36 | /** | ||
37 | * c'tor BackEnd | 30 | * c'tor BackEnd |
38 | */ | 31 | */ |
@@ -67,7 +60,8 @@ public: | |||
67 | 60 | ||
68 | /** | 61 | /** |
69 | * queryByExample | 62 | * queryByExample) |
63 | * @see otodoaccess, ocontactaccess | ||
70 | */ | 64 | */ |
71 | virtual List queryByExample( const T& t, int sortOrder ); | 65 | virtual List queryByExample( const T& t, int querySettings ); |
72 | 66 | ||
73 | /** | 67 | /** |