-rw-r--r-- | libopie2/opiedb/TODO | 1 | ||||
-rw-r--r-- | libopie2/opiedb/opiedb.pro | 2 | ||||
-rw-r--r-- | libopie2/opiedb/osqlbackend.cpp | 2 | ||||
-rw-r--r-- | libopie2/opiedb/osqlbackend.h | 8 | ||||
-rw-r--r-- | libopie2/opiedb/osqlbackendmanager.cpp | 8 | ||||
-rw-r--r-- | libopie2/opiedb/osqlbackendmanager.h | 6 | ||||
-rw-r--r-- | libopie2/opiedb/osqldriver.cpp | 2 | ||||
-rw-r--r-- | libopie2/opiedb/osqldriver.h | 7 | ||||
-rw-r--r-- | libopie2/opiedb/osqlerror.cpp | 2 | ||||
-rw-r--r-- | libopie2/opiedb/osqlerror.h | 5 | ||||
-rw-r--r-- | libopie2/opiedb/osqlitedriver.cpp | 9 | ||||
-rw-r--r-- | libopie2/opiedb/osqlitedriver.h | 8 | ||||
-rw-r--r-- | libopie2/opiedb/osqlmanager.cpp | 6 | ||||
-rw-r--r-- | libopie2/opiedb/osqlmanager.h | 6 | ||||
-rw-r--r-- | libopie2/opiedb/osqlquery.cpp | 2 | ||||
-rw-r--r-- | libopie2/opiedb/osqlquery.h | 8 | ||||
-rw-r--r-- | libopie2/opiedb/osqlresult.cpp | 2 | ||||
-rw-r--r-- | libopie2/opiedb/osqlresult.h | 8 | ||||
-rw-r--r-- | libopie2/opiedb/osqltable.cpp | 2 | ||||
-rw-r--r-- | libopie2/opiedb/osqltable.h | 7 |
20 files changed, 95 insertions, 6 deletions
diff --git a/libopie2/opiedb/TODO b/libopie2/opiedb/TODO index ca04ac6..8b86187 100644 --- a/libopie2/opiedb/TODO +++ b/libopie2/opiedb/TODO @@ -4,4 +4,5 @@ - Abstract from implementation of some dbs - provides( Type::What ) + - emit signals directly on arriving of data * OSQLDriver DriverVersion - DatabaseVersion diff --git a/libopie2/opiedb/opiedb.pro b/libopie2/opiedb/opiedb.pro index c773d6c..147435a 100644 --- a/libopie2/opiedb/opiedb.pro +++ b/libopie2/opiedb/opiedb.pro @@ -22,5 +22,5 @@ SOURCES = osqlbackend.cpp \ INTERFACES = TARGET = opiedb2 -VERSION = 1.8.2 +VERSION = 1.9.0 INCLUDEPATH = $(OPIEDIR)/include DEPENDPATH = $(OPIEDIR)/include diff --git a/libopie2/opiedb/osqlbackend.cpp b/libopie2/opiedb/osqlbackend.cpp index d6c39a9..6e5159f 100644 --- a/libopie2/opiedb/osqlbackend.cpp +++ b/libopie2/opiedb/osqlbackend.cpp @@ -2,4 +2,6 @@ #include "osqlbackend.h" +using namespace Opie::DB; + OSQLBackEnd::OSQLBackEnd( const QString& name, diff --git a/libopie2/opiedb/osqlbackend.h b/libopie2/opiedb/osqlbackend.h index ad879a4..28451b6 100644 --- a/libopie2/opiedb/osqlbackend.h +++ b/libopie2/opiedb/osqlbackend.h @@ -7,4 +7,7 @@ #include <qvaluelist.h> + +namespace Opie { +namespace DB { /** * OSQLBackEnd represents an available backend @@ -71,5 +74,10 @@ private: bool m_default :1; int m_pref; + class Private; + Private *d; }; +} +} + #endif diff --git a/libopie2/opiedb/osqlbackendmanager.cpp b/libopie2/opiedb/osqlbackendmanager.cpp index 95ed77b..fc18e07 100644 --- a/libopie2/opiedb/osqlbackendmanager.cpp +++ b/libopie2/opiedb/osqlbackendmanager.cpp @@ -4,4 +4,8 @@ #include "osqlbackendmanager.h" +/** + * \todo FIXME CONFIG!!! + */ + namespace { class Config { @@ -45,4 +49,8 @@ namespace { } }; + + +using namespace Opie::DB; + OSQLBackEndManager::OSQLBackEndManager( const QStringList& path ) :m_path( path ) diff --git a/libopie2/opiedb/osqlbackendmanager.h b/libopie2/opiedb/osqlbackendmanager.h index bc357a9..00e81fc 100644 --- a/libopie2/opiedb/osqlbackendmanager.h +++ b/libopie2/opiedb/osqlbackendmanager.h @@ -6,4 +6,7 @@ #include "osqlbackend.h" +namespace Opie { +namespace DB { + class OSQLBackEndManager { public: @@ -18,3 +21,6 @@ private: QStringList m_path; }; +} +} + #endif diff --git a/libopie2/opiedb/osqldriver.cpp b/libopie2/opiedb/osqldriver.cpp index 258c116..a6dae77 100644 --- a/libopie2/opiedb/osqldriver.cpp +++ b/libopie2/opiedb/osqldriver.cpp @@ -3,4 +3,6 @@ #include "osqldriver.h" +using namespace Opie::DB; + OSQLDriver::OSQLDriver( QLibrary* lib ) : QObject(), m_lib(lib) { diff --git a/libopie2/opiedb/osqldriver.h b/libopie2/opiedb/osqldriver.h index 68d8ee6..492b8dd 100644 --- a/libopie2/opiedb/osqldriver.h +++ b/libopie2/opiedb/osqldriver.h @@ -8,4 +8,8 @@ class QLibrary; + +namespace Opie { +namespace DB { + class OSQLResult; class OSQLQuery; @@ -85,3 +89,6 @@ private: }; +} +} + #endif diff --git a/libopie2/opiedb/osqlerror.cpp b/libopie2/opiedb/osqlerror.cpp index 3890a50..165ba65 100644 --- a/libopie2/opiedb/osqlerror.cpp +++ b/libopie2/opiedb/osqlerror.cpp @@ -1,4 +1,6 @@ #include "osqlerror.h" +using namespace Opie::DB; + OSQLError::OSQLError( const QString& driverText, const QString& driverDatabaseText, diff --git a/libopie2/opiedb/osqlerror.h b/libopie2/opiedb/osqlerror.h index 35a4368..8fa973d 100644 --- a/libopie2/opiedb/osqlerror.h +++ b/libopie2/opiedb/osqlerror.h @@ -5,4 +5,7 @@ #include <qvaluelist.h> + +namespace Opie { +namespace DB { /** * OSQLError is the base class of all errors @@ -57,3 +60,5 @@ private: }; +} +} #endif diff --git a/libopie2/opiedb/osqlitedriver.cpp b/libopie2/opiedb/osqlitedriver.cpp index 6141504..47bc250 100644 --- a/libopie2/opiedb/osqlitedriver.cpp +++ b/libopie2/opiedb/osqlitedriver.cpp @@ -41,4 +41,7 @@ +using namespace Opie::DB; +using namespace Opie::DB::Private; + namespace { struct Query { @@ -87,5 +90,5 @@ void OSQLiteDriver::setOptions( const QStringList& ) { bool OSQLiteDriver::open() { char *error; - odebug << "OSQLiteDriver::open: about to open" << oendl; + qDebug("OSQLiteDriver::open: about to open"); m_sqlite = sqlite_open(m_url.local8Bit(), 0, @@ -95,5 +98,5 @@ bool OSQLiteDriver::open() { if (m_sqlite == 0l ) { // FIXME set the last error - owarn << "OSQLiteDriver::open: " << error << oendl; + qWarning("OSQLiteDriver::open: %s", error ); free( error ); return false; @@ -127,5 +130,5 @@ OSQLResult OSQLiteDriver::query( OSQLQuery* qu) { /* SQLITE_OK 0 if return code > 0 == failure */ if ( sqlite_exec(m_sqlite, qu->query(),&call_back, &query, &err) > 0 ) { - owarn << "OSQLiteDriver::query: Error while executing" << oendl; + qWarning("OSQLiteDriver::query: Error while executing"); free(err ); // FixMe Errors diff --git a/libopie2/opiedb/osqlitedriver.h b/libopie2/opiedb/osqlitedriver.h index 6984539..3e1325b 100644 --- a/libopie2/opiedb/osqlitedriver.h +++ b/libopie2/opiedb/osqlitedriver.h @@ -8,4 +8,8 @@ #include "osqlresult.h" +namespace Opie { +namespace DB { +namespace Private { + class OSQLiteDriver : public OSQLDriver { Q_OBJECT @@ -32,3 +36,7 @@ private: sqlite *m_sqlite; }; +} +} +} + #endif diff --git a/libopie2/opiedb/osqlmanager.cpp b/libopie2/opiedb/osqlmanager.cpp index 766ebe1..990d258 100644 --- a/libopie2/opiedb/osqlmanager.cpp +++ b/libopie2/opiedb/osqlmanager.cpp @@ -6,4 +6,6 @@ #include "osqlitedriver.h" +using namespace Opie::DB; + OSQLManager::OSQLManager() { } @@ -32,5 +34,5 @@ OSQLDriver* OSQLManager::load( const QString& name ) { if ( name == "SQLite" ) { - driver = new OSQLiteDriver(); + driver = new Opie::DB::Private::OSQLiteDriver; } return driver; @@ -43,5 +45,5 @@ OSQLDriver* OSQLManager::load( const OSQLBackEnd& end) { if ( end.library() == "builtin" && end.name() == "SQLite" ) - driver = new OSQLiteDriver(); + driver = new Opie::DB::Private::OSQLiteDriver; return driver; diff --git a/libopie2/opiedb/osqlmanager.h b/libopie2/opiedb/osqlmanager.h index 5323b14..ca73c64 100644 --- a/libopie2/opiedb/osqlmanager.h +++ b/libopie2/opiedb/osqlmanager.h @@ -9,4 +9,6 @@ +namespace Opie { +namespace DB { /** * OSQLManager is responsible for loading @@ -60,5 +62,9 @@ private: OSQLBackEnd::ValueList m_list; QStringList m_path; + class Private; + Private *d; }; +} +} #endif diff --git a/libopie2/opiedb/osqlquery.cpp b/libopie2/opiedb/osqlquery.cpp index ecd53f2..8270c4c 100644 --- a/libopie2/opiedb/osqlquery.cpp +++ b/libopie2/opiedb/osqlquery.cpp @@ -2,4 +2,6 @@ #include "osqlquery.h" +using namespace Opie::DB; + OSQLQuery::OSQLQuery() { } diff --git a/libopie2/opiedb/osqlquery.h b/libopie2/opiedb/osqlquery.h index 63c26b0..0265d2b 100644 --- a/libopie2/opiedb/osqlquery.h +++ b/libopie2/opiedb/osqlquery.h @@ -8,4 +8,7 @@ +namespace Opie { +namespace DB { + /** I'm not happy with them class OSQLQueryOrder { @@ -48,4 +51,7 @@ public: virtual QString query()const = 0; +private: + class Private; + Private *d; }; @@ -120,3 +126,5 @@ public: }; */ +} +} #endif diff --git a/libopie2/opiedb/osqlresult.cpp b/libopie2/opiedb/osqlresult.cpp index 42da356..bad7d8b 100644 --- a/libopie2/opiedb/osqlresult.cpp +++ b/libopie2/opiedb/osqlresult.cpp @@ -2,4 +2,6 @@ #include "osqlresult.h" +using namespace Opie::DB; + OSQLResultItem::OSQLResultItem( const TableString& string, const TableInt& Int) diff --git a/libopie2/opiedb/osqlresult.h b/libopie2/opiedb/osqlresult.h index 9c9efa2..fc6f01a 100644 --- a/libopie2/opiedb/osqlresult.h +++ b/libopie2/opiedb/osqlresult.h @@ -8,4 +8,8 @@ #include "osqlerror.h" + +namespace Opie { +namespace DB { + /** * ResultItem represents one row of the resulting answer @@ -108,5 +112,9 @@ private: OSQLError::ValueList m_error; OSQLResultItem::ValueList::Iterator it; + class Private; + Private *d; }; +} +} #endif diff --git a/libopie2/opiedb/osqltable.cpp b/libopie2/opiedb/osqltable.cpp index cde40f4..117cf21 100644 --- a/libopie2/opiedb/osqltable.cpp +++ b/libopie2/opiedb/osqltable.cpp @@ -1,4 +1,6 @@ #include "osqltable.h" +using namespace Opie::DB; + OSQLTableItem::OSQLTableItem() {} OSQLTableItem::OSQLTableItem( enum Type type, diff --git a/libopie2/opiedb/osqltable.h b/libopie2/opiedb/osqltable.h index 87f7e74..86c30dd 100644 --- a/libopie2/opiedb/osqltable.h +++ b/libopie2/opiedb/osqltable.h @@ -6,4 +6,6 @@ #include <qvariant.h> +namespace Opie { +namespace DB { /** * OSQLTableItem saves one column of a complete @@ -91,5 +93,10 @@ private: QString m_table; OSQLTableItem::ValueList m_list; + class Private; + Private *d; }; +} +} + #endif |