summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp
Side-by-side diff
Diffstat (limited to 'libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp77
1 files changed, 35 insertions, 42 deletions
diff --git a/libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp b/libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp
index a5be4c8..d0c8052 100644
--- a/libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp
+++ b/libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp
@@ -1,60 +1,49 @@
/*
+ This file is part of the Opie Project
+ Copyright (C) The Main Author <main-author@whereever.org>
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: 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.
+*/
+/*
* SQL Backend for the OPIE-Contact Database.
- *
- * Copyright (c) 2002 by Stefan Eilers (Eilers.Stefan@epost.de)
- *
- * =====================================================================
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- * =====================================================================
- * =====================================================================
- * Version: $Id$
- * =====================================================================
- * History:
- * $Log$
- * Revision 1.4 2003/12/22 10:19:26 eilers
- * Finishing implementation of sql-backend for datebook. But I have to
- * port the PIM datebook application to use it, before I could debug the
- * whole stuff.
- * Thus, PIM-Database backend is finished, but highly experimental. And some
- * parts are still generic. For instance, the "queryByExample()" methods are
- * not (or not fully) implemented. Todo: custom-entries not stored.
- * The big show stopper: matchRegExp() (needed by OpieSearch) needs regular
- * expression search in the database, which is not supported by sqlite !
- * Therefore we need either an extended sqlite or a workaround which would
- * be very slow and memory consuming..
- *
- * Revision 1.3 2003/12/08 15:18:10 eilers
- * Committing unfinished sql implementation before merging to libopie2 starts..
- *
- * Revision 1.2 2003/09/29 07:44:26 eilers
- * Improvement of PIM-SQL Databases, but search queries are still limited.
- * Addressbook: Changed table layout. Now, we just need 1/3 of disk-space.
- * Todo: Started to add new attributes. Some type conversions missing.
- *
- * Revision 1.1 2003/09/22 14:31:16 eilers
- * Added first experimental incarnation of sql-backend for addressbook.
- * Some modifications to be able to compile the todo sql-backend.
- * A lot of changes fill follow...
- *
*/
#include "ocontactaccessbackend_sql.h"
#include <qarray.h>
#include <qdatetime.h>
#include <qstringlist.h>
#include <qpe/global.h>
#include <qpe/recordfields.h>
-#include <opie/ocontactfields.h>
-#include <opie/oconversion.h>
+#include <opie2/ocontactfields.h>
+#include <opie2/oconversion.h>
#include <opie2/osqldriver.h>
#include <opie2/osqlresult.h>
#include <opie2/osqlmanager.h>
#include <opie2/osqlquery.h>
@@ -78,13 +67,13 @@
* CREATE query
* LOAD query
* INSERT
* REMOVE
* CLEAR
*/
-namespace {
+namespace Opie {
/**
* CreateQuery for the Todolist Table
*/
class CreateQuery : public OSQLQuery {
public:
CreateQuery();
@@ -465,12 +454,14 @@ namespace {
};
/* --------------------------------------------------------------------------- */
+namespace Opie {
+
OContactAccessBackend_SQL::OContactAccessBackend_SQL ( const QString& /* appname */,
const QString& filename ):
OContactAccessBackend(), m_changed(false), m_driver( NULL )
{
qWarning("C'tor OContactAccessBackend_SQL starts");
QTime t;
@@ -937,6 +928,8 @@ QMap<QString, QString> OContactAccessBackend_SQL::requestCustom( int uid ) cons
customMap.insert( (*it).data( "type" ), (*it).data( "value" ) );
}
qWarning("RequestCustom needed: %d ms", t.elapsed() );
return customMap;
}
+
+}