summaryrefslogtreecommitdiff
path: root/libopie2/opiedb
Side-by-side diff
Diffstat (limited to 'libopie2/opiedb') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opiedb/osqlitedriver.cpp2
-rw-r--r--libopie2/opiedb/osqlitedriver.h2
-rw-r--r--libopie2/opiedb/osqlmanager.cpp4
3 files changed, 4 insertions, 4 deletions
diff --git a/libopie2/opiedb/osqlitedriver.cpp b/libopie2/opiedb/osqlitedriver.cpp
index 47bc250..2c53248 100644
--- a/libopie2/opiedb/osqlitedriver.cpp
+++ b/libopie2/opiedb/osqlitedriver.cpp
@@ -20,49 +20,49 @@
++=   -.     .`     .: details.
 :     =  ...= . :.=-
 -.   .:....=;==+<; You should have received a copy of the GNU
  -_. . .   )=.  = Library General Public License along with
    --        :-=` this library; see the file COPYING.LIB.
If not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#include "osqlquery.h"
#include "osqlitedriver.h"
#include <opie2/odebug.h>
#include <stdlib.h>
// fromLocal8Bit() does not work as expected. Thus it
// is replaced by fromLatin1() (eilers)
#define __BUGGY_LOCAL8BIT_
using namespace Opie::DB;
-using namespace Opie::DB::Private;
+using namespace Opie::DB::Internal;
namespace {
struct Query {
OSQLError::ValueList errors;
OSQLResultItem::ValueList items;
OSQLiteDriver *driver;
};
}
OSQLiteDriver::OSQLiteDriver( QLibrary *lib )
: OSQLDriver( lib )
{
m_sqlite = 0l;
}
OSQLiteDriver::~OSQLiteDriver() {
close();
}
QString OSQLiteDriver::id()const {
return QString::fromLatin1("SQLite");
diff --git a/libopie2/opiedb/osqlitedriver.h b/libopie2/opiedb/osqlitedriver.h
index 3e1325b..9064e52 100644
--- a/libopie2/opiedb/osqlitedriver.h
+++ b/libopie2/opiedb/osqlitedriver.h
@@ -1,36 +1,36 @@
#ifndef OSQL_LITE_DRIVER_H
#define OSQL_LITE_DRIVER_H
#include <sqlite.h>
#include "osqldriver.h"
#include "osqlerror.h"
#include "osqlresult.h"
namespace Opie {
namespace DB {
-namespace Private {
+namespace Internal {
class OSQLiteDriver : public OSQLDriver {
Q_OBJECT
public:
OSQLiteDriver( QLibrary *lib = 0l );
~OSQLiteDriver();
QString id()const;
void setUserName( const QString& );
void setPassword( const QString& );
void setUrl( const QString& url );
void setOptions( const QStringList& );
bool open();
bool close();
OSQLError lastError();
OSQLResult query( OSQLQuery* );
OSQLTable::ValueList tables()const;
private:
OSQLError m_lastE;
OSQLResult m_result;
OSQLResultItem m_items;
int handleCallBack( int, char**, char** );
static int call_back( void*, int, char**, char** );
QString m_url;
sqlite *m_sqlite;
diff --git a/libopie2/opiedb/osqlmanager.cpp b/libopie2/opiedb/osqlmanager.cpp
index 990d258..a6498df 100644
--- a/libopie2/opiedb/osqlmanager.cpp
+++ b/libopie2/opiedb/osqlmanager.cpp
@@ -12,60 +12,60 @@ OSQLManager::OSQLManager() {
OSQLBackEnd::ValueList OSQLManager::queryBackEnd() {
m_list.clear();
QString opie = QString::fromLatin1( getenv("OPIEDIR") );
QString qpe = QString::fromLatin1( getenv("QPEDIR") );
if ( !m_path.contains(opie) && !opie.isEmpty() )
m_path << opie;
if ( !m_path.contains(qpe) && !qpe.isEmpty() )
m_path << qpe;
OSQLBackEndManager mng( m_path );
m_list = mng.scan();
m_list += builtIn();
return m_list;
}
/*
* loading dso's is currently not enabled due problems with QLibrary
* beeing in libqpe and not libqte
*/
OSQLDriver* OSQLManager::load( const QString& name ) {
OSQLDriver* driver = 0l;
if ( name == "SQLite" ) {
- driver = new Opie::DB::Private::OSQLiteDriver;
+ driver = new Opie::DB::Internal::OSQLiteDriver;
}
return driver;
}
/*
* same as above
*/
OSQLDriver* OSQLManager::load( const OSQLBackEnd& end) {
OSQLDriver *driver = 0l;
if ( end.library() == "builtin" &&
end.name() == "SQLite" )
- driver = new Opie::DB::Private::OSQLiteDriver;
+ driver = new Opie::DB::Internal::OSQLiteDriver;
return driver;
}
/*
* let's find the a default with the highes preference
*/
OSQLDriver* OSQLManager::standard() {
OSQLDriver* driver =0l;
if ( m_list.isEmpty() ) queryBackEnd();
OSQLBackEnd::ValueList::Iterator it;
OSQLBackEnd back;
for ( it = m_list.begin(); it != m_list.end(); ++it ) {
if ( (*it).isDefault() &&
back.preference() < (*it).preference() ) {
back = (*it);
}
}
driver = load( back );
return driver;
}
void OSQLManager::registerPath( const QString& path ) {
m_path << path;
}
bool OSQLManager::unregisterPath( const QString& path ) {