author | eilers <eilers> | 2003-12-08 15:18:10 (UTC) |
---|---|---|
committer | eilers <eilers> | 2003-12-08 15:18:10 (UTC) |
commit | 6974a4bbdc674a2a5d41d801f80035a183faedb5 (patch) (unidiff) | |
tree | 09a719ef263047e92ffb866da13168b7f7d41f23 /libopie/pim/ocontactaccessbackend_sql.h | |
parent | 7f2f736597490fd1592d7ed1f40e4abf824673c0 (diff) | |
download | opie-6974a4bbdc674a2a5d41d801f80035a183faedb5.zip opie-6974a4bbdc674a2a5d41d801f80035a183faedb5.tar.gz opie-6974a4bbdc674a2a5d41d801f80035a183faedb5.tar.bz2 |
Committing unfinished sql implementation before merging to libopie2 starts..
Diffstat (limited to 'libopie/pim/ocontactaccessbackend_sql.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie/pim/ocontactaccessbackend_sql.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libopie/pim/ocontactaccessbackend_sql.h b/libopie/pim/ocontactaccessbackend_sql.h index bb22551..b8f1d8d 100644 --- a/libopie/pim/ocontactaccessbackend_sql.h +++ b/libopie/pim/ocontactaccessbackend_sql.h | |||
@@ -1,73 +1,78 @@ | |||
1 | /* | 1 | /* |
2 | * SQL Backend for the OPIE-Contact Database. | 2 | * SQL Backend for the OPIE-Contact Database. |
3 | * | 3 | * |
4 | * Copyright (c) 2002 by Stefan Eilers (Eilers.Stefan@epost.de) | 4 | * Copyright (c) 2002 by Stefan Eilers (Eilers.Stefan@epost.de) |
5 | * | 5 | * |
6 | * ===================================================================== | 6 | * ===================================================================== |
7 | *This program is free software; you can redistribute it and/or | 7 | *This program is free software; you can redistribute it and/or |
8 | *modify it under the terms of the GNU Library General Public | 8 | *modify it under the terms of the GNU Library General Public |
9 | * License as published by the Free Software Foundation; either | 9 | * License as published by the Free Software Foundation; either |
10 | * version 2 of the License, or (at your option) any later version. | 10 | * version 2 of the License, or (at your option) any later version. |
11 | * ===================================================================== | 11 | * ===================================================================== |
12 | * | 12 | * |
13 | * | 13 | * |
14 | * ===================================================================== | 14 | * ===================================================================== |
15 | * Version: $Id$ | 15 | * Version: $Id$ |
16 | * ===================================================================== | 16 | * ===================================================================== |
17 | * History: | 17 | * History: |
18 | * $Log$ | 18 | * $Log$ |
19 | * Revision 1.2 2003/12/08 15:18:11 eilers | ||
20 | * Committing unfinished sql implementation before merging to libopie2 starts.. | ||
21 | * | ||
19 | * Revision 1.1 2003/09/22 14:31:16 eilers | 22 | * Revision 1.1 2003/09/22 14:31:16 eilers |
20 | * Added first experimental incarnation of sql-backend for addressbook. | 23 | * Added first experimental incarnation of sql-backend for addressbook. |
21 | * Some modifications to be able to compile the todo sql-backend. | 24 | * Some modifications to be able to compile the todo sql-backend. |
22 | * A lot of changes fill follow... | 25 | * A lot of changes fill follow... |
23 | * | 26 | * |
24 | * | 27 | * |
25 | */ | 28 | */ |
26 | 29 | ||
27 | #ifndef _OContactAccessBackend_SQL_ | 30 | #ifndef _OContactAccessBackend_SQL_ |
28 | #define _OContactAccessBackend_SQL_ | 31 | #define _OContactAccessBackend_SQL_ |
29 | 32 | ||
30 | #include "ocontactaccessbackend.h" | 33 | #include "ocontactaccessbackend.h" |
31 | #include "ocontactaccess.h" | 34 | #include "ocontactaccess.h" |
32 | 35 | ||
33 | #include <qlist.h> | 36 | #include <qlist.h> |
34 | #include <qdict.h> | 37 | #include <qdict.h> |
35 | 38 | ||
36 | class OSQLDriver; | 39 | class OSQLDriver; |
37 | class OSQLResult; | 40 | class OSQLResult; |
38 | class OSQLResultItem; | 41 | class OSQLResultItem; |
39 | 42 | ||
40 | /* the default xml implementation */ | 43 | /* the default xml implementation */ |
41 | /** | 44 | /** |
42 | * This class is the SQL implementation of a Contact backend | 45 | * This class is the SQL implementation of a Contact backend |
43 | * it does implement everything available for OContact. | 46 | * it does implement everything available for OContact. |
44 | * @see OPimAccessBackend for more information of available methods | 47 | * @see OPimAccessBackend for more information of available methods |
45 | */ | 48 | */ |
46 | class OContactAccessBackend_SQL : public OContactAccessBackend { | 49 | class OContactAccessBackend_SQL : public OContactAccessBackend { |
47 | public: | 50 | public: |
48 | OContactAccessBackend_SQL ( const QString& appname, const QString& filename = QString::null ); | 51 | OContactAccessBackend_SQL ( const QString& appname, const QString& filename = QString::null ); |
49 | 52 | ||
53 | ~OContactAccessBackend_SQL (); | ||
54 | |||
50 | bool save(); | 55 | bool save(); |
51 | 56 | ||
52 | bool load (); | 57 | bool load (); |
53 | 58 | ||
54 | void clear (); | 59 | void clear (); |
55 | 60 | ||
56 | bool wasChangedExternally(); | 61 | bool wasChangedExternally(); |
57 | 62 | ||
58 | QArray<int> allRecords() const; | 63 | QArray<int> allRecords() const; |
59 | 64 | ||
60 | OContact find ( int uid ) const; | 65 | OContact find ( int uid ) const; |
61 | // FIXME: Add lookahead-cache support ! | 66 | // FIXME: Add lookahead-cache support ! |
62 | //OContact find(int uid, const QArray<int>&, uint cur, Frontend::CacheDirection )const; | 67 | //OContact find(int uid, const QArray<int>&, uint cur, Frontend::CacheDirection )const; |
63 | 68 | ||
64 | QArray<int> queryByExample ( const OContact &query, int settings, | 69 | QArray<int> queryByExample ( const OContact &query, int settings, |
65 | const QDateTime& d ); | 70 | const QDateTime& d ); |
66 | 71 | ||
67 | QArray<int> matchRegexp( const QRegExp &r ) const; | 72 | QArray<int> matchRegexp( const QRegExp &r ) const; |
68 | 73 | ||
69 | const uint querySettings(); | 74 | const uint querySettings(); |
70 | 75 | ||
71 | bool hasQuerySettings (uint querySettings) const; | 76 | bool hasQuerySettings (uint querySettings) const; |
72 | 77 | ||
73 | // Currently only asc implemented.. | 78 | // Currently only asc implemented.. |