Diffstat (limited to 'libopie2/opiepim/backend/odatebookaccessbackend_sql.h') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie2/opiepim/backend/odatebookaccessbackend_sql.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libopie2/opiepim/backend/odatebookaccessbackend_sql.h b/libopie2/opiepim/backend/odatebookaccessbackend_sql.h index cbfeb97..60d7f21 100644 --- a/libopie2/opiepim/backend/odatebookaccessbackend_sql.h +++ b/libopie2/opiepim/backend/odatebookaccessbackend_sql.h | |||
@@ -25,25 +25,29 @@ | |||
25 | If not, write to the Free Software Foundation, | 25 | If not, write to the Free Software Foundation, |
26 | Inc., 59 Temple Place - Suite 330, | 26 | Inc., 59 Temple Place - Suite 330, |
27 | Boston, MA 02111-1307, USA. | 27 | Boston, MA 02111-1307, USA. |
28 | */ | 28 | */ |
29 | #ifndef OPIE_DATE_BOOK_ACCESS_BACKEND_SQL__H | 29 | #ifndef OPIE_DATE_BOOK_ACCESS_BACKEND_SQL__H |
30 | #define OPIE_DATE_BOOK_ACCESS_BACKEND_SQL__H | 30 | #define OPIE_DATE_BOOK_ACCESS_BACKEND_SQL__H |
31 | 31 | ||
32 | #include <qmap.h> | 32 | #include <qmap.h> |
33 | #include <opie2/osqlresult.h> | 33 | #include <opie2/osqlresult.h> |
34 | 34 | ||
35 | #include <opie2/odatebookaccessbackend.h> | 35 | #include <opie2/odatebookaccessbackend.h> |
36 | 36 | ||
37 | namespace Opie { | ||
38 | namespace DB { | ||
37 | class OSQLDriver; | 39 | class OSQLDriver; |
40 | } | ||
41 | } | ||
38 | 42 | ||
39 | namespace Opie { | 43 | namespace Opie { |
40 | /** | 44 | /** |
41 | * This is the default SQL implementation for DateBoook SQL storage | 45 | * This is the default SQL implementation for DateBoook SQL storage |
42 | * It fully implements the interface | 46 | * It fully implements the interface |
43 | * @see ODateBookAccessBackend | 47 | * @see ODateBookAccessBackend |
44 | * @see OPimAccessBackend | 48 | * @see OPimAccessBackend |
45 | */ | 49 | */ |
46 | class ODateBookAccessBackend_SQL : public ODateBookAccessBackend { | 50 | class ODateBookAccessBackend_SQL : public ODateBookAccessBackend { |
47 | public: | 51 | public: |
48 | ODateBookAccessBackend_SQL( const QString& appName, | 52 | ODateBookAccessBackend_SQL( const QString& appName, |
49 | const QString& fileName = QString::null); | 53 | const QString& fileName = QString::null); |
@@ -68,26 +72,26 @@ public: | |||
68 | 72 | ||
69 | OPimEvent::ValueList directNonRepeats(); | 73 | OPimEvent::ValueList directNonRepeats(); |
70 | OPimEvent::ValueList directRawRepeats(); | 74 | OPimEvent::ValueList directRawRepeats(); |
71 | 75 | ||
72 | private: | 76 | private: |
73 | bool loadFile(); | 77 | bool loadFile(); |
74 | QString m_fileName; | 78 | QString m_fileName; |
75 | QArray<int> m_uids; | 79 | QArray<int> m_uids; |
76 | 80 | ||
77 | QMap<int, QString> m_fieldMap; | 81 | QMap<int, QString> m_fieldMap; |
78 | QMap<QString, int> m_reverseFieldMap; | 82 | QMap<QString, int> m_reverseFieldMap; |
79 | 83 | ||
80 | OSQLDriver* m_driver; | 84 | Opie::DB::OSQLDriver* m_driver; |
81 | 85 | ||
82 | class Private; | 86 | class Private; |
83 | Private *d; | 87 | Private *d; |
84 | 88 | ||
85 | void initFields(); | 89 | void initFields(); |
86 | void update(); | 90 | void update(); |
87 | QArray<int> extractUids( OSQLResult& res ) const; | 91 | QArray<int> extractUids( Opie::DB::OSQLResult& res ) const; |
88 | 92 | ||
89 | }; | 93 | }; |
90 | 94 | ||
91 | } | 95 | } |
92 | 96 | ||
93 | #endif | 97 | #endif |