author | eilers <eilers> | 2004-12-20 14:14:07 (UTC) |
---|---|---|
committer | eilers <eilers> | 2004-12-20 14:14:07 (UTC) |
commit | 18e47153532d016d878f47e0ce11cb1a9716218e (patch) (unidiff) | |
tree | 52eb6c25258fda0b2f295a29809c4603f5e17b0b /libopie2/opiepim/backend/ocontactaccessbackend_sql.h | |
parent | 876e48baa20213d8265041cfac3034fe92cb0590 (diff) | |
download | opie-18e47153532d016d878f47e0ce11cb1a9716218e.zip opie-18e47153532d016d878f47e0ce11cb1a9716218e.tar.gz opie-18e47153532d016d878f47e0ce11cb1a9716218e.tar.bz2 |
Recovery of the following Changes:
* Implement fast and full featured version of sorted() for addressbook
* Implement generic queryByExample for all Addressboook backends. It allows incremental search.
* Update of API Documentation
Diffstat (limited to 'libopie2/opiepim/backend/ocontactaccessbackend_sql.h') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie2/opiepim/backend/ocontactaccessbackend_sql.h | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/libopie2/opiepim/backend/ocontactaccessbackend_sql.h b/libopie2/opiepim/backend/ocontactaccessbackend_sql.h index 28d9746..299c175 100644 --- a/libopie2/opiepim/backend/ocontactaccessbackend_sql.h +++ b/libopie2/opiepim/backend/ocontactaccessbackend_sql.h | |||
@@ -70,22 +70,23 @@ class OPimContactAccessBackend_SQL : public OPimContactAccessBackend { | |||
70 | 70 | ||
71 | bool wasChangedExternally(); | 71 | bool wasChangedExternally(); |
72 | 72 | ||
73 | QArray<int> allRecords() const; | 73 | UIDArray allRecords() const; |
74 | 74 | ||
75 | OPimContact find( int uid ) const; | 75 | OPimContact find( int uid ) const; |
76 | OPimContact find( int uid, const QArray<int>& items, uint cur, Frontend::CacheDirection ) const; | 76 | OPimContact find( int uid, const UIDArray& items, uint cur, Frontend::CacheDirection ) const; |
77 | 77 | ||
78 | QArray<int> queryByExample ( const OPimContact &query, int settings, | 78 | UIDArray queryByExample ( const OPimContact &query, int settings, |
79 | const QDateTime& d ); | 79 | const QDateTime& d ) const; |
80 | 80 | ||
81 | QArray<int> matchRegexp( const QRegExp &r ) const; | 81 | UIDArray matchRegexp( const QRegExp &r ) const; |
82 | 82 | ||
83 | const uint querySettings(); | 83 | const uint querySettings() const; |
84 | 84 | ||
85 | bool hasQuerySettings (uint querySettings) const; | 85 | bool hasQuerySettings (uint querySettings) const; |
86 | 86 | ||
87 | // Currently only asc implemented.. | 87 | UIDArray sorted( const UIDArray& ar, bool asc, int sortOrder, |
88 | QArray<int> sorted( bool asc, int , int , int ); | 88 | int filter, const QArray<int>& categories)const; |
89 | |||
89 | bool add ( const OPimContact &newcontact ); | 90 | bool add ( const OPimContact &newcontact ); |
90 | 91 | ||
91 | bool replace ( const OPimContact &contact ); | 92 | bool replace ( const OPimContact &contact ); |
@@ -94,7 +95,7 @@ class OPimContactAccessBackend_SQL : public OPimContactAccessBackend { | |||
94 | bool reload(); | 95 | bool reload(); |
95 | 96 | ||
96 | private: | 97 | private: |
97 | QArray<int> extractUids( Opie::DB::OSQLResult& res ) const; | 98 | UIDArray extractUids( Opie::DB::OSQLResult& res ) const; |
98 | QMap<int, QString> requestNonCustom( int uid ) const; | 99 | QMap<int, QString> requestNonCustom( int uid ) const; |
99 | QMap<QString, QString> requestCustom( int uid ) const; | 100 | QMap<QString, QString> requestCustom( int uid ) const; |
100 | QMap<int, QString> fillNonCustomMap( const Opie::DB::OSQLResultItem& resultItem ) const; | 101 | QMap<int, QString> fillNonCustomMap( const Opie::DB::OSQLResultItem& resultItem ) const; |
@@ -104,7 +105,7 @@ class OPimContactAccessBackend_SQL : public OPimContactAccessBackend { | |||
104 | protected: | 105 | protected: |
105 | bool m_changed; | 106 | bool m_changed; |
106 | QString m_fileName; | 107 | QString m_fileName; |
107 | QArray<int> m_uids; | 108 | UIDArray m_uids; |
108 | 109 | ||
109 | Opie::DB::OSQLDriver* m_driver; | 110 | Opie::DB::OSQLDriver* m_driver; |
110 | }; | 111 | }; |