author | eilers <eilers> | 2004-12-20 14:14:07 (UTC) |
---|---|---|
committer | eilers <eilers> | 2004-12-20 14:14:07 (UTC) |
commit | 18e47153532d016d878f47e0ce11cb1a9716218e (patch) (side-by-side diff) | |
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) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiepim/backend/ocontactaccessbackend_sql.h | 23 |
1 files changed, 12 insertions, 11 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,23 +70,24 @@ class OPimContactAccessBackend_SQL : public OPimContactAccessBackend { bool wasChangedExternally(); - QArray<int> allRecords() const; + UIDArray allRecords() const; OPimContact find( int uid ) const; - OPimContact find( int uid, const QArray<int>& items, uint cur, Frontend::CacheDirection ) const; + OPimContact find( int uid, const UIDArray& items, uint cur, Frontend::CacheDirection ) const; - QArray<int> queryByExample ( const OPimContact &query, int settings, - const QDateTime& d ); + UIDArray queryByExample ( const OPimContact &query, int settings, + const QDateTime& d ) const; - QArray<int> matchRegexp( const QRegExp &r ) const; + UIDArray matchRegexp( const QRegExp &r ) const; - const uint querySettings(); + const uint querySettings() const; bool hasQuerySettings (uint querySettings) const; - // Currently only asc implemented.. - QArray<int> sorted( bool asc, int , int , int ); - bool add ( const OPimContact &newcontact ); + UIDArray sorted( const UIDArray& ar, bool asc, int sortOrder, + int filter, const QArray<int>& categories)const; + + bool add ( const OPimContact &newcontact ); bool replace ( const OPimContact &contact ); @@ -94,7 +95,7 @@ class OPimContactAccessBackend_SQL : public OPimContactAccessBackend { bool reload(); private: - QArray<int> extractUids( Opie::DB::OSQLResult& res ) const; + UIDArray extractUids( Opie::DB::OSQLResult& res ) const; QMap<int, QString> requestNonCustom( int uid ) const; QMap<QString, QString> requestCustom( int uid ) const; QMap<int, QString> fillNonCustomMap( const Opie::DB::OSQLResultItem& resultItem ) const; @@ -104,7 +105,7 @@ class OPimContactAccessBackend_SQL : public OPimContactAccessBackend { protected: bool m_changed; QString m_fileName; - QArray<int> m_uids; + UIDArray m_uids; Opie::DB::OSQLDriver* m_driver; }; |