author | alwin <alwin> | 2004-03-14 13:50:35 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-03-14 13:50:35 (UTC) |
commit | 346288b5a95b72a84fabe9acb2e32aa8a8388c8c (patch) (unidiff) | |
tree | dd8a5e79020d05452d8568d626e77fed7d0f4e74 | |
parent | 0f7217afa7cdcb108dd2afba0ff6b42c97ab6f44 (diff) | |
download | opie-346288b5a95b72a84fabe9acb2e32aa8a8388c8c.zip opie-346288b5a95b72a84fabe9acb2e32aa8a8388c8c.tar.gz opie-346288b5a95b72a84fabe9acb2e32aa8a8388c8c.tar.bz2 |
namespace correction
-rw-r--r-- | libopie/pim/ocontactaccessbackend_sql.cpp | 5 | ||||
-rw-r--r-- | libopie/pim/ocontactaccessbackend_sql.h | 10 | ||||
-rw-r--r-- | libopie/pim/odatebookaccessbackend_sql.cpp | 4 | ||||
-rw-r--r-- | libopie/pim/odatebookaccessbackend_sql.h | 7 | ||||
-rw-r--r-- | libopie/pim/otodoaccesssql.cpp | 1 | ||||
-rw-r--r-- | libopie/pim/otodoaccesssql.h | 13 |
6 files changed, 31 insertions, 9 deletions
diff --git a/libopie/pim/ocontactaccessbackend_sql.cpp b/libopie/pim/ocontactaccessbackend_sql.cpp index a5be4c8..d20df56 100644 --- a/libopie/pim/ocontactaccessbackend_sql.cpp +++ b/libopie/pim/ocontactaccessbackend_sql.cpp | |||
@@ -13,8 +13,11 @@ | |||
13 | * Version: $Id$ | 13 | * Version: $Id$ |
14 | * ===================================================================== | 14 | * ===================================================================== |
15 | * History: | 15 | * History: |
16 | * $Log$ | 16 | * $Log$ |
17 | * Revision 1.5 2004/03/14 13:50:35 alwin | ||
18 | * namespace correction | ||
19 | * | ||
17 | * Revision 1.4 2003/12/22 10:19:26 eilers | 20 | * Revision 1.4 2003/12/22 10:19:26 eilers |
18 | * Finishing implementation of sql-backend for datebook. But I have to | 21 | * Finishing implementation of sql-backend for datebook. But I have to |
19 | * port the PIM datebook application to use it, before I could debug the | 22 | * port the PIM datebook application to use it, before I could debug the |
20 | * whole stuff. | 23 | * whole stuff. |
@@ -56,9 +59,9 @@ | |||
56 | #include <opie2/osqlresult.h> | 59 | #include <opie2/osqlresult.h> |
57 | #include <opie2/osqlmanager.h> | 60 | #include <opie2/osqlmanager.h> |
58 | #include <opie2/osqlquery.h> | 61 | #include <opie2/osqlquery.h> |
59 | 62 | ||
60 | 63 | using namespace Opie::DB; | |
61 | 64 | ||
62 | 65 | ||
63 | // If defined, we use a horizontal table ( uid, attr1, attr2, attr3, ..., attrn ) instead | 66 | // If defined, we use a horizontal table ( uid, attr1, attr2, attr3, ..., attrn ) instead |
64 | // vertical like "uid, type, value". | 67 | // vertical like "uid, type, value". |
diff --git a/libopie/pim/ocontactaccessbackend_sql.h b/libopie/pim/ocontactaccessbackend_sql.h index b8f1d8d..f553760 100644 --- a/libopie/pim/ocontactaccessbackend_sql.h +++ b/libopie/pim/ocontactaccessbackend_sql.h | |||
@@ -15,8 +15,11 @@ | |||
15 | * Version: $Id$ | 15 | * Version: $Id$ |
16 | * ===================================================================== | 16 | * ===================================================================== |
17 | * History: | 17 | * History: |
18 | * $Log$ | 18 | * $Log$ |
19 | * Revision 1.3 2004/03/14 13:50:35 alwin | ||
20 | * namespace correction | ||
21 | * | ||
19 | * Revision 1.2 2003/12/08 15:18:11 eilers | 22 | * Revision 1.2 2003/12/08 15:18:11 eilers |
20 | * Committing unfinished sql implementation before merging to libopie2 starts.. | 23 | * Committing unfinished sql implementation before merging to libopie2 starts.. |
21 | * | 24 | * |
22 | * Revision 1.1 2003/09/22 14:31:16 eilers | 25 | * Revision 1.1 2003/09/22 14:31:16 eilers |
@@ -35,12 +38,15 @@ | |||
35 | 38 | ||
36 | #include <qlist.h> | 39 | #include <qlist.h> |
37 | #include <qdict.h> | 40 | #include <qdict.h> |
38 | 41 | ||
42 | namespace Opie { namespace DB { | ||
39 | class OSQLDriver; | 43 | class OSQLDriver; |
40 | class OSQLResult; | 44 | class OSQLResult; |
41 | class OSQLResultItem; | 45 | class OSQLResultItem; |
42 | 46 | ||
47 | }} | ||
48 | |||
43 | /* the default xml implementation */ | 49 | /* the default xml implementation */ |
44 | /** | 50 | /** |
45 | * This class is the SQL implementation of a Contact backend | 51 | * This class is the SQL implementation of a Contact backend |
46 | * it does implement everything available for OContact. | 52 | * it does implement everything available for OContact. |
@@ -84,9 +90,9 @@ class OContactAccessBackend_SQL : public OContactAccessBackend { | |||
84 | bool remove ( int uid ); | 90 | bool remove ( int uid ); |
85 | bool reload(); | 91 | bool reload(); |
86 | 92 | ||
87 | private: | 93 | private: |
88 | QArray<int> extractUids( OSQLResult& res ) const; | 94 | QArray<int> extractUids( Opie::DB::OSQLResult& res ) const; |
89 | QMap<int, QString> requestNonCustom( int uid ) const; | 95 | QMap<int, QString> requestNonCustom( int uid ) const; |
90 | QMap<QString, QString> requestCustom( int uid ) const; | 96 | QMap<QString, QString> requestCustom( int uid ) const; |
91 | void update(); | 97 | void update(); |
92 | 98 | ||
@@ -94,8 +100,8 @@ class OContactAccessBackend_SQL : public OContactAccessBackend { | |||
94 | bool m_changed; | 100 | bool m_changed; |
95 | QString m_fileName; | 101 | QString m_fileName; |
96 | QArray<int> m_uids; | 102 | QArray<int> m_uids; |
97 | 103 | ||
98 | OSQLDriver* m_driver; | 104 | Opie::DB::OSQLDriver* m_driver; |
99 | }; | 105 | }; |
100 | 106 | ||
101 | #endif | 107 | #endif |
diff --git a/libopie/pim/odatebookaccessbackend_sql.cpp b/libopie/pim/odatebookaccessbackend_sql.cpp index 756f405..44dd2bc 100644 --- a/libopie/pim/odatebookaccessbackend_sql.cpp +++ b/libopie/pim/odatebookaccessbackend_sql.cpp | |||
@@ -13,8 +13,11 @@ | |||
13 | * Version: $Id$ | 13 | * Version: $Id$ |
14 | * ===================================================================== | 14 | * ===================================================================== |
15 | * History: | 15 | * History: |
16 | * $Log$ | 16 | * $Log$ |
17 | * Revision 1.4 2004/03/14 13:50:35 alwin | ||
18 | * namespace correction | ||
19 | * | ||
17 | * Revision 1.3 2003/12/22 11:41:39 eilers | 20 | * Revision 1.3 2003/12/22 11:41:39 eilers |
18 | * Fixing stupid bug, found by sourcode review.. | 21 | * Fixing stupid bug, found by sourcode review.. |
19 | * | 22 | * |
20 | * Revision 1.2 2003/12/22 10:19:26 eilers | 23 | * Revision 1.2 2003/12/22 10:19:26 eilers |
@@ -49,8 +52,9 @@ | |||
49 | 52 | ||
50 | #include "orecur.h" | 53 | #include "orecur.h" |
51 | #include "odatebookaccessbackend_sql.h" | 54 | #include "odatebookaccessbackend_sql.h" |
52 | 55 | ||
56 | using namespace Opie::DB; | ||
53 | 57 | ||
54 | 58 | ||
55 | ODateBookAccessBackend_SQL::ODateBookAccessBackend_SQL( const QString& , | 59 | ODateBookAccessBackend_SQL::ODateBookAccessBackend_SQL( const QString& , |
56 | const QString& fileName ) | 60 | const QString& fileName ) |
diff --git a/libopie/pim/odatebookaccessbackend_sql.h b/libopie/pim/odatebookaccessbackend_sql.h index f39e154..ba514bc 100644 --- a/libopie/pim/odatebookaccessbackend_sql.h +++ b/libopie/pim/odatebookaccessbackend_sql.h | |||
@@ -5,10 +5,13 @@ | |||
5 | #include <opie2/osqlresult.h> | 5 | #include <opie2/osqlresult.h> |
6 | 6 | ||
7 | #include "odatebookaccessbackend.h" | 7 | #include "odatebookaccessbackend.h" |
8 | 8 | ||
9 | namespace Opie { namespace DB { | ||
9 | class OSQLDriver; | 10 | class OSQLDriver; |
10 | 11 | ||
12 | }} | ||
13 | |||
11 | /** | 14 | /** |
12 | * This is the default SQL implementation for DateBoook SQL storage | 15 | * This is the default SQL implementation for DateBoook SQL storage |
13 | * It fully implements the interface | 16 | * It fully implements the interface |
14 | * @see ODateBookAccessBackend | 17 | * @see ODateBookAccessBackend |
@@ -47,16 +50,16 @@ private: | |||
47 | 50 | ||
48 | QMap<int, QString> m_fieldMap; | 51 | QMap<int, QString> m_fieldMap; |
49 | QMap<QString, int> m_reverseFieldMap; | 52 | QMap<QString, int> m_reverseFieldMap; |
50 | 53 | ||
51 | OSQLDriver* m_driver; | 54 | Opie::DB::OSQLDriver* m_driver; |
52 | 55 | ||
53 | class Private; | 56 | class Private; |
54 | Private *d; | 57 | Private *d; |
55 | 58 | ||
56 | void initFields(); | 59 | void initFields(); |
57 | void update(); | 60 | void update(); |
58 | QArray<int> extractUids( OSQLResult& res ) const; | 61 | QArray<int> extractUids( Opie::DB::OSQLResult& res ) const; |
59 | 62 | ||
60 | }; | 63 | }; |
61 | 64 | ||
62 | #endif | 65 | #endif |
diff --git a/libopie/pim/otodoaccesssql.cpp b/libopie/pim/otodoaccesssql.cpp index 3764c7e..fd01a42 100644 --- a/libopie/pim/otodoaccesssql.cpp +++ b/libopie/pim/otodoaccesssql.cpp | |||
@@ -12,8 +12,9 @@ | |||
12 | #include "opimstate.h" | 12 | #include "opimstate.h" |
13 | #include "opimnotifymanager.h" | 13 | #include "opimnotifymanager.h" |
14 | #include "orecur.h" | 14 | #include "orecur.h" |
15 | 15 | ||
16 | using namespace Opie::DB; | ||
16 | /* | 17 | /* |
17 | * first some query | 18 | * first some query |
18 | * CREATE query | 19 | * CREATE query |
19 | * LOAD query | 20 | * LOAD query |
diff --git a/libopie/pim/otodoaccesssql.h b/libopie/pim/otodoaccesssql.h index 1c55567..72214de 100644 --- a/libopie/pim/otodoaccesssql.h +++ b/libopie/pim/otodoaccesssql.h | |||
@@ -4,11 +4,16 @@ | |||
4 | #include <qasciidict.h> | 4 | #include <qasciidict.h> |
5 | 5 | ||
6 | #include "otodoaccessbackend.h" | 6 | #include "otodoaccessbackend.h" |
7 | 7 | ||
8 | namespace Opie{ | ||
9 | namespace DB { | ||
8 | class OSQLDriver; | 10 | class OSQLDriver; |
9 | class OSQLResult; | 11 | class OSQLResult; |
10 | class OSQLResultItem; | 12 | class OSQLResultItem; |
13 | } | ||
14 | } | ||
15 | |||
11 | class OTodoAccessBackendSQL : public OTodoAccessBackend { | 16 | class OTodoAccessBackendSQL : public OTodoAccessBackend { |
12 | public: | 17 | public: |
13 | OTodoAccessBackendSQL( const QString& file ); | 18 | OTodoAccessBackendSQL( const QString& file ); |
14 | ~OTodoAccessBackendSQL(); | 19 | ~OTodoAccessBackendSQL(); |
@@ -39,16 +44,16 @@ public: | |||
39 | private: | 44 | private: |
40 | void update()const; | 45 | void update()const; |
41 | void fillDict(); | 46 | void fillDict(); |
42 | inline bool date( QDate& date, const QString& )const; | 47 | inline bool date( QDate& date, const QString& )const; |
43 | inline OTodo todo( const OSQLResult& )const; | 48 | inline OTodo todo( const Opie::DB::OSQLResult& )const; |
44 | inline OTodo todo( OSQLResultItem& )const; | 49 | inline OTodo todo( Opie::DB::OSQLResultItem& )const; |
45 | inline QArray<int> uids( const OSQLResult& )const; | 50 | inline QArray<int> uids( const Opie::DB::OSQLResult& )const; |
46 | OTodo todo( int uid )const; | 51 | OTodo todo( int uid )const; |
47 | QBitArray sup() const; | 52 | QBitArray sup() const; |
48 | 53 | ||
49 | QAsciiDict<int> m_dict; | 54 | QAsciiDict<int> m_dict; |
50 | OSQLDriver* m_driver; | 55 | Opie::DB::OSQLDriver* m_driver; |
51 | QArray<int> m_uids; | 56 | QArray<int> m_uids; |
52 | bool m_dirty : 1; | 57 | bool m_dirty : 1; |
53 | }; | 58 | }; |
54 | 59 | ||