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 | |||
@@ -67,47 +67,48 @@ class OPimContactAccessBackend_SQL : public OPimContactAccessBackend { | |||
67 | bool load (); | 67 | bool load (); |
68 | 68 | ||
69 | void clear (); | 69 | void clear (); |
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 | bool add ( const OPimContact &newcontact ); | 89 | |
90 | bool add ( const OPimContact &newcontact ); | ||
90 | 91 | ||
91 | bool replace ( const OPimContact &contact ); | 92 | bool replace ( const OPimContact &contact ); |
92 | 93 | ||
93 | bool remove ( int uid ); | 94 | bool remove ( int uid ); |
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; |
101 | OPimContact requestContactsAndCache( int uid, const QArray<int>& cachelist ) const; | 102 | OPimContact requestContactsAndCache( int uid, const QArray<int>& cachelist ) const; |
102 | void update(); | 103 | void update(); |
103 | 104 | ||
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 | }; |
111 | 112 | ||
112 | } | 113 | } |
113 | 114 | ||