Diffstat (limited to 'libopie2/opiepim/backend/ocontactaccessbackend_sql.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiepim/backend/ocontactaccessbackend_sql.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/libopie2/opiepim/backend/ocontactaccessbackend_sql.h b/libopie2/opiepim/backend/ocontactaccessbackend_sql.h index 55b95fd..58ae2ae 100644 --- a/libopie2/opiepim/backend/ocontactaccessbackend_sql.h +++ b/libopie2/opiepim/backend/ocontactaccessbackend_sql.h | |||
@@ -27,14 +27,14 @@ | |||
27 | Boston, MA 02111-1307, USA. | 27 | Boston, MA 02111-1307, USA. |
28 | */ | 28 | */ |
29 | /* | 29 | /* |
30 | * SQL Backend for the OPIE-Contact Database. | 30 | * SQL Backend for the OPIE-Contact Database. |
31 | */ | 31 | */ |
32 | 32 | ||
33 | #ifndef _OContactAccessBackend_SQL_ | 33 | #ifndef _OPimContactAccessBackend_SQL_ |
34 | #define _OContactAccessBackend_SQL_ | 34 | #define _OPimContactAccessBackend_SQL_ |
35 | 35 | ||
36 | #include <opie2/ocontactaccessbackend.h> | 36 | #include <opie2/ocontactaccessbackend.h> |
37 | #include <opie2/ocontactaccess.h> | 37 | #include <opie2/ocontactaccess.h> |
38 | 38 | ||
39 | #include <qlist.h> | 39 | #include <qlist.h> |
40 | #include <qdict.h> | 40 | #include <qdict.h> |
@@ -46,49 +46,49 @@ class OSQLResultItem; | |||
46 | 46 | ||
47 | namespace Opie { | 47 | namespace Opie { |
48 | 48 | ||
49 | /* the default xml implementation */ | 49 | /* the default xml implementation */ |
50 | /** | 50 | /** |
51 | * This class is the SQL implementation of a Contact backend | 51 | * This class is the SQL implementation of a Contact backend |
52 | * it does implement everything available for OContact. | 52 | * it does implement everything available for OPimContact. |
53 | * @see OPimAccessBackend for more information of available methods | 53 | * @see OPimAccessBackend for more information of available methods |
54 | */ | 54 | */ |
55 | class OContactAccessBackend_SQL : public OContactAccessBackend { | 55 | class OPimContactAccessBackend_SQL : public OPimContactAccessBackend { |
56 | public: | 56 | public: |
57 | OContactAccessBackend_SQL ( const QString& appname, const QString& filename = QString::null ); | 57 | OPimContactAccessBackend_SQL ( const QString& appname, const QString& filename = QString::null ); |
58 | 58 | ||
59 | ~OContactAccessBackend_SQL (); | 59 | ~OPimContactAccessBackend_SQL (); |
60 | 60 | ||
61 | bool save(); | 61 | bool save(); |
62 | 62 | ||
63 | bool load (); | 63 | bool load (); |
64 | 64 | ||
65 | void clear (); | 65 | void clear (); |
66 | 66 | ||
67 | bool wasChangedExternally(); | 67 | bool wasChangedExternally(); |
68 | 68 | ||
69 | QArray<int> allRecords() const; | 69 | QArray<int> allRecords() const; |
70 | 70 | ||
71 | OContact find ( int uid ) const; | 71 | OPimContact find ( int uid ) const; |
72 | // FIXME: Add lookahead-cache support ! | 72 | // FIXME: Add lookahead-cache support ! |
73 | //OContact find(int uid, const QArray<int>&, uint cur, Frontend::CacheDirection )const; | 73 | //OPimContact find(int uid, const QArray<int>&, uint cur, Frontend::CacheDirection )const; |
74 | 74 | ||
75 | QArray<int> queryByExample ( const OContact &query, int settings, | 75 | QArray<int> queryByExample ( const OPimContact &query, int settings, |
76 | const QDateTime& d ); | 76 | const QDateTime& d ); |
77 | 77 | ||
78 | QArray<int> matchRegexp( const QRegExp &r ) const; | 78 | QArray<int> matchRegexp( const QRegExp &r ) const; |
79 | 79 | ||
80 | const uint querySettings(); | 80 | const uint querySettings(); |
81 | 81 | ||
82 | bool hasQuerySettings (uint querySettings) const; | 82 | bool hasQuerySettings (uint querySettings) const; |
83 | 83 | ||
84 | // Currently only asc implemented.. | 84 | // Currently only asc implemented.. |
85 | QArray<int> sorted( bool asc, int , int , int ); | 85 | QArray<int> sorted( bool asc, int , int , int ); |
86 | bool add ( const OContact &newcontact ); | 86 | bool add ( const OPimContact &newcontact ); |
87 | 87 | ||
88 | bool replace ( const OContact &contact ); | 88 | bool replace ( const OPimContact &contact ); |
89 | 89 | ||
90 | bool remove ( int uid ); | 90 | bool remove ( int uid ); |
91 | bool reload(); | 91 | bool reload(); |
92 | 92 | ||
93 | private: | 93 | private: |
94 | QArray<int> extractUids( OSQLResult& res ) const; | 94 | QArray<int> extractUids( OSQLResult& res ) const; |