summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2004-11-16 19:14:18 (UTC)
committer mickeyl <mickeyl>2004-11-16 19:14:18 (UTC)
commitea3945a9bd8f9830f70b1efa133f9df13b19362f (patch) (side-by-side diff)
treef2ea22cc50e9aa8aa73ee7dea148f41c563c9666
parent1c6f490e8541626f68422e0a3a7c7281d7f5b7d3 (diff)
downloadopie-ea3945a9bd8f9830f70b1efa133f9df13b19362f.zip
opie-ea3945a9bd8f9830f70b1efa133f9df13b19362f.tar.gz
opie-ea3945a9bd8f9830f70b1efa133f9df13b19362f.tar.bz2
libopie1 goes into unsupported
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--libopie/TODO16
-rw-r--r--libopie/ofileselector/.cvsignore1
-rw-r--r--libopie/pim/ABSTRACT18
-rw-r--r--libopie/pim/DESIGN56
-rw-r--r--libopie/pim/TODO34
-rw-r--r--libopie/pim/test/converter.cpp107
-rwxr-xr-xlibopie/pim/test/converter.h18
-rw-r--r--libopie/pim/test/converter.pro12
-rw-r--r--libopie/pim/test/converter_base.ui238
-rw-r--r--libopie/pim/test/oevent_test.cpp35
-rw-r--r--libopie/pim/test/oevent_test.pro11
-rw-r--r--libopie/pim/test/test_todo.cpp36
-rw-r--r--libopie/pim/test/todo_test.pro11
-rw-r--r--noncore/unsupported/libopie/.cvsignore (renamed from libopie/.cvsignore)0
-rw-r--r--noncore/unsupported/libopie/colordialog.cpp (renamed from libopie/colordialog.cpp)0
-rw-r--r--noncore/unsupported/libopie/colordialog.h (renamed from libopie/colordialog.h)0
-rw-r--r--noncore/unsupported/libopie/colorpopupmenu.cpp (renamed from libopie/colorpopupmenu.cpp)0
-rw-r--r--noncore/unsupported/libopie/colorpopupmenu.h (renamed from libopie/colorpopupmenu.h)0
-rw-r--r--noncore/unsupported/libopie/config.in (renamed from libopie/config.in)0
-rw-r--r--noncore/unsupported/libopie/libopie.pro (renamed from libopie/libopie.pro)0
-rw-r--r--noncore/unsupported/libopie/libopie1.control (renamed from libopie/libopie1.control)0
-rwxr-xr-xnoncore/unsupported/libopie/libopie1.postinst (renamed from libopie/libopie1.postinst)0
-rw-r--r--noncore/unsupported/libopie/oapplicationfactory.h (renamed from libopie/oapplicationfactory.h)0
-rw-r--r--noncore/unsupported/libopie/ocheckitem.cpp (renamed from libopie/ocheckitem.cpp)0
-rw-r--r--noncore/unsupported/libopie/ocheckitem.h (renamed from libopie/ocheckitem.h)0
-rw-r--r--noncore/unsupported/libopie/oclickablelabel.cpp (renamed from libopie/oclickablelabel.cpp)0
-rw-r--r--noncore/unsupported/libopie/oclickablelabel.h (renamed from libopie/oclickablelabel.h)0
-rw-r--r--noncore/unsupported/libopie/ocolorbutton.cpp (renamed from libopie/ocolorbutton.cpp)0
-rw-r--r--noncore/unsupported/libopie/ocolorbutton.h (renamed from libopie/ocolorbutton.h)0
-rw-r--r--noncore/unsupported/libopie/odevice.cpp (renamed from libopie/odevice.cpp)0
-rw-r--r--noncore/unsupported/libopie/odevice.h (renamed from libopie/odevice.h)0
-rw-r--r--noncore/unsupported/libopie/odevicebutton.cpp (renamed from libopie/odevicebutton.cpp)0
-rw-r--r--noncore/unsupported/libopie/odevicebutton.h (renamed from libopie/odevicebutton.h)0
-rw-r--r--noncore/unsupported/libopie/ofiledialog.cc (renamed from libopie/ofiledialog.cc)0
-rw-r--r--noncore/unsupported/libopie/ofiledialog.h (renamed from libopie/ofiledialog.h)0
-rw-r--r--noncore/unsupported/libopie/ofileselector.cpp (renamed from libopie/ofileselector.cpp)0
-rw-r--r--noncore/unsupported/libopie/ofileselector.h (renamed from libopie/ofileselector.h)0
-rw-r--r--noncore/unsupported/libopie/ofileselector_p.h (renamed from libopie/ofileselector_p.h)0
-rw-r--r--noncore/unsupported/libopie/ofileview.h (renamed from libopie/ofileview.h)0
-rw-r--r--noncore/unsupported/libopie/ofontmenu.cc (renamed from libopie/ofontmenu.cc)0
-rw-r--r--noncore/unsupported/libopie/ofontmenu.h (renamed from libopie/ofontmenu.h)0
-rw-r--r--noncore/unsupported/libopie/ofontselector.cpp (renamed from libopie/ofontselector.cpp)0
-rw-r--r--noncore/unsupported/libopie/ofontselector.h (renamed from libopie/ofontselector.h)0
-rw-r--r--noncore/unsupported/libopie/oprocctrl.cpp (renamed from libopie/oprocctrl.cpp)0
-rw-r--r--noncore/unsupported/libopie/oprocctrl.h (renamed from libopie/oprocctrl.h)0
-rw-r--r--noncore/unsupported/libopie/oprocess.cpp (renamed from libopie/oprocess.cpp)0
-rw-r--r--noncore/unsupported/libopie/oprocess.h (renamed from libopie/oprocess.h)0
-rw-r--r--noncore/unsupported/libopie/orecurrancebase.ui (renamed from libopie/orecurrancebase.ui)0
-rw-r--r--noncore/unsupported/libopie/orecurrancewidget.cpp (renamed from libopie/orecurrancewidget.cpp)0
-rw-r--r--noncore/unsupported/libopie/orecurrancewidget.h (renamed from libopie/orecurrancewidget.h)0
-rw-r--r--noncore/unsupported/libopie/otabbar.cpp (renamed from libopie/otabbar.cpp)0
-rw-r--r--noncore/unsupported/libopie/otabbar.h (renamed from libopie/otabbar.h)0
-rw-r--r--noncore/unsupported/libopie/otabinfo.h (renamed from libopie/otabinfo.h)0
-rw-r--r--noncore/unsupported/libopie/otabwidget.cpp (renamed from libopie/otabwidget.cpp)0
-rw-r--r--noncore/unsupported/libopie/otabwidget.h (renamed from libopie/otabwidget.h)0
-rw-r--r--noncore/unsupported/libopie/oticker.cpp (renamed from libopie/oticker.cpp)0
-rw-r--r--noncore/unsupported/libopie/oticker.h (renamed from libopie/oticker.h)0
-rw-r--r--noncore/unsupported/libopie/otimepicker.cpp (renamed from libopie/otimepicker.cpp)0
-rw-r--r--noncore/unsupported/libopie/otimepicker.h (renamed from libopie/otimepicker.h)0
-rw-r--r--noncore/unsupported/libopie/otimepickerbase.ui (renamed from libopie/otimepickerbase.ui)0
-rw-r--r--noncore/unsupported/libopie/owait.cpp (renamed from libopie/owait.cpp)0
-rw-r--r--noncore/unsupported/libopie/owait.h (renamed from libopie/owait.h)0
-rw-r--r--noncore/unsupported/libopie/pim/.cvsignore (renamed from libopie/pim/.cvsignore)0
-rw-r--r--noncore/unsupported/libopie/pim/config.in2
-rw-r--r--noncore/unsupported/libopie/pim/libopie.pro (renamed from libopie/pim/libopie.pro)0
-rw-r--r--noncore/unsupported/libopie/pim/obackendfactory.h (renamed from libopie/pim/obackendfactory.h)3
-rw-r--r--noncore/unsupported/libopie/pim/ocontact.cpp (renamed from libopie/pim/ocontact.cpp)0
-rw-r--r--noncore/unsupported/libopie/pim/ocontact.h (renamed from libopie/pim/ocontact.h)0
-rw-r--r--noncore/unsupported/libopie/pim/ocontactaccess.cpp (renamed from libopie/pim/ocontactaccess.cpp)3
-rw-r--r--noncore/unsupported/libopie/pim/ocontactaccess.h (renamed from libopie/pim/ocontactaccess.h)3
-rw-r--r--noncore/unsupported/libopie/pim/ocontactaccessbackend.h (renamed from libopie/pim/ocontactaccessbackend.h)3
-rw-r--r--noncore/unsupported/libopie/pim/ocontactaccessbackend_sql.cpp (renamed from libopie/pim/ocontactaccessbackend_sql.cpp)3
-rw-r--r--noncore/unsupported/libopie/pim/ocontactaccessbackend_sql.h (renamed from libopie/pim/ocontactaccessbackend_sql.h)3
-rw-r--r--noncore/unsupported/libopie/pim/ocontactaccessbackend_vcard.cpp (renamed from libopie/pim/ocontactaccessbackend_vcard.cpp)3
-rw-r--r--noncore/unsupported/libopie/pim/ocontactaccessbackend_vcard.h (renamed from libopie/pim/ocontactaccessbackend_vcard.h)3
-rw-r--r--noncore/unsupported/libopie/pim/ocontactaccessbackend_xml.cpp (renamed from libopie/pim/ocontactaccessbackend_xml.cpp)3
-rw-r--r--noncore/unsupported/libopie/pim/ocontactaccessbackend_xml.h (renamed from libopie/pim/ocontactaccessbackend_xml.h)3
-rw-r--r--noncore/unsupported/libopie/pim/ocontactfields.cpp (renamed from libopie/pim/ocontactfields.cpp)0
-rw-r--r--noncore/unsupported/libopie/pim/ocontactfields.h (renamed from libopie/pim/ocontactfields.h)0
-rw-r--r--noncore/unsupported/libopie/pim/oconversion.cpp (renamed from libopie/pim/oconversion.cpp)0
-rw-r--r--noncore/unsupported/libopie/pim/oconversion.h (renamed from libopie/pim/oconversion.h)0
-rw-r--r--noncore/unsupported/libopie/pim/odatebookaccess.cpp (renamed from libopie/pim/odatebookaccess.cpp)0
-rw-r--r--noncore/unsupported/libopie/pim/odatebookaccess.h (renamed from libopie/pim/odatebookaccess.h)0
-rw-r--r--noncore/unsupported/libopie/pim/odatebookaccessbackend.cpp (renamed from libopie/pim/odatebookaccessbackend.cpp)0
-rw-r--r--noncore/unsupported/libopie/pim/odatebookaccessbackend.h (renamed from libopie/pim/odatebookaccessbackend.h)0
-rw-r--r--noncore/unsupported/libopie/pim/odatebookaccessbackend_sql.cpp (renamed from libopie/pim/odatebookaccessbackend_sql.cpp)3
-rw-r--r--noncore/unsupported/libopie/pim/odatebookaccessbackend_sql.h (renamed from libopie/pim/odatebookaccessbackend_sql.h)0
-rw-r--r--noncore/unsupported/libopie/pim/odatebookaccessbackend_xml.cpp (renamed from libopie/pim/odatebookaccessbackend_xml.cpp)0
-rw-r--r--noncore/unsupported/libopie/pim/odatebookaccessbackend_xml.h (renamed from libopie/pim/odatebookaccessbackend_xml.h)0
-rw-r--r--noncore/unsupported/libopie/pim/oevent.cpp (renamed from libopie/pim/oevent.cpp)0
-rw-r--r--noncore/unsupported/libopie/pim/oevent.h (renamed from libopie/pim/oevent.h)0
-rw-r--r--noncore/unsupported/libopie/pim/opimaccessbackend.h (renamed from libopie/pim/opimaccessbackend.h)0
-rw-r--r--noncore/unsupported/libopie/pim/opimaccesstemplate.h (renamed from libopie/pim/opimaccesstemplate.h)0
-rw-r--r--noncore/unsupported/libopie/pim/opimcache.h (renamed from libopie/pim/opimcache.h)0
-rw-r--r--noncore/unsupported/libopie/pim/opimmaintainer.cpp (renamed from libopie/pim/opimmaintainer.cpp)0
-rw-r--r--noncore/unsupported/libopie/pim/opimmaintainer.h (renamed from libopie/pim/opimmaintainer.h)0
-rw-r--r--noncore/unsupported/libopie/pim/opimmainwindow.cpp (renamed from libopie/pim/opimmainwindow.cpp)0
-rw-r--r--noncore/unsupported/libopie/pim/opimmainwindow.h (renamed from libopie/pim/opimmainwindow.h)0
-rw-r--r--noncore/unsupported/libopie/pim/opimnotify.cpp (renamed from libopie/pim/opimnotify.cpp)0
-rw-r--r--noncore/unsupported/libopie/pim/opimnotify.h (renamed from libopie/pim/opimnotify.h)0
-rw-r--r--noncore/unsupported/libopie/pim/opimnotifymanager.cpp (renamed from libopie/pim/opimnotifymanager.cpp)0
-rw-r--r--noncore/unsupported/libopie/pim/opimnotifymanager.h (renamed from libopie/pim/opimnotifymanager.h)0
-rw-r--r--noncore/unsupported/libopie/pim/opimrecord.cpp (renamed from libopie/pim/opimrecord.cpp)0
-rw-r--r--noncore/unsupported/libopie/pim/opimrecord.h (renamed from libopie/pim/opimrecord.h)0
-rw-r--r--noncore/unsupported/libopie/pim/opimresolver.cpp (renamed from libopie/pim/opimresolver.cpp)0
-rw-r--r--noncore/unsupported/libopie/pim/opimresolver.h (renamed from libopie/pim/opimresolver.h)0
-rw-r--r--noncore/unsupported/libopie/pim/opimstate.cpp (renamed from libopie/pim/opimstate.cpp)0
-rw-r--r--noncore/unsupported/libopie/pim/opimstate.h (renamed from libopie/pim/opimstate.h)0
-rw-r--r--noncore/unsupported/libopie/pim/opimxref.cpp (renamed from libopie/pim/opimxref.cpp)0
-rw-r--r--noncore/unsupported/libopie/pim/opimxref.h (renamed from libopie/pim/opimxref.h)0
-rw-r--r--noncore/unsupported/libopie/pim/opimxrefmanager.cpp (renamed from libopie/pim/opimxrefmanager.cpp)0
-rw-r--r--noncore/unsupported/libopie/pim/opimxrefmanager.h (renamed from libopie/pim/opimxrefmanager.h)0
-rw-r--r--noncore/unsupported/libopie/pim/opimxrefpartner.cpp (renamed from libopie/pim/opimxrefpartner.cpp)0
-rw-r--r--noncore/unsupported/libopie/pim/opimxrefpartner.h (renamed from libopie/pim/opimxrefpartner.h)0
-rw-r--r--noncore/unsupported/libopie/pim/orecordlist.h (renamed from libopie/pim/orecordlist.h)0
-rw-r--r--noncore/unsupported/libopie/pim/orecur.cpp (renamed from libopie/pim/orecur.cpp)0
-rw-r--r--noncore/unsupported/libopie/pim/orecur.h (renamed from libopie/pim/orecur.h)0
-rw-r--r--noncore/unsupported/libopie/pim/otemplatebase.h (renamed from libopie/pim/otemplatebase.h)0
-rw-r--r--noncore/unsupported/libopie/pim/otimezone.cpp (renamed from libopie/pim/otimezone.cpp)0
-rw-r--r--noncore/unsupported/libopie/pim/otimezone.h (renamed from libopie/pim/otimezone.h)0
-rw-r--r--noncore/unsupported/libopie/pim/otodo.cpp (renamed from libopie/pim/otodo.cpp)0
-rw-r--r--noncore/unsupported/libopie/pim/otodo.h (renamed from libopie/pim/otodo.h)0
-rw-r--r--noncore/unsupported/libopie/pim/otodoaccess.cpp (renamed from libopie/pim/otodoaccess.cpp)0
-rw-r--r--noncore/unsupported/libopie/pim/otodoaccess.h (renamed from libopie/pim/otodoaccess.h)0
-rw-r--r--noncore/unsupported/libopie/pim/otodoaccessbackend.cpp (renamed from libopie/pim/otodoaccessbackend.cpp)0
-rw-r--r--noncore/unsupported/libopie/pim/otodoaccessbackend.h (renamed from libopie/pim/otodoaccessbackend.h)0
-rw-r--r--noncore/unsupported/libopie/pim/otodoaccesssql.cpp (renamed from libopie/pim/otodoaccesssql.cpp)0
-rw-r--r--noncore/unsupported/libopie/pim/otodoaccesssql.h (renamed from libopie/pim/otodoaccesssql.h)0
-rw-r--r--noncore/unsupported/libopie/pim/otodoaccessvcal.cpp (renamed from libopie/pim/otodoaccessvcal.cpp)0
-rw-r--r--noncore/unsupported/libopie/pim/otodoaccessvcal.h (renamed from libopie/pim/otodoaccessvcal.h)0
-rw-r--r--noncore/unsupported/libopie/pim/otodoaccessxml.cpp (renamed from libopie/pim/otodoaccessxml.cpp)0
-rw-r--r--noncore/unsupported/libopie/pim/otodoaccessxml.h (renamed from libopie/pim/otodoaccessxml.h)0
-rw-r--r--noncore/unsupported/libopie/sharp_compat.cpp (renamed from libopie/sharp_compat.cpp)0
-rw-r--r--noncore/unsupported/libopie/todayconfigwidget.h (renamed from libopie/todayconfigwidget.h)0
-rw-r--r--noncore/unsupported/libopie/todayplugininterface.h (renamed from libopie/todayplugininterface.h)0
-rw-r--r--noncore/unsupported/libopie/xmltree.cc (renamed from libopie/xmltree.cc)0
-rw-r--r--noncore/unsupported/libopie/xmltree.h (renamed from libopie/xmltree.h)0
137 files changed, 35 insertions, 593 deletions
diff --git a/libopie/TODO b/libopie/TODO
deleted file mode 100644
index 9607fde..0000000
--- a/libopie/TODO
+++ b/dev/null
@@ -1,16 +0,0 @@
-- xmltree done
-
-- tododb
- - set Alarms
-
-- OFileSelector
- - m_mimeCheck always shows the first icon
- - mimetype selection broken
- - when changing dirs the mimetype selections get messed up
- - DocLnk when not in Document Mode ( and vice versa )
- - MultipleDocuments
- - Move OFileSelectorItem to it's own files
- - new Dirs created inside the listview
-
-- Clickable labels?
- committed \ No newline at end of file
diff --git a/libopie/ofileselector/.cvsignore b/libopie/ofileselector/.cvsignore
deleted file mode 100644
index 6d678c6..0000000
--- a/libopie/ofileselector/.cvsignore
+++ b/dev/null
@@ -1 +0,0 @@
-config.in
diff --git a/libopie/pim/ABSTRACT b/libopie/pim/ABSTRACT
deleted file mode 100644
index 5538d19..0000000
--- a/libopie/pim/ABSTRACT
+++ b/dev/null
@@ -1,18 +0,0 @@
-What is Opie PIM? Why is it special?
-Why do we need Opie PIM?
-
-The goal of OpiePIM is to be first of all
-extendable, light weight, scalable and fast.
-For the programmer we try to add a nice but
-powerful API to all classes.
-
-Memory is a costy resource on small and embedded
-devices. So we try to keep the memory usage as
-low as possible. Never the less we won't use structs
-and Pointers in the public API.
-The whole pim framework is value based. Internally we try
-to use implicit sharing as found in other Qt classes as well.
-This makes it possible to give 3rd party devels a nice
-API while keeping the memory usage as low as possible.
-
-We use C++ Templates
diff --git a/libopie/pim/DESIGN b/libopie/pim/DESIGN
deleted file mode 100644
index bd92b1b..0000000
--- a/libopie/pim/DESIGN
+++ b/dev/null
@@ -1,56 +0,0 @@
-Hija to the DESIGN of our OPIE PIM stuff
-
-This design was firstly discussed in the train
-from Frankfurt to Hannover between me (zecke ) and eilers.
-
-We had a look at our pim implementation and the one from
-trolltech and we looked what was missing.
-
-GOALS:
- - clean implementation
- - share code
- - ObjectOriented Design
- - Scalable
- - Integration into common solutions like STL and Qt
- - Addition
- - Ease of Use
-
-GENERAL:
- - use templates
- - have a common base class for all Records OPimRecord
- - use references instead of pointers
- - make use of QShared internally memory consumption
-
-We've a 'public' and 'private' part in our lib
-OPimAccessTemplate is the public part. This will be used
-by 3rd party developers to access the PIMs.
-OPimAccessBackend is the backend. You could also call it
-resource.
-
-Both things need to be implemented for different kind of records.
-By using templates we can make sure we share code and the reason
-not to use simple inheretance is that we can specialise quite easy.
-
-For example we have OTodoAccess : public OPimAccessTemplate<OTodo>;
-the we would do
-OTodoAccess::List list = otodoAccess.all();
-OTodoAccess::List::Iterator it;
-for( it = list.begin(); it != list.end(); ++it );
-
-
-as you can see from here it just behaves like you expect from Qt or STL.
-
-The kewlest thing is that List and List::Iterator is free to use if you
-want to implement your own OPimAccessTemplate.
-You just have to sub class it and voila you're done
-
-
-Hope you enjoy using OPIE PIM
-
-regards Holger 'zecke' Freyther
-
-
-
-
-
-
diff --git a/libopie/pim/TODO b/libopie/pim/TODO
deleted file mode 100644
index 9bd2789..0000000
--- a/libopie/pim/TODO
+++ b/dev/null
@@ -1,34 +0,0 @@
--Add XML Index ( dropped )
--Add ReadOnly Resources ( to be discussed )
--Add Sorted/Random Access mode for faster access to the base ( to be discussed )
-
-Yeah Stefan you're right I need to stop the fragmentation but these are just ideas
-we not to talk about.
-
-New Ideas Widgets:
- OCategoryPopup:
- Like the function Menu in Xemacs. If there are too many
- Categories sort them into sub popups. A-B,B-G,H-K....
- Integrate SUbcategories
-
-
-New Ideas on Infrastructure:
- -finally switch to sqlite
- -rework Category Sub Categories
- -X-Ref!!!!!
- -signalling ( Peer to Peer/ Backend to Backend communication of changes on a file basis )
- -Signal the User about updates. Use QSignal and make it generic push from backend
- to the access.
- -flocking, mmapping
- -Generic Tablewidget, getting QString for a record and attribute ( generic ) like QProperty
- -chooser widgets
- -hierachies
- -multiple backends
- -public private sort public and private on backends. default backend for each if multiple
- backends loaded. Move from backend to backend.. ( backend mover app? )
- -importer/exporter
- -check if cache also drops
- -port to BigSize Api
-
- ORedoManager ORedoItem both are templates to allow undoing and redoing to a level...
- \ No newline at end of file
diff --git a/libopie/pim/test/converter.cpp b/libopie/pim/test/converter.cpp
deleted file mode 100644
index bfdb605..0000000
--- a/libopie/pim/test/converter.cpp
+++ b/dev/null
@@ -1,107 +0,0 @@
-#include "converter.h"
-
-#include <qdatetime.h>
-#include <qprogressbar.h>
-
-#include <qpe/qpeapplication.h>
-
-#include <opie/ocontactaccess.h>
-#include <opie/ocontactaccessbackend_xml.h>
-#include <opie/ocontactaccessbackend_sql.h>
-
-#include <opie/odatebookaccess.h>
-#include <opie/odatebookaccessbackend_xml.h>
-#include <opie/odatebookaccessbackend_sql.h>
-
-// #define _ADDRESSBOOK_ACCESS
-
-Converter::Converter(){
-}
-
-void Converter::start_conversion(){
- qWarning("Converting Contacts from XML to SQL..");
-
- // Creating backends to the requested databases..
-
-#ifdef _ADDRESSBOOK_ACCESS
- OContactAccessBackend* xmlBackend = new OContactAccessBackend_XML( "Converter",
- QString::null );
-
- OContactAccessBackend* sqlBackend = new OContactAccessBackend_SQL( QString::null,
- QString::null );
- // Put the created backends into frontends to access them
- OContactAccess* xmlAccess = new OContactAccess ( "addressbook_xml",
- QString::null , xmlBackend, true );
-
- OContactAccess* sqlAccess = new OContactAccess ( "addressbook_sql",
- QString::null );
-
-#else
- ODateBookAccessBackend* xmlBackend = new ODateBookAccessBackend_XML( "Converter",
- QString::null );
-
- ODateBookAccessBackend* sqlBackend = new ODateBookAccessBackend_SQL( QString::null,
- QString::null );
- // Put the created backends into frontends to access them
- ODateBookAccess* xmlAccess = new ODateBookAccess ( xmlBackend );
-
- ODateBookAccess* sqlAccess = new ODateBookAccess ( sqlBackend );
-
- xmlAccess->load();
-
-#endif
-
- QTime t;
- t.start();
-
-// Clean the sql-database..
- sqlAccess->clear();
-
-#ifdef _ADDRESSBOOK_ACCESS
- // Now trasmit every contact from the xml database to the sql-database
- OContactAccess::List contactList = xmlAccess->allRecords();
- m_progressBar->setTotalSteps( contactList.count() );
- int count = 0;
- if ( sqlAccess && xmlAccess ){
- OContactAccess::List::Iterator it;
- for ( it = contactList.begin(); it != contactList.end(); ++it ){
- sqlAccess->add( *it );
- m_progressBar->setProgress( ++count );
- }
- }
-#else
- // Now transmit every contact from the xml database to the sql-database
- ODateBookAccess::List dateList = xmlAccess->allRecords();
- m_progressBar->setTotalSteps( dateList.count() );
- qWarning( "Number of elements to copy: %d", dateList.count() );
-
- int count = 0;
- if ( sqlAccess && xmlAccess ){
- ODateBookAccess::List::Iterator it;
- for ( it = dateList.begin(); it != dateList.end(); ++it ){
- sqlAccess->add( *it );
- m_progressBar->setProgress( ++count );
- }
- }
-
-#endif
- // Delete the frontends. Backends will be deleted automatically, too !
- delete sqlAccess;
-
- qWarning("Conversion is finished and needed %d ms !", t.elapsed());
-
- delete xmlAccess;
-}
-
-int main( int argc, char** argv ) {
-
- QPEApplication a( argc, argv );
-
- Converter dlg;
-
- a.showMainWidget( &dlg );
- // dlg. showMaximized ( );
-
- return a.exec();
-
-}
diff --git a/libopie/pim/test/converter.h b/libopie/pim/test/converter.h
deleted file mode 100755
index 1cc2a7c..0000000
--- a/libopie/pim/test/converter.h
+++ b/dev/null
@@ -1,18 +0,0 @@
-#ifndef _CONVERTER_H_
-#define _CONVERTER_H_
-
-
-#include "converter_base.h"
-
-
-class Converter: public converter_base {
-public:
- Converter();
-
- void start_conversion();
-private:
-
-};
-
-
-#endif
diff --git a/libopie/pim/test/converter.pro b/libopie/pim/test/converter.pro
deleted file mode 100644
index bd9c7a3..0000000
--- a/libopie/pim/test/converter.pro
+++ b/dev/null
@@ -1,12 +0,0 @@
-# TEMPLATE = app
-CONFIG = qt warn_on debug
-# CONFIG = qt warn_on release
-#HEADERS =
-SOURCES = converter.cpp
-INTERFACES = converter_base.ui
-INCLUDEPATH += $(OPIEDIR)/include
-DEPENDPATH += $(OPIEDIR)/include
-LIBS += -lqpe -lopie
-TARGET = converter
-
-include ( $(OPIEDIR)/include.pro )
diff --git a/libopie/pim/test/converter_base.ui b/libopie/pim/test/converter_base.ui
deleted file mode 100644
index e9bf636..0000000
--- a/libopie/pim/test/converter_base.ui
+++ b/dev/null
@@ -1,238 +0,0 @@
-<!DOCTYPE UI><UI>
-<class>converter_base</class>
-<widget>
- <class>QDialog</class>
- <property stdset="1">
- <name>name</name>
- <cstring>converter_base</cstring>
- </property>
- <property stdset="1">
- <name>geometry</name>
- <rect>
- <x>0</x>
- <y>0</y>
- <width>273</width>
- <height>324</height>
- </rect>
- </property>
- <property stdset="1">
- <name>caption</name>
- <string>PIM-Database Converter</string>
- </property>
- <property>
- <name>layoutMargin</name>
- </property>
- <grid>
- <property stdset="1">
- <name>margin</name>
- <number>4</number>
- </property>
- <property stdset="1">
- <name>spacing</name>
- <number>6</number>
- </property>
- <widget row="0" column="0" >
- <class>QGroupBox</class>
- <property stdset="1">
- <name>name</name>
- <cstring>GroupBox6</cstring>
- </property>
- <property stdset="1">
- <name>title</name>
- <string>Converter</string>
- </property>
- <property>
- <name>layoutMargin</name>
- </property>
- <property>
- <name>layoutSpacing</name>
- </property>
- <vbox>
- <property stdset="1">
- <name>margin</name>
- <number>4</number>
- </property>
- <property stdset="1">
- <name>spacing</name>
- <number>4</number>
- </property>
- <widget>
- <class>QGroupBox</class>
- <property stdset="1">
- <name>name</name>
- <cstring>GroupBox1</cstring>
- </property>
- <property stdset="1">
- <name>title</name>
- <string>Select Database:</string>
- </property>
- <grid>
- <property stdset="1">
- <name>margin</name>
- <number>11</number>
- </property>
- <property stdset="1">
- <name>spacing</name>
- <number>6</number>
- </property>
- <widget row="0" column="1" >
- <class>QComboBox</class>
- <item>
- <property>
- <name>text</name>
- <string>Addressbook</string>
- </property>
- </item>
- <item>
- <property>
- <name>text</name>
- <string>TodoList</string>
- </property>
- </item>
- <property stdset="1">
- <name>name</name>
- <cstring>ComboBox1</cstring>
- </property>
- </widget>
- </grid>
- </widget>
- <widget>
- <class>QGroupBox</class>
- <property stdset="1">
- <name>name</name>
- <cstring>GroupBox2</cstring>
- </property>
- <property stdset="1">
- <name>title</name>
- <string>Source/Destination:</string>
- </property>
- <grid>
- <property stdset="1">
- <name>margin</name>
- <number>11</number>
- </property>
- <property stdset="1">
- <name>spacing</name>
- <number>6</number>
- </property>
- <widget row="1" column="0" >
- <class>QLabel</class>
- <property stdset="1">
- <name>name</name>
- <cstring>TextLabel3_2</cstring>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>to</string>
- </property>
- </widget>
- <widget row="1" column="1" >
- <class>QComboBox</class>
- <item>
- <property>
- <name>text</name>
- <string>Select</string>
- </property>
- </item>
- <item>
- <property>
- <name>text</name>
- <string>XML</string>
- </property>
- </item>
- <item>
- <property>
- <name>text</name>
- <string>SQL (SQLite)</string>
- </property>
- </item>
- <property stdset="1">
- <name>name</name>
- <cstring>ComboBox2_3</cstring>
- </property>
- </widget>
- <widget row="0" column="0" >
- <class>QLabel</class>
- <property stdset="1">
- <name>name</name>
- <cstring>TextLabel2_2</cstring>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>Convert from</string>
- </property>
- </widget>
- <widget row="0" column="1" >
- <class>QComboBox</class>
- <item>
- <property>
- <name>text</name>
- <string>XML</string>
- </property>
- </item>
- <item>
- <property>
- <name>text</name>
- <string>SQL (SQLite)</string>
- </property>
- </item>
- <property stdset="1">
- <name>name</name>
- <cstring>ComboBox2_2_2</cstring>
- </property>
- </widget>
- </grid>
- </widget>
- <widget>
- <class>QGroupBox</class>
- <property stdset="1">
- <name>name</name>
- <cstring>GroupBox4</cstring>
- </property>
- <property stdset="1">
- <name>title</name>
- <string>Progress:</string>
- </property>
- <grid>
- <property stdset="1">
- <name>margin</name>
- <number>11</number>
- </property>
- <property stdset="1">
- <name>spacing</name>
- <number>6</number>
- </property>
- <widget row="0" column="0" >
- <class>QProgressBar</class>
- <property stdset="1">
- <name>name</name>
- <cstring>m_progressBar</cstring>
- </property>
- </widget>
- </grid>
- </widget>
- <widget>
- <class>QPushButton</class>
- <property stdset="1">
- <name>name</name>
- <cstring>PushButton1</cstring>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>Go!</string>
- </property>
- </widget>
- </vbox>
- </widget>
- </grid>
-</widget>
-<connections>
- <connection>
- <sender>PushButton1</sender>
- <signal>clicked()</signal>
- <receiver>converter_base</receiver>
- <slot>start_conversion()</slot>
- </connection>
- <slot access="public">start_conversion()</slot>
-</connections>
-</UI>
diff --git a/libopie/pim/test/oevent_test.cpp b/libopie/pim/test/oevent_test.cpp
deleted file mode 100644
index 9f16911..0000000
--- a/libopie/pim/test/oevent_test.cpp
+++ b/dev/null
@@ -1,35 +0,0 @@
-#include <qdatetime.h>
-
-#include "../oevent.h"
-#include "../odatebookaccess.h"
-
-int main(int argc, char* argv ) {
- ODateBookAccess acc;
- if(!acc.load() ) qWarning("could not load");
-
- ODateBookAccess::List::Iterator it;
- ODateBookAccess::List list = acc.allRecords();
-
- for( it = list.begin(); it != list.end(); ++it ){
- OEvent ev = (*it);
- qWarning("Summary: %s",ev.description().latin1() );
- qWarning("Start: %s End: %s",ev.startDateTime().toString().latin1(), ev.endDateTime().toString().latin1() );
- qWarning("All Day: %d Recurrence: %d",ev.isAllDay(), ev.hasRecurrence() );
- qWarning("UID %d", ev.uid() );
-
- }
- QDate date1(2003,02,01 );
- QDate date2(2003,03,01 );
-
- OEffectiveEvent::ValueList effList = acc.effectiveEvents( date1,date2 );
- OEffectiveEvent::ValueList::Iterator effIt;
-
- for( effIt = effList.begin(); effIt != effList.end(); ++effIt ){
- OEffectiveEvent ef = (*effIt);
- qWarning("Summary: %s", ef.description().latin1() );
- qWarning("Date: %s", ef.date().toString().latin1() );
- }
- acc.save();
-
- return 0;
-}
diff --git a/libopie/pim/test/oevent_test.pro b/libopie/pim/test/oevent_test.pro
deleted file mode 100644
index 3365def..0000000
--- a/libopie/pim/test/oevent_test.pro
+++ b/dev/null
@@ -1,11 +0,0 @@
-TEMPLATE = app
-#CONFIG = qt warn_on debug
-CONFIG = qt warn_on release
-#HEADERS =
-SOURCES = oevent_test.cpp
-INCLUDEPATH += $(OPIEDIR)/include
-DEPENDPATH += $(OPIEDIR)/include
-LIBS += -lqpe -lopie
-TARGET = oevent_test
-
-include ( $(OPIEDIR)/include.pro ) \ No newline at end of file
diff --git a/libopie/pim/test/test_todo.cpp b/libopie/pim/test/test_todo.cpp
deleted file mode 100644
index 7440503..0000000
--- a/libopie/pim/test/test_todo.cpp
+++ b/dev/null
@@ -1,36 +0,0 @@
-#include <qdatetime.h>
-#include <qmap.h>
-
-#include <opie/otodo.h>
-#include <opie/otodoaccess.h>
-#include <opie/otodoaccessxml.h>
-
-int main(int argc, char* argv[] ) {
-
- OTodoAccessXML* xml = new OTodoAccessXML("demo");
- OTodoAccess ac(xml);
- int elc;
- QTime timer;
- qWarning("start loading");
- timer.start();
- ac.load();
- elc = timer.elapsed();
- qWarning("Elapsed loading %d %d", elc, elc/1000);
-
- timer.start();
- OTodoAccess::List lis = ac.allRecords();
- elc = timer.elapsed();
- qWarning("Elapsed allRecords %d %d", elc, elc/1000 );
- OTodoAccess::List::Iterator it;
- timer.start();
-ac.save();
-/*
- for( it = lis.begin(); it != lis.end(); ++it ) {
- qWarning("Desc: " + (*it).summary() );
- qWarning("UID %d", (*it).uid() );
- }
- */
-elc = timer.elapsed();
-
- qWarning("elapsed iterating %d %d", elc, elc/1000 );
-};
diff --git a/libopie/pim/test/todo_test.pro b/libopie/pim/test/todo_test.pro
deleted file mode 100644
index 3d14dda..0000000
--- a/libopie/pim/test/todo_test.pro
+++ b/dev/null
@@ -1,11 +0,0 @@
-TEMPLATE = app
-#CONFIG = qt warn_on debug
-CONFIG = qt warn_on release
-#HEADERS =
-SOURCES = test_todo.cpp
-INCLUDEPATH += $(OPIEDIR)/include
-DEPENDPATH += $(OPIEDIR)/include
-LIBS += -lqpe -lopie -lopiesql
-TARGET = todo_test
-
-include ( $(OPIEDIR)/ ) \ No newline at end of file
diff --git a/libopie/.cvsignore b/noncore/unsupported/libopie/.cvsignore
index f76e42e..f76e42e 100644
--- a/libopie/.cvsignore
+++ b/noncore/unsupported/libopie/.cvsignore
diff --git a/libopie/colordialog.cpp b/noncore/unsupported/libopie/colordialog.cpp
index b2854a6..b2854a6 100644
--- a/libopie/colordialog.cpp
+++ b/noncore/unsupported/libopie/colordialog.cpp
diff --git a/libopie/colordialog.h b/noncore/unsupported/libopie/colordialog.h
index c825a83..c825a83 100644
--- a/libopie/colordialog.h
+++ b/noncore/unsupported/libopie/colordialog.h
diff --git a/libopie/colorpopupmenu.cpp b/noncore/unsupported/libopie/colorpopupmenu.cpp
index 03ad233..03ad233 100644
--- a/libopie/colorpopupmenu.cpp
+++ b/noncore/unsupported/libopie/colorpopupmenu.cpp
diff --git a/libopie/colorpopupmenu.h b/noncore/unsupported/libopie/colorpopupmenu.h
index 98d67cc..98d67cc 100644
--- a/libopie/colorpopupmenu.h
+++ b/noncore/unsupported/libopie/colorpopupmenu.h
diff --git a/libopie/config.in b/noncore/unsupported/libopie/config.in
index e8bc2e2..e8bc2e2 100644
--- a/libopie/config.in
+++ b/noncore/unsupported/libopie/config.in
diff --git a/libopie/libopie.pro b/noncore/unsupported/libopie/libopie.pro
index 783c11d..783c11d 100644
--- a/libopie/libopie.pro
+++ b/noncore/unsupported/libopie/libopie.pro
diff --git a/libopie/libopie1.control b/noncore/unsupported/libopie/libopie1.control
index 5b6825e..5b6825e 100644
--- a/libopie/libopie1.control
+++ b/noncore/unsupported/libopie/libopie1.control
diff --git a/libopie/libopie1.postinst b/noncore/unsupported/libopie/libopie1.postinst
index 0c37b3d..0c37b3d 100755
--- a/libopie/libopie1.postinst
+++ b/noncore/unsupported/libopie/libopie1.postinst
diff --git a/libopie/oapplicationfactory.h b/noncore/unsupported/libopie/oapplicationfactory.h
index ab88d80..ab88d80 100644
--- a/libopie/oapplicationfactory.h
+++ b/noncore/unsupported/libopie/oapplicationfactory.h
diff --git a/libopie/ocheckitem.cpp b/noncore/unsupported/libopie/ocheckitem.cpp
index cd763c1..cd763c1 100644
--- a/libopie/ocheckitem.cpp
+++ b/noncore/unsupported/libopie/ocheckitem.cpp
diff --git a/libopie/ocheckitem.h b/noncore/unsupported/libopie/ocheckitem.h
index 82ee3d0..82ee3d0 100644
--- a/libopie/ocheckitem.h
+++ b/noncore/unsupported/libopie/ocheckitem.h
diff --git a/libopie/oclickablelabel.cpp b/noncore/unsupported/libopie/oclickablelabel.cpp
index bc7037b..bc7037b 100644
--- a/libopie/oclickablelabel.cpp
+++ b/noncore/unsupported/libopie/oclickablelabel.cpp
diff --git a/libopie/oclickablelabel.h b/noncore/unsupported/libopie/oclickablelabel.h
index f93ade0..f93ade0 100644
--- a/libopie/oclickablelabel.h
+++ b/noncore/unsupported/libopie/oclickablelabel.h
diff --git a/libopie/ocolorbutton.cpp b/noncore/unsupported/libopie/ocolorbutton.cpp
index 298dba2..298dba2 100644
--- a/libopie/ocolorbutton.cpp
+++ b/noncore/unsupported/libopie/ocolorbutton.cpp
diff --git a/libopie/ocolorbutton.h b/noncore/unsupported/libopie/ocolorbutton.h
index 6196c83..6196c83 100644
--- a/libopie/ocolorbutton.h
+++ b/noncore/unsupported/libopie/ocolorbutton.h
diff --git a/libopie/odevice.cpp b/noncore/unsupported/libopie/odevice.cpp
index 9d0bbbf..9d0bbbf 100644
--- a/libopie/odevice.cpp
+++ b/noncore/unsupported/libopie/odevice.cpp
diff --git a/libopie/odevice.h b/noncore/unsupported/libopie/odevice.h
index fc41079..fc41079 100644
--- a/libopie/odevice.h
+++ b/noncore/unsupported/libopie/odevice.h
diff --git a/libopie/odevicebutton.cpp b/noncore/unsupported/libopie/odevicebutton.cpp
index 647ac4b..647ac4b 100644
--- a/libopie/odevicebutton.cpp
+++ b/noncore/unsupported/libopie/odevicebutton.cpp
diff --git a/libopie/odevicebutton.h b/noncore/unsupported/libopie/odevicebutton.h
index 1621526..1621526 100644
--- a/libopie/odevicebutton.h
+++ b/noncore/unsupported/libopie/odevicebutton.h
diff --git a/libopie/ofiledialog.cc b/noncore/unsupported/libopie/ofiledialog.cc
index 47306b6..47306b6 100644
--- a/libopie/ofiledialog.cc
+++ b/noncore/unsupported/libopie/ofiledialog.cc
diff --git a/libopie/ofiledialog.h b/noncore/unsupported/libopie/ofiledialog.h
index 3b905c0..3b905c0 100644
--- a/libopie/ofiledialog.h
+++ b/noncore/unsupported/libopie/ofiledialog.h
diff --git a/libopie/ofileselector.cpp b/noncore/unsupported/libopie/ofileselector.cpp
index 2a6aed0..2a6aed0 100644
--- a/libopie/ofileselector.cpp
+++ b/noncore/unsupported/libopie/ofileselector.cpp
diff --git a/libopie/ofileselector.h b/noncore/unsupported/libopie/ofileselector.h
index 767455c..767455c 100644
--- a/libopie/ofileselector.h
+++ b/noncore/unsupported/libopie/ofileselector.h
diff --git a/libopie/ofileselector_p.h b/noncore/unsupported/libopie/ofileselector_p.h
index 7fd0c50..7fd0c50 100644
--- a/libopie/ofileselector_p.h
+++ b/noncore/unsupported/libopie/ofileselector_p.h
diff --git a/libopie/ofileview.h b/noncore/unsupported/libopie/ofileview.h
index e072477..e072477 100644
--- a/libopie/ofileview.h
+++ b/noncore/unsupported/libopie/ofileview.h
diff --git a/libopie/ofontmenu.cc b/noncore/unsupported/libopie/ofontmenu.cc
index d16c5e5..d16c5e5 100644
--- a/libopie/ofontmenu.cc
+++ b/noncore/unsupported/libopie/ofontmenu.cc
diff --git a/libopie/ofontmenu.h b/noncore/unsupported/libopie/ofontmenu.h
index 6e143ca..6e143ca 100644
--- a/libopie/ofontmenu.h
+++ b/noncore/unsupported/libopie/ofontmenu.h
diff --git a/libopie/ofontselector.cpp b/noncore/unsupported/libopie/ofontselector.cpp
index 87b7869..87b7869 100644
--- a/libopie/ofontselector.cpp
+++ b/noncore/unsupported/libopie/ofontselector.cpp
diff --git a/libopie/ofontselector.h b/noncore/unsupported/libopie/ofontselector.h
index b819c45..b819c45 100644
--- a/libopie/ofontselector.h
+++ b/noncore/unsupported/libopie/ofontselector.h
diff --git a/libopie/oprocctrl.cpp b/noncore/unsupported/libopie/oprocctrl.cpp
index df8da1e..df8da1e 100644
--- a/libopie/oprocctrl.cpp
+++ b/noncore/unsupported/libopie/oprocctrl.cpp
diff --git a/libopie/oprocctrl.h b/noncore/unsupported/libopie/oprocctrl.h
index 5b39490..5b39490 100644
--- a/libopie/oprocctrl.h
+++ b/noncore/unsupported/libopie/oprocctrl.h
diff --git a/libopie/oprocess.cpp b/noncore/unsupported/libopie/oprocess.cpp
index c19881a..c19881a 100644
--- a/libopie/oprocess.cpp
+++ b/noncore/unsupported/libopie/oprocess.cpp
diff --git a/libopie/oprocess.h b/noncore/unsupported/libopie/oprocess.h
index af7cddb..af7cddb 100644
--- a/libopie/oprocess.h
+++ b/noncore/unsupported/libopie/oprocess.h
diff --git a/libopie/orecurrancebase.ui b/noncore/unsupported/libopie/orecurrancebase.ui
index baf79d3..baf79d3 100644
--- a/libopie/orecurrancebase.ui
+++ b/noncore/unsupported/libopie/orecurrancebase.ui
diff --git a/libopie/orecurrancewidget.cpp b/noncore/unsupported/libopie/orecurrancewidget.cpp
index 33be269..33be269 100644
--- a/libopie/orecurrancewidget.cpp
+++ b/noncore/unsupported/libopie/orecurrancewidget.cpp
diff --git a/libopie/orecurrancewidget.h b/noncore/unsupported/libopie/orecurrancewidget.h
index 37a57f0..37a57f0 100644
--- a/libopie/orecurrancewidget.h
+++ b/noncore/unsupported/libopie/orecurrancewidget.h
diff --git a/libopie/otabbar.cpp b/noncore/unsupported/libopie/otabbar.cpp
index 52621ca..52621ca 100644
--- a/libopie/otabbar.cpp
+++ b/noncore/unsupported/libopie/otabbar.cpp
diff --git a/libopie/otabbar.h b/noncore/unsupported/libopie/otabbar.h
index 668187b..668187b 100644
--- a/libopie/otabbar.h
+++ b/noncore/unsupported/libopie/otabbar.h
diff --git a/libopie/otabinfo.h b/noncore/unsupported/libopie/otabinfo.h
index 00bb06d..00bb06d 100644
--- a/libopie/otabinfo.h
+++ b/noncore/unsupported/libopie/otabinfo.h
diff --git a/libopie/otabwidget.cpp b/noncore/unsupported/libopie/otabwidget.cpp
index 52190b2..52190b2 100644
--- a/libopie/otabwidget.cpp
+++ b/noncore/unsupported/libopie/otabwidget.cpp
diff --git a/libopie/otabwidget.h b/noncore/unsupported/libopie/otabwidget.h
index 047eaa1..047eaa1 100644
--- a/libopie/otabwidget.h
+++ b/noncore/unsupported/libopie/otabwidget.h
diff --git a/libopie/oticker.cpp b/noncore/unsupported/libopie/oticker.cpp
index b41cab6..b41cab6 100644
--- a/libopie/oticker.cpp
+++ b/noncore/unsupported/libopie/oticker.cpp
diff --git a/libopie/oticker.h b/noncore/unsupported/libopie/oticker.h
index 45bf7ce..45bf7ce 100644
--- a/libopie/oticker.h
+++ b/noncore/unsupported/libopie/oticker.h
diff --git a/libopie/otimepicker.cpp b/noncore/unsupported/libopie/otimepicker.cpp
index 11b80ed..11b80ed 100644
--- a/libopie/otimepicker.cpp
+++ b/noncore/unsupported/libopie/otimepicker.cpp
diff --git a/libopie/otimepicker.h b/noncore/unsupported/libopie/otimepicker.h
index 8df7d10..8df7d10 100644
--- a/libopie/otimepicker.h
+++ b/noncore/unsupported/libopie/otimepicker.h
diff --git a/libopie/otimepickerbase.ui b/noncore/unsupported/libopie/otimepickerbase.ui
index 3e7f2fb..3e7f2fb 100644
--- a/libopie/otimepickerbase.ui
+++ b/noncore/unsupported/libopie/otimepickerbase.ui
diff --git a/libopie/owait.cpp b/noncore/unsupported/libopie/owait.cpp
index a0f3834..a0f3834 100644
--- a/libopie/owait.cpp
+++ b/noncore/unsupported/libopie/owait.cpp
diff --git a/libopie/owait.h b/noncore/unsupported/libopie/owait.h
index cbfc8d6..cbfc8d6 100644
--- a/libopie/owait.h
+++ b/noncore/unsupported/libopie/owait.h
diff --git a/libopie/pim/.cvsignore b/noncore/unsupported/libopie/pim/.cvsignore
index aef62c4..aef62c4 100644
--- a/libopie/pim/.cvsignore
+++ b/noncore/unsupported/libopie/pim/.cvsignore
diff --git a/noncore/unsupported/libopie/pim/config.in b/noncore/unsupported/libopie/pim/config.in
new file mode 100644
index 0000000..95d3737
--- a/dev/null
+++ b/noncore/unsupported/libopie/pim/config.in
@@ -0,0 +1,2 @@
+menu "Pim"
+endmenu
diff --git a/libopie/pim/libopie.pro b/noncore/unsupported/libopie/pim/libopie.pro
index 62f235d..62f235d 100644
--- a/libopie/pim/libopie.pro
+++ b/noncore/unsupported/libopie/pim/libopie.pro
diff --git a/libopie/pim/obackendfactory.h b/noncore/unsupported/libopie/pim/obackendfactory.h
index 761ab9a..4cdef8b 100644
--- a/libopie/pim/obackendfactory.h
+++ b/noncore/unsupported/libopie/pim/obackendfactory.h
@@ -1,194 +1,197 @@
/*
* Class to manage Backends.
*
* 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.
* =====================================================================
* ToDo: Use plugins
* =====================================================================
* Version: $Id$
* =====================================================================
* History:
* $Log$
+ * Revision 1.1 2004/11/16 21:46:07 mickeyl
+ * libopie1 goes into unsupported
+ *
* Revision 1.9 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.8 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...
*
* Revision 1.7 2003/08/01 12:30:16 eilers
* Merging changes from BRANCH_1_0 to HEAD
*
* Revision 1.6.4.1 2003/06/30 14:34:19 eilers
* Patches from Zecke:
* Fixing and cleaning up extraMap handling
* Adding d_ptr for binary compatibility in the future
*
* Revision 1.6 2003/04/13 18:07:10 zecke
* More API doc
* QString -> const QString&
* QString = 0l -> QString::null
*
* Revision 1.5 2003/02/21 23:31:52 zecke
* Add XML datebookresource
* -clean up todoaccessxml header
* -implement some more stuff in the oeven tester
* -extend DefaultFactory to not crash and to use datebook
*
* -reading of OEvents is working nicely.. saving will be added
* tomorrow
* -fix spelling in ODateBookAcces
*
* Revision 1.4 2002/10/14 15:55:18 eilers
* Redeactivate SQL.. ;)
*
* Revision 1.3 2002/10/10 17:08:58 zecke
* The Cache is finally in place
* I tested it with my todolist and it 'works' for 10.000 todos the hits are awesome ;)
* The read ahead functionality does not make sense for XMLs backends because most of the stuff is already in memory. While using readahead on SQL makes things a lot faster....
* I still have to fully implement read ahead
* This change is bic but sc
*
* Revision 1.2 2002/10/08 09:27:36 eilers
* Fixed libopie.pro to include the new pim-API.
* The SQL-Stuff is currently deactivated. Otherwise everyone who wants to
* compile itself would need to install libsqlite, libopiesql...
* Therefore, the backend currently uses XML only..
*
* Revision 1.1 2002/10/07 17:35:01 eilers
* added OBackendFactory for advanced backend access
*
*
* =====================================================================
*/
#ifndef OPIE_BACKENDFACTORY_H_
#define OPIE_BACKENDFACTORY_H_
#include <qstring.h>
#include <qasciidict.h>
#include <qpe/config.h>
#include "otodoaccessxml.h"
#include "ocontactaccessbackend_xml.h"
#include "odatebookaccessbackend_xml.h"
#ifdef __USE_SQL
#include "otodoaccesssql.h"
#include "ocontactaccessbackend_sql.h"
#include "odatebookaccessbackend_sql.h"
#endif
class OBackendPrivate;
/**
* This class is our factory. It will give us the default implementations
* of at least Todolist, Contacts and Datebook. In the future this class will
* allow users to switch the backend with ( XML->SQLite ) without the need
* to recompile.#
* This class as the whole PIM Api is making use of templates
*
* <pre>
* OTodoAccessBackend* backend = OBackEndFactory<OTodoAccessBackend>::Default("todo", QString::null );
* backend->load();
* </pre>
*
* @author Stefan Eilers
* @version 0.1
*/
template<class T>
class OBackendFactory
{
public:
OBackendFactory() {};
enum BACKENDS {
TODO,
CONTACT,
DATE
};
/**
* Returns a backend implementation for backendName
* @param backendName the type of the backend
* @param appName will be passed on to the backend
*/
static T* Default( const QString backendName, const QString& appName ){
// __asm__("int3");
Config config( "pimaccess" );
config.setGroup ( backendName );
QString backend = config.readEntry( "usebackend" );
qWarning("Selected backend for %s is: %s", backendName.latin1(), backend.latin1() );
QAsciiDict<int> dict ( 3 );
dict.setAutoDelete ( TRUE );
dict.insert( "todo", new int (TODO) );
dict.insert( "contact", new int (CONTACT) );
dict.insert( "datebook", new int(DATE) );
int *find = dict[ backendName ];
if (!find ) return 0;
switch ( *find ){
case TODO:
#ifdef __USE_SQL
if ( backend == "sql" )
return (T*) new OTodoAccessBackendSQL("");
#else
if ( backend == "sql" )
qWarning ("OBackendFactory:: sql Backend for TODO not implemented! Using XML instead!");
#endif
return (T*) new OTodoAccessXML( appName );
case CONTACT:
#ifdef __USE_SQL
if ( backend == "sql" )
return (T*) new OContactAccessBackend_SQL("");
#else
if ( backend == "sql" )
qWarning ("OBackendFactory:: sql Backend for CONTACT not implemented! Using XML instead!");
#endif
return (T*) new OContactAccessBackend_XML( appName );
case DATE:
#ifdef __USE_SQL
if ( backend == "sql" )
return (T*) new ODateBookAccessBackend_SQL("");
#else
if ( backend == "sql" )
qWarning("OBackendFactory:: sql Backend for DATEBOOK not implemented! Using XML instead!");
#endif
return (T*) new ODateBookAccessBackend_XML( appName );
default:
return NULL;
}
}
private:
OBackendPrivate* d;
};
#endif
diff --git a/libopie/pim/ocontact.cpp b/noncore/unsupported/libopie/pim/ocontact.cpp
index fcf3b26..fcf3b26 100644
--- a/libopie/pim/ocontact.cpp
+++ b/noncore/unsupported/libopie/pim/ocontact.cpp
diff --git a/libopie/pim/ocontact.h b/noncore/unsupported/libopie/pim/ocontact.h
index 1d46b81..1d46b81 100644
--- a/libopie/pim/ocontact.h
+++ b/noncore/unsupported/libopie/pim/ocontact.h
diff --git a/libopie/pim/ocontactaccess.cpp b/noncore/unsupported/libopie/pim/ocontactaccess.cpp
index bc359f7..63b93ee 100644
--- a/libopie/pim/ocontactaccess.cpp
+++ b/noncore/unsupported/libopie/pim/ocontactaccess.cpp
@@ -1,173 +1,176 @@
/*
* Class to manage the Contacts.
*
* 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.
* =====================================================================
* Info: This class could just work with a change in the header-file
* of the Contact class ! Therefore our libopie only compiles
* with our version of libqpe
* =====================================================================
* ToDo: XML-Backend: Automatic reload if something was changed...
*
*
* =====================================================================
* Version: $Id$
* =====================================================================
* History:
* $Log$
+ * Revision 1.1 2004/11/16 21:46:07 mickeyl
+ * libopie1 goes into unsupported
+ *
* Revision 1.9 2004/03/02 12:14:22 alwin
* run the optimize_connect script
* the whole cvs is tagged with "before_optimize_connect" if there are problems you
* can check the diff (but it had compiled and run here)
*
* Revision 1.8 2003/05/08 13:55:09 tille
* search stuff
* and match, toRichText & toShortText in oevent
*
* Revision 1.7 2002/11/13 14:14:51 eilers
* Added sorted for Contacts..
*
* Revision 1.6 2002/11/01 15:10:42 eilers
* Added regExp-search in database for all fields in a contact.
*
* Revision 1.5 2002/10/16 10:52:40 eilers
* Added some docu to the interface and now using the cache infrastucture by zecke.. :)
*
* Revision 1.4 2002/10/14 16:21:54 eilers
* Some minor interface updates
*
* Revision 1.3 2002/10/07 17:34:24 eilers
* added OBackendFactory for advanced backend access
*
* Revision 1.2 2002/10/02 16:18:11 eilers
* debugged and seems to work almost perfectly ..
*
* Revision 1.1 2002/09/27 17:11:44 eilers
* Added API for accessing the Contact-Database ! It is compiling, but
* please do not expect that anything is working !
* I will debug that stuff in the next time ..
* Please read README_COMPILE for compiling !
*
*
*/
#include "ocontactaccess.h"
#include "obackendfactory.h"
#include <qasciidict.h>
#include <qdatetime.h>
#include <qfile.h>
#include <qregexp.h>
#include <qlist.h>
#include <qcopchannel_qws.h>
//#include <qpe/qcopenvelope_qws.h>
#include <qpe/global.h>
#include <errno.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
#include "ocontactaccessbackend_xml.h"
OContactAccess::OContactAccess ( const QString appname, const QString ,
OContactAccessBackend* end, bool autosync ):
OPimAccessTemplate<OContact>( end )
{
/* take care of the backend. If there is no one defined, we
* will use the XML-Backend as default (until we have a cute SQL-Backend..).
*/
if( end == 0 ) {
qWarning ("Using BackendFactory !");
end = OBackendFactory<OContactAccessBackend>::Default( "contact", appname );
}
// Set backend locally and in template
m_backEnd = end;
OPimAccessTemplate<OContact>::setBackEnd (end);
/* Connect signal of external db change to function */
QCopChannel *dbchannel = new QCopChannel( "QPE/PIM", this );
connect( dbchannel, SIGNAL(received(const QCString&,const QByteArray&)),
this, SLOT(copMessage(const QCString&,const QByteArray&)) );
if ( autosync ){
QCopChannel *syncchannel = new QCopChannel( "QPE/Sync", this );
connect( syncchannel, SIGNAL(received(const QCString&,const QByteArray&)),
this, SLOT(copMessage(const QCString&,const QByteArray&)) );
}
}
OContactAccess::~OContactAccess ()
{
/* The user may forget to save the changed database, therefore try to
* do it for him..
*/
save();
// delete m_backEnd; is done by template..
}
bool OContactAccess::save ()
{
/* If the database was changed externally, we could not save the
* Data. This will remove added items which is unacceptable !
* Therefore: Reload database and merge the data...
*/
if ( OPimAccessTemplate<OContact>::wasChangedExternally() )
reload();
bool status = OPimAccessTemplate<OContact>::save();
if ( !status ) return false;
/* Now tell everyone that new data is available.
*/
QCopEnvelope e( "QPE/PIM", "addressbookUpdated()" );
return true;
}
const uint OContactAccess::querySettings()
{
return ( m_backEnd->querySettings() );
}
bool OContactAccess::hasQuerySettings ( int querySettings ) const
{
return ( m_backEnd->hasQuerySettings ( querySettings ) );
}
ORecordList<OContact> OContactAccess::sorted( bool ascending, int sortOrder, int sortFilter, int cat ) const
{
QArray<int> matchingContacts = m_backEnd -> sorted( ascending, sortOrder, sortFilter, cat );
return ( ORecordList<OContact>(matchingContacts, this) );
}
bool OContactAccess::wasChangedExternally()const
{
return ( m_backEnd->wasChangedExternally() );
}
void OContactAccess::copMessage( const QCString &msg, const QByteArray & )
{
if ( msg == "addressbookUpdated()" ){
qWarning ("OContactAccess: Received addressbokUpdated()");
emit signalChanged ( this );
} else if ( msg == "flush()" ) {
qWarning ("OContactAccess: Received flush()");
save ();
} else if ( msg == "reload()" ) {
qWarning ("OContactAccess: Received reload()");
reload ();
emit signalChanged ( this );
}
}
diff --git a/libopie/pim/ocontactaccess.h b/noncore/unsupported/libopie/pim/ocontactaccess.h
index bd6da40..a7a099f 100644
--- a/libopie/pim/ocontactaccess.h
+++ b/noncore/unsupported/libopie/pim/ocontactaccess.h
@@ -1,193 +1,196 @@
/*
* Class to manage the Contacts.
*
* Copyright (c) 2002 by Stefan Eilers (Eilers.Stefan@epost.de)
* Copyright (c) 2002 by Holger Freyther (zecke@handhelds.org)
*
* =====================================================================
* 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.
* =====================================================================
* ToDo: Define enum for query settings
* =====================================================================
* Version: $Id$
* =====================================================================
* History:
* $Log$
+ * Revision 1.1 2004/11/16 21:46:07 mickeyl
+ * libopie1 goes into unsupported
+ *
* Revision 1.10 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.9 2003/08/01 12:30:16 eilers
* Merging changes from BRANCH_1_0 to HEAD
*
* Revision 1.8.2.1 2003/06/30 14:34:19 eilers
* Patches from Zecke:
* Fixing and cleaning up extraMap handling
* Adding d_ptr for binary compatibility in the future
*
* Revision 1.8 2003/05/08 13:55:09 tille
* search stuff
* and match, toRichText & toShortText in oevent
*
* Revision 1.7 2003/04/13 18:07:10 zecke
* More API doc
* QString -> const QString&
* QString = 0l -> QString::null
*
* Revision 1.6 2003/01/02 14:27:12 eilers
* Improved query by example: Search by date is possible.. First step
* for a today plugin for birthdays..
*
* Revision 1.5 2002/11/13 14:14:51 eilers
* Added sorted for Contacts..
*
* Revision 1.4 2002/11/01 15:10:42 eilers
* Added regExp-search in database for all fields in a contact.
*
* Revision 1.3 2002/10/16 10:52:40 eilers
* Added some docu to the interface and now using the cache infrastucture by zecke.. :)
*
* Revision 1.2 2002/10/14 16:21:54 eilers
* Some minor interface updates
*
* Revision 1.1 2002/09/27 17:11:44 eilers
* Added API for accessing the Contact-Database ! It is compiling, but
* please do not expect that anything is working !
* I will debug that stuff in the next time ..
* Please read README_COMPILE for compiling !
*
* =====================================================================
*/
#ifndef _OCONTACTACCESS_H
#define _OCONTACTACCESS_H
#include <qobject.h>
#include <qpe/qcopenvelope_qws.h>
#include <qvaluelist.h>
#include <qfileinfo.h>
#include "ocontact.h"
#include "ocontactaccessbackend.h"
#include "opimaccesstemplate.h"
/**
* Class to access the contacts database.
* This is just a frontend for the real database handling which is
* done by the backend.
* This class is used to access the Contacts on a system. This class as any OPIE PIM
* class is backend independent.
* @author Stefan Eilers, Holger Freyther
* @see OPimAccessTemplate
*/
class OContactAccess: public QObject, public OPimAccessTemplate<OContact>
{
Q_OBJECT
public:
/**
* Create Database with contacts (addressbook).
* @param appname Name of application which wants access to the database
* (i.e. "todolist")
* @param filename The name of the database file. If not set, the default one
* is used.
* @param backend Pointer to an alternative Backend. If not set, we will use
* the default backend.
* @param handlesync If <b>true</b> the database stores the current state
* automatically if it receives the signals <i>flush()</i> and <i>reload()</i>
* which are used before and after synchronisation. If the application wants
* to react itself, it should be disabled by setting it to <b>false</b>
* @see OContactAccessBackend
*/
OContactAccess (const QString appname, const QString filename = 0l,
OContactAccessBackend* backend = 0l, bool handlesync = true);
~OContactAccess ();
/** Constants for query.
* Use this constants to set the query parameters.
* Note: <i>query_IgnoreCase</i> just make sense with one of the other attributes !
* @see queryByExample()
*/
enum QuerySettings {
WildCards = 0x0001,
IgnoreCase = 0x0002,
RegExp = 0x0004,
ExactMatch = 0x0008,
MatchOne = 0x0010, // Only one Entry must match
DateDiff = 0x0020, // Find all entries from today until given date
DateYear = 0x0040, // The year matches
DateMonth = 0x0080, // The month matches
DateDay = 0x0100, // The day matches
};
/** Return all Contacts in a sorted manner.
* @param ascending true: Sorted in acending order.
* @param sortOrder Currently not implemented. Just defined to stay compatible to otodoaccess
* @param sortFilter Currently not implemented. Just defined to stay compatible to otodoaccess
* @param cat Currently not implemented. Just defined to stay compatible to otodoaccess
*/
List sorted( bool ascending, int sortOrder, int sortFilter, int cat ) const;
/** Return all possible settings.
* @return All settings provided by the current backend
* (i.e.: query_WildCards & query_IgnoreCase)
*/
const uint querySettings();
/** Check whether settings are correct.
* @return <i>true</i> if the given settings are correct and possible.
*/
bool hasQuerySettings ( int querySettings ) const;
/**
* if the resource was changed externally.
* You should use the signal instead of polling possible changes !
*/
bool wasChangedExternally()const;
/** Save contacts database.
* Save is more a "commit". After calling this function, all changes are public available.
* @return true if successful
*/
bool save();
signals:
/* Signal is emitted if the database was changed. Therefore
* we may need to reload to stay consistent.
* @param which Pointer to the database who created this event. This pointer
* is useful if an application has to handle multiple databases at the same time.
* @see reload()
*/
void signalChanged ( const OContactAccess *which );
private:
// class OContactAccessPrivate;
// OContactAccessPrivate* d;
OContactAccessBackend *m_backEnd;
bool m_loading:1;
private slots:
void copMessage( const QCString &msg, const QByteArray &data );
private:
class Private;
Private *d;
};
#endif
diff --git a/libopie/pim/ocontactaccessbackend.h b/noncore/unsupported/libopie/pim/ocontactaccessbackend.h
index 0eac6dc..cfeeff2 100644
--- a/libopie/pim/ocontactaccessbackend.h
+++ b/noncore/unsupported/libopie/pim/ocontactaccessbackend.h
@@ -1,128 +1,131 @@
/**
* The class responsible for managing a backend.
* The implementation of this abstract class contains
* the complete database handling.
*
* Copyright (c) 2002 by Stefan Eilers (Eilers.Stefan@epost.de)
* Copyright (c) 2002 by Holger Freyther (zecke@handhelds.org)
*
* =====================================================================
* 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.
* =====================================================================
* ToDo: Define enum for query settings
* =====================================================================
* Version: $Id$
* =====================================================================
* History:
* $Log$
+ * Revision 1.1 2004/11/16 21:46:07 mickeyl
+ * libopie1 goes into unsupported
+ *
* Revision 1.7 2004/02/19 02:05:37 zecke
* Add notes for API fixes and BC stuff
*
* Revision 1.6 2003/08/01 12:30:16 eilers
* Merging changes from BRANCH_1_0 to HEAD
*
* Revision 1.5.4.1 2003/06/30 14:34:19 eilers
* Patches from Zecke:
* Fixing and cleaning up extraMap handling
* Adding d_ptr for binary compatibility in the future
*
* Revision 1.5 2003/04/13 18:07:10 zecke
* More API doc
* QString -> const QString&
* QString = 0l -> QString::null
*
* Revision 1.4 2002/11/13 14:14:51 eilers
* Added sorted for Contacts..
*
* Revision 1.3 2002/11/01 15:10:42 eilers
* Added regExp-search in database for all fields in a contact.
*
* Revision 1.2 2002/10/07 17:34:24 eilers
* added OBackendFactory for advanced backend access
*
* Revision 1.1 2002/09/27 17:11:44 eilers
* Added API for accessing the Contact-Database ! It is compiling, but
* please do not expect that anything is working !
* I will debug that stuff in the next time ..
* Please read README_COMPILE for compiling !
*
* =====================================================================
*
*/
#ifndef _OCONTACTACCESSBACKEND_H_
#define _OCONTACTACCESSBACKEND_H_
#include "ocontact.h"
#include "opimaccessbackend.h"
#include <qregexp.h>
/**
* This class represents the interface of all Contact Backends.
* Derivates of this class will be used to access the contacts.
* As implementation currently XML and vCard exist. This class needs to be implemented
* if you want to provide your own storage.
* In all queries a list of uids is passed on instead of loading the actual record!
*
* @see OContactAccessBackend_VCard
* @see OContactAccessBackend_XML
*/
class OContactAccessBackend: public OPimAccessBackend<OContact> {
public:
/**
* @todo make non line in regard to BC guide of KDE
*/
OContactAccessBackend() {}
/**
* @todo make non inline in regard to the BC guide of KDE
*/
virtual ~OContactAccessBackend() {}
/**
* Return if database was changed externally.
* This may just make sense on file based databases like a XML-File.
* It is used to prevent to overwrite the current database content
* if the file was already changed by something else !
* If this happens, we have to reload before save our data.
* If we use real databases, this should be handled by the database
* management system themselve, therefore this function should always return false in
* this case. It is not our problem to handle this conflict ...
* @return <i>true</i> if the database was changed and if save without reload will
* be dangerous. <i>false</i> if the database was not changed or it is save to write
* in this situation.
*/
virtual bool wasChangedExternally() = 0;
virtual QArray<int> matchRegexp( const QRegExp &r ) const = 0;
/**
* Return all possible settings.
* @return All settings provided by the current backend
* (i.e.: query_WildCards & query_IgnoreCase)
*/
virtual const uint querySettings() = 0;
/**
* Check whether settings are correct.
* @return <i>true</i> if the given settings are correct and possible.
*/
virtual bool hasQuerySettings (uint querySettings) const = 0;
/**
* FIXME!!!
* Returns a sorted list of records either ascendinf or descending for a giving criteria and category
*/
virtual QArray<int> sorted( bool ascending, int sortOrder, int sortFilter, int cat ) = 0;
private:
class Private;
Private *d;
};
#endif
diff --git a/libopie/pim/ocontactaccessbackend_sql.cpp b/noncore/unsupported/libopie/pim/ocontactaccessbackend_sql.cpp
index d20df56..669483d 100644
--- a/libopie/pim/ocontactaccessbackend_sql.cpp
+++ b/noncore/unsupported/libopie/pim/ocontactaccessbackend_sql.cpp
@@ -1,208 +1,211 @@
/*
* 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.1 2004/11/16 21:46:07 mickeyl
+ * libopie1 goes into unsupported
+ *
* Revision 1.5 2004/03/14 13:50:35 alwin
* namespace correction
*
* 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/osqldriver.h>
#include <opie2/osqlresult.h>
#include <opie2/osqlmanager.h>
#include <opie2/osqlquery.h>
using namespace Opie::DB;
// If defined, we use a horizontal table ( uid, attr1, attr2, attr3, ..., attrn ) instead
// vertical like "uid, type, value".
// DON'T DEACTIVATE THIS DEFINE IN PRODUCTIVE ENVIRONMENTS !!
#define __STORE_HORIZONTAL_
// Distinct loading is not very fast. If I expect that every person has just
// one (and always one) 'Last Name', I can request all uid's for existing lastnames,
// which is faster..
// But this may not be true for all entries, like company contacts..
// The current AddressBook application handles this problem, but other may not.. (eilers)
#define __USE_SUPERFAST_LOADQUERY
/*
* Implementation of used query types
* CREATE query
* LOAD query
* INSERT
* REMOVE
* CLEAR
*/
namespace {
/**
* CreateQuery for the Todolist Table
*/
class CreateQuery : public OSQLQuery {
public:
CreateQuery();
~CreateQuery();
QString query()const;
};
/**
* Clears (delete) a Table
*/
class ClearQuery : public OSQLQuery {
public:
ClearQuery();
~ClearQuery();
QString query()const;
};
/**
* LoadQuery
* this one queries for all uids
*/
class LoadQuery : public OSQLQuery {
public:
LoadQuery();
~LoadQuery();
QString query()const;
};
/**
* inserts/adds a OContact to the table
*/
class InsertQuery : public OSQLQuery {
public:
InsertQuery(const OContact& );
~InsertQuery();
QString query()const;
private:
OContact m_contact;
};
/**
* removes one from the table
*/
class RemoveQuery : public OSQLQuery {
public:
RemoveQuery(int uid );
~RemoveQuery();
QString query()const;
private:
int m_uid;
};
/**
* a find query for noncustom elements
*/
class FindQuery : public OSQLQuery {
public:
FindQuery(int uid);
FindQuery(const QArray<int>& );
~FindQuery();
QString query()const;
private:
QString single()const;
QString multi()const;
QArray<int> m_uids;
int m_uid;
};
/**
* a find query for custom elements
*/
class FindCustomQuery : public OSQLQuery {
public:
FindCustomQuery(int uid);
FindCustomQuery(const QArray<int>& );
~FindCustomQuery();
QString query()const;
private:
QString single()const;
QString multi()const;
QArray<int> m_uids;
int m_uid;
};
// We using three tables to store the information:
// 1. addressbook : It contains General information about the contact (non custom)
// 2. custom_data : Not official supported entries
// All tables are connected by the uid of the contact.
// Maybe I should add a table for meta-information ?
CreateQuery::CreateQuery() : OSQLQuery() {}
CreateQuery::~CreateQuery() {}
QString CreateQuery::query()const {
QString qu;
#ifdef __STORE_HORIZONTAL_
qu += "create table addressbook( uid PRIMARY KEY ";
QStringList fieldList = OContactFields::untrfields( false );
for ( QStringList::Iterator it = ++fieldList.begin(); it != fieldList.end(); ++it ){
qu += QString( ",\"%1\" VARCHAR(10)" ).arg( *it );
}
qu += " );";
qu += "create table custom_data( uid INTEGER, id INTEGER, type VARCHAR, priority INTEGER, value VARCHAR, PRIMARY KEY /* identifier */ (uid, id) );";
#else
qu += "create table addressbook( uid INTEGER, id INTEGER, type VARCHAR, priority INTEGER, value VARCHAR, PRIMARY KEY /* identifier */ (uid, id));";
qu += "create table custom_data( uid INTEGER, id INTEGER, type VARCHAR, priority INTEGER, value VARCHAR, PRIMARY KEY /* identifier */ (uid, id) );";
// qu += "create table dates( uid PRIMARY KEY, type, day, month, year, hour, minute, second );";
#endif // __STORE_HORIZONTAL_
return qu;
diff --git a/libopie/pim/ocontactaccessbackend_sql.h b/noncore/unsupported/libopie/pim/ocontactaccessbackend_sql.h
index f553760..8cd92e8 100644
--- a/libopie/pim/ocontactaccessbackend_sql.h
+++ b/noncore/unsupported/libopie/pim/ocontactaccessbackend_sql.h
@@ -1,107 +1,110 @@
/*
* 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.1 2004/11/16 21:46:07 mickeyl
+ * libopie1 goes into unsupported
+ *
* Revision 1.3 2004/03/14 13:50:35 alwin
* namespace correction
*
* Revision 1.2 2003/12/08 15:18:11 eilers
* Committing unfinished sql implementation before merging to libopie2 starts..
*
* 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...
*
*
*/
#ifndef _OContactAccessBackend_SQL_
#define _OContactAccessBackend_SQL_
#include "ocontactaccessbackend.h"
#include "ocontactaccess.h"
#include <qlist.h>
#include <qdict.h>
namespace Opie { namespace DB {
class OSQLDriver;
class OSQLResult;
class OSQLResultItem;
}}
/* the default xml implementation */
/**
* This class is the SQL implementation of a Contact backend
* it does implement everything available for OContact.
* @see OPimAccessBackend for more information of available methods
*/
class OContactAccessBackend_SQL : public OContactAccessBackend {
public:
OContactAccessBackend_SQL ( const QString& appname, const QString& filename = QString::null );
~OContactAccessBackend_SQL ();
bool save();
bool load ();
void clear ();
bool wasChangedExternally();
QArray<int> allRecords() const;
OContact find ( int uid ) const;
// FIXME: Add lookahead-cache support !
//OContact find(int uid, const QArray<int>&, uint cur, Frontend::CacheDirection )const;
QArray<int> queryByExample ( const OContact &query, int settings,
const QDateTime& d );
QArray<int> matchRegexp( const QRegExp &r ) const;
const uint querySettings();
bool hasQuerySettings (uint querySettings) const;
// Currently only asc implemented..
QArray<int> sorted( bool asc, int , int , int );
bool add ( const OContact &newcontact );
bool replace ( const OContact &contact );
bool remove ( int uid );
bool reload();
private:
QArray<int> extractUids( Opie::DB::OSQLResult& res ) const;
QMap<int, QString> requestNonCustom( int uid ) const;
QMap<QString, QString> requestCustom( int uid ) const;
void update();
protected:
bool m_changed;
QString m_fileName;
QArray<int> m_uids;
Opie::DB::OSQLDriver* m_driver;
};
#endif
diff --git a/libopie/pim/ocontactaccessbackend_vcard.cpp b/noncore/unsupported/libopie/pim/ocontactaccessbackend_vcard.cpp
index b60c5be..a795b56 100644
--- a/libopie/pim/ocontactaccessbackend_vcard.cpp
+++ b/noncore/unsupported/libopie/pim/ocontactaccessbackend_vcard.cpp
@@ -1,211 +1,214 @@
/*
* VCard Backend for the OPIE-Contact Database.
*
* Copyright (C) 2000 Trolltech AS. All rights reserved.
* 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.
* =====================================================================
* ToDo:
*
* =====================================================================
* Version: $Id$
* =====================================================================
* History:
* $Log$
+ * Revision 1.1 2004/11/16 21:46:07 mickeyl
+ * libopie1 goes into unsupported
+ *
* Revision 1.11 2003/08/01 12:30:16 eilers
* Merging changes from BRANCH_1_0 to HEAD
*
* Revision 1.10.4.3 2003/07/23 08:54:37 eilers
* Default email was added to the list of all emails, which already contains
* the default email..
* This closes bug #1045
*
* Revision 1.10.4.2 2003/07/23 08:44:45 eilers
* Importing of Notes in vcard files wasn't implemented.
* Closes bug #1044
*
* Revision 1.10.4.1 2003/06/02 13:37:49 eilers
* Fixing memory leak
*
* Revision 1.10 2003/04/13 18:07:10 zecke
* More API doc
* QString -> const QString&
* QString = 0l -> QString::null
*
* Revision 1.9 2003/03/21 10:33:09 eilers
* Merged speed optimized xml backend for contacts to main.
* Added QDateTime to querybyexample. For instance, it is now possible to get
* all Birthdays/Anniversaries between two dates. This should be used
* to show all birthdays in the datebook..
* This change is sourcecode backward compatible but you have to upgrade
* the binaries for today-addressbook.
*
* Revision 1.8 2003/02/21 16:52:49 zecke
* -Remove old Todo classes they're deprecated and today I already using the
* new API
* -Guard against self assignment in OTodo
* -Add test apps for OPIM
* -Opiefied Event classes
* -Added TimeZone handling and pinning of TimeZones to OEvent
* -Adjust ORecur and the widget to better timezone behaviour
*
* Revision 1.7 2003/02/16 22:25:46 zecke
* 0000276 Fix for that bug.. or better temp workaround
* A Preferred Number is HOME|VOICE
* A CellPhone is HOME|VOICE|CELL the type & HOME|VOICE test
* triggers both
* and the cell phone number overrides the other entries..
*
* as a temp I check that it's not equal to HOME|VOICE|CELL before setting the
* number
*
* The right and final fix would be to reorder the if statement to make it
* if else based and the less common thing put to the bottom
*
* OTodoAccessVcal fix the date for beaming
*
* Revision 1.6 2003/01/13 15:49:31 eilers
* Fixing crash when businesscard.vcf is missing..
*
* Revision 1.5 2002/12/07 13:26:22 eilers
* Fixing bug in storing anniversary..
*
* Revision 1.4 2002/11/13 14:14:51 eilers
* Added sorted for Contacts..
*
* Revision 1.3 2002/11/11 16:41:09 kergoth
* no default arguments in implementation
*
* Revision 1.2 2002/11/10 15:41:53 eilers
* Bugfixes..
*
* Revision 1.1 2002/11/09 14:34:52 eilers
* Added VCard Backend.
*
*/
#include "ocontactaccessbackend_vcard.h"
#include "../../library/backend/vobject_p.h"
#include "../../library/backend/qfiledirect_p.h"
#include <qpe/timeconversion.h>
#include <qfile.h>
OContactAccessBackend_VCard::OContactAccessBackend_VCard ( const QString& , const QString& filename ):
m_dirty( false ),
m_file( filename )
{
load();
}
bool OContactAccessBackend_VCard::load ()
{
m_map.clear();
m_dirty = false;
VObject* obj = 0l;
if ( QFile::exists(m_file) ){
obj = Parse_MIME_FromFileName( QFile::encodeName(m_file).data() );
if ( !obj )
return false;
}else{
qWarning("File \"%s\" not found !", m_file.latin1() );
return false;
}
while ( obj ) {
OContact con = parseVObject( obj );
/*
* if uid is 0 assign a new one
* this at least happens on
* Nokia6210
*/
if ( con.uid() == 0 ){
con.setUid( 1 );
qWarning("assigned new uid %d",con.uid() );
}
m_map.insert( con.uid(), con );
VObject *t = obj;
obj = nextVObjectInList(obj);
cleanVObject( t );
}
return true;
}
bool OContactAccessBackend_VCard::reload()
{
return load();
}
bool OContactAccessBackend_VCard::save()
{
if (!m_dirty )
return true;
QFileDirect file( m_file );
if (!file.open(IO_WriteOnly ) )
return false;
VObject *obj;
obj = newVObject( VCCalProp );
addPropValue( obj, VCVersionProp, "1.0" );
VObject *vo;
for(QMap<int, OContact>::ConstIterator it=m_map.begin(); it !=m_map.end(); ++it ){
vo = createVObject( *it );
writeVObject( file.directHandle() , vo );
cleanVObject( vo );
}
cleanStrTbl();
deleteVObject( obj );
m_dirty = false;
return true;
}
void OContactAccessBackend_VCard::clear ()
{
m_map.clear();
m_dirty = true; // ??? sure ? (se)
}
bool OContactAccessBackend_VCard::add ( const OContact& newcontact )
{
m_map.insert( newcontact.uid(), newcontact );
m_dirty = true;
return true;
}
bool OContactAccessBackend_VCard::remove ( int uid )
{
m_map.remove( uid );
m_dirty = true;
return true;
}
bool OContactAccessBackend_VCard::replace ( const OContact &contact )
{
m_map.replace( contact.uid(), contact );
m_dirty = true;
return true;
}
OContact OContactAccessBackend_VCard::find ( int uid ) const
{
return m_map[uid];
}
QArray<int> OContactAccessBackend_VCard::allRecords() const
{
QArray<int> ar( m_map.count() );
QMap<int, OContact>::ConstIterator it;
diff --git a/libopie/pim/ocontactaccessbackend_vcard.h b/noncore/unsupported/libopie/pim/ocontactaccessbackend_vcard.h
index 712d769..6dbc718 100644
--- a/libopie/pim/ocontactaccessbackend_vcard.h
+++ b/noncore/unsupported/libopie/pim/ocontactaccessbackend_vcard.h
@@ -1,96 +1,99 @@
/*
* VCard Backend for the OPIE-Contact Database.
*
* Copyright (C) 2000 Trolltech AS. All rights reserved.
* 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.
* =====================================================================
* ToDo:
*
* =====================================================================
* Version: $Id$
* =====================================================================
* History:
* $Log$
+ * Revision 1.1 2004/11/16 21:46:07 mickeyl
+ * libopie1 goes into unsupported
+ *
* Revision 1.6 2003/04/13 18:07:10 zecke
* More API doc
* QString -> const QString&
* QString = 0l -> QString::null
*
* Revision 1.5 2003/03/21 10:33:09 eilers
* Merged speed optimized xml backend for contacts to main.
* Added QDateTime to querybyexample. For instance, it is now possible to get
* all Birthdays/Anniversaries between two dates. This should be used
* to show all birthdays in the datebook..
* This change is sourcecode backward compatible but you have to upgrade
* the binaries for today-addressbook.
*
* Revision 1.4 2002/12/07 13:26:22 eilers
* Fixing bug in storing anniversary..
*
* Revision 1.3 2002/11/13 14:14:51 eilers
* Added sorted for Contacts..
*
* Revision 1.2 2002/11/10 15:41:53 eilers
* Bugfixes..
*
* Revision 1.1 2002/11/09 14:34:52 eilers
* Added VCard Backend.
*
*/
#ifndef __OCONTACTACCESSBACKEND_VCARD_H_
#define __OCONTACTACCESSBACKEND_VCARD_H_
#include <opie/ocontact.h>
#include "ocontactaccessbackend.h"
class VObject;
/**
* This is the vCard 2.1 implementation of the Contact Storage
* @see OContactAccessBackend_XML
* @see OPimAccessBackend
*/
class OContactAccessBackend_VCard : public OContactAccessBackend {
public:
OContactAccessBackend_VCard ( const QString& appname, const QString& filename = QString::null );
bool load ();
bool reload();
bool save();
void clear ();
bool add ( const OContact& newcontact );
bool remove ( int uid );
bool replace ( const OContact& contact );
OContact find ( int uid ) const;
QArray<int> allRecords() const;
QArray<int> queryByExample ( const OContact &query, int settings, const QDateTime& d = QDateTime() );
QArray<int> matchRegexp( const QRegExp &r ) const;
const uint querySettings();
bool hasQuerySettings (uint querySettings) const;
QArray<int> sorted( bool ascending, int sortOrder, int sortFilter, int cat );
bool wasChangedExternally();
private:
OContact parseVObject( VObject* obj );
VObject* createVObject( const OContact& c );
QString convDateToVCardDate( const QDate& c ) const;
QDate convVCardDateToDate( const QString& datestr );
VObject *safeAddPropValue( VObject *o, const char* prop, const QString& value );
VObject *safeAddProp( VObject* o, const char* prop);
bool m_dirty : 1;
QString m_file;
QMap<int, OContact> m_map;
};
#endif
diff --git a/libopie/pim/ocontactaccessbackend_xml.cpp b/noncore/unsupported/libopie/pim/ocontactaccessbackend_xml.cpp
index 2373ad6..7ceaf5b 100644
--- a/libopie/pim/ocontactaccessbackend_xml.cpp
+++ b/noncore/unsupported/libopie/pim/ocontactaccessbackend_xml.cpp
@@ -1,209 +1,212 @@
/*
* XML 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.1 2004/11/16 21:46:07 mickeyl
+ * libopie1 goes into unsupported
+ *
* Revision 1.10 2004/03/01 15:44:36 chicken
* fix includes
*
* Revision 1.9 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...
*
* Revision 1.8 2003/08/30 15:28:26 eilers
* Removed some unimportant debug output which causes slow down..
*
* Revision 1.7 2003/08/01 12:30:16 eilers
* Merging changes from BRANCH_1_0 to HEAD
*
* Revision 1.6 2003/07/07 16:19:47 eilers
* Fixing serious bug in hasQuerySettings()
*
* Revision 1.5 2003/04/13 18:07:10 zecke
* More API doc
* QString -> const QString&
* QString = 0l -> QString::null
*
* Revision 1.4 2003/03/21 14:32:54 mickeyl
* g++ compliance fix: default arguments belong into the declaration, but not the definition
*
* Revision 1.3 2003/03/21 12:26:28 eilers
* Fixing small bug: If we search a birthday from today to today, it returned
* every contact ..
*
* Revision 1.2 2003/03/21 10:33:09 eilers
* Merged speed optimized xml backend for contacts to main.
* Added QDateTime to querybyexample. For instance, it is now possible to get
* all Birthdays/Anniversaries between two dates. This should be used
* to show all birthdays in the datebook..
* This change is sourcecode backward compatible but you have to upgrade
* the binaries for today-addressbook.
*
* Revision 1.1.2.2 2003/02/11 12:17:28 eilers
* Speed optimization. Removed the sequential search loops.
*
* Revision 1.1.2.1 2003/02/10 15:31:38 eilers
* Writing offsets to debug output..
*
* Revision 1.1 2003/02/09 15:05:01 eilers
* Nothing happened.. Just some cleanup before I will start..
*
* Revision 1.12 2003/01/03 16:58:03 eilers
* Reenable debug output
*
* Revision 1.11 2003/01/03 12:31:28 eilers
* Bugfix for calculating data diffs..
*
* Revision 1.10 2003/01/02 14:27:12 eilers
* Improved query by example: Search by date is possible.. First step
* for a today plugin for birthdays..
*
* Revision 1.9 2002/12/08 12:48:57 eilers
* Moved journal-enum from ocontact into i the xml-backend..
*
* Revision 1.8 2002/11/14 17:04:24 eilers
* Sorting will now work if fullname is identical on some entries
*
* Revision 1.7 2002/11/13 15:02:46 eilers
* Small Bug in sorted fixed
*
* Revision 1.6 2002/11/13 14:14:51 eilers
* Added sorted for Contacts..
*
* Revision 1.5 2002/11/01 15:10:42 eilers
* Added regExp-search in database for all fields in a contact.
*
* Revision 1.4 2002/10/16 10:52:40 eilers
* Added some docu to the interface and now using the cache infrastucture by zecke.. :)
*
* Revision 1.3 2002/10/14 16:21:54 eilers
* Some minor interface updates
*
* Revision 1.2 2002/10/07 17:34:24 eilers
* added OBackendFactory for advanced backend access
*
* Revision 1.1 2002/09/27 17:11:44 eilers
* Added API for accessing the Contact-Database ! It is compiling, but
* please do not expect that anything is working !
* I will debug that stuff in the next time ..
* Please read README_COMPILE for compiling !
*
*
*/
#include "ocontactaccessbackend_xml.h"
#include <qasciidict.h>
#include <qfile.h>
#include <qfileinfo.h>
#include <qregexp.h>
#include <qarray.h>
#include <qmap.h>
#include <qpe/global.h>
#include <opie/xmltree.h>
#include "ocontactaccessbackend.h"
#include "ocontactaccess.h"
#include <stdlib.h>
#include <errno.h>
using namespace Opie;
OContactAccessBackend_XML::OContactAccessBackend_XML ( const QString& appname, const QString& filename ):
m_changed( false )
{
// Just m_contactlist should call delete if an entry
// is removed.
m_contactList.setAutoDelete( true );
m_uidToContact.setAutoDelete( false );
m_appName = appname;
/* Set journalfile name ... */
m_journalName = getenv("HOME");
m_journalName +="/.abjournal" + appname;
/* Expecting to access the default filename if nothing else is set */
if ( filename.isEmpty() ){
m_fileName = Global::applicationFileName( "addressbook","addressbook.xml" );
} else
m_fileName = filename;
/* Load Database now */
load ();
}
bool OContactAccessBackend_XML::save()
{
if ( !m_changed )
return true;
QString strNewFile = m_fileName + ".new";
QFile f( strNewFile );
if ( !f.open( IO_WriteOnly|IO_Raw ) )
return false;
int total_written;
int idx_offset = 0;
QString out;
// Write Header
out = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><!DOCTYPE Addressbook ><AddressBook>\n"
" <Groups>\n"
" </Groups>\n"
" <Contacts>\n";
QCString cstr = out.utf8();
f.writeBlock( cstr.data(), cstr.length() );
idx_offset += cstr.length();
out = "";
// Write all contacts
QListIterator<OContact> it( m_contactList );
for ( ; it.current(); ++it ) {
// qWarning(" Uid %d at Offset: %x", (*it)->uid(), idx_offset );
out += "<Contact ";
(*it)->save( out );
out += "/>\n";
cstr = out.utf8();
total_written = f.writeBlock( cstr.data(), cstr.length() );
idx_offset += cstr.length();
if ( total_written != int(cstr.length()) ) {
f.close();
QFile::remove( strNewFile );
return false;
}
out = "";
}
out += " </Contacts>\n</AddressBook>\n";
// Write Footer
cstr = out.utf8();
total_written = f.writeBlock( cstr.data(), cstr.length() );
if ( total_written != int( cstr.length() ) ) {
f.close();
QFile::remove( strNewFile );
return false;
}
f.close();
// move the file over, I'm just going to use the system call
// because, I don't feel like using QDir.
if ( ::rename( strNewFile.latin1(), m_fileName.latin1() ) < 0 ) {
qWarning( "problem renaming file %s to %s, errno: %d",
diff --git a/libopie/pim/ocontactaccessbackend_xml.h b/noncore/unsupported/libopie/pim/ocontactaccessbackend_xml.h
index a0cae4d..6857844 100644
--- a/libopie/pim/ocontactaccessbackend_xml.h
+++ b/noncore/unsupported/libopie/pim/ocontactaccessbackend_xml.h
@@ -1,160 +1,163 @@
/*
* XML 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.
* =====================================================================
* ToDo: XML-Backend: Automatic reload if something was changed...
* File Locking to protect against concurrent access
*
*
* =====================================================================
* Version: $Id$
* =====================================================================
* History:
* $Log$
+ * Revision 1.1 2004/11/16 21:46:07 mickeyl
+ * libopie1 goes into unsupported
+ *
* Revision 1.15 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...
*
* Revision 1.14 2003/04/13 18:07:10 zecke
* More API doc
* QString -> const QString&
* QString = 0l -> QString::null
*
* Revision 1.13 2003/03/21 10:33:09 eilers
* Merged speed optimized xml backend for contacts to main.
* Added QDateTime to querybyexample. For instance, it is now possible to get
* all Birthdays/Anniversaries between two dates. This should be used
* to show all birthdays in the datebook..
* This change is sourcecode backward compatible but you have to upgrade
* the binaries for today-addressbook.
*
* Revision 1.12.2.2 2003/02/11 12:17:28 eilers
* Speed optimization. Removed the sequential search loops.
*
* Revision 1.12.2.1 2003/02/09 15:05:01 eilers
* Nothing happened.. Just some cleanup before I will start..
*
* Revision 1.12 2003/01/03 16:58:03 eilers
* Reenable debug output
*
* Revision 1.11 2003/01/03 12:31:28 eilers
* Bugfix for calculating data diffs..
*
* Revision 1.10 2003/01/02 14:27:12 eilers
* Improved query by example: Search by date is possible.. First step
* for a today plugin for birthdays..
*
* Revision 1.9 2002/12/08 12:48:57 eilers
* Moved journal-enum from ocontact into i the xml-backend..
*
* Revision 1.8 2002/11/14 17:04:24 eilers
* Sorting will now work if fullname is identical on some entries
*
* Revision 1.7 2002/11/13 15:02:46 eilers
* Small Bug in sorted fixed
*
* Revision 1.6 2002/11/13 14:14:51 eilers
* Added sorted for Contacts..
*
* Revision 1.5 2002/11/01 15:10:42 eilers
* Added regExp-search in database for all fields in a contact.
*
* Revision 1.4 2002/10/16 10:52:40 eilers
* Added some docu to the interface and now using the cache infrastucture by zecke.. :)
*
* Revision 1.3 2002/10/14 16:21:54 eilers
* Some minor interface updates
*
* Revision 1.2 2002/10/07 17:34:24 eilers
* added OBackendFactory for advanced backend access
*
* Revision 1.1 2002/09/27 17:11:44 eilers
* Added API for accessing the Contact-Database ! It is compiling, but
* please do not expect that anything is working !
* I will debug that stuff in the next time ..
* Please read README_COMPILE for compiling !
*
*
*/
#ifndef _OContactAccessBackend_XML_
#define _OContactAccessBackend_XML_
#include "ocontactaccessbackend.h"
#include "ocontactaccess.h"
#include <qlist.h>
#include <qdict.h>
/* the default xml implementation */
/**
* This class is the XML implementation of a Contact backend
* it does implement everything available for OContact.
* @see OPimAccessBackend for more information of available methods
*/
class OContactAccessBackend_XML : public OContactAccessBackend {
public:
OContactAccessBackend_XML ( const QString& appname, const QString& filename = QString::null );
bool save();
bool load ();
void clear ();
bool wasChangedExternally();
QArray<int> allRecords() const;
OContact find ( int uid ) const;
QArray<int> queryByExample ( const OContact &query, int settings, const QDateTime& d = QDateTime() );
QArray<int> matchRegexp( const QRegExp &r ) const;
const uint querySettings();
bool hasQuerySettings (uint querySettings) const;
// Currently only asc implemented..
QArray<int> sorted( bool asc, int , int , int );
bool add ( const OContact &newcontact );
bool replace ( const OContact &contact );
bool remove ( int uid );
bool reload();
private:
enum journal_action { ACTION_ADD, ACTION_REMOVE, ACTION_REPLACE };
void addContact_p( const OContact &newcontact );
/* This function loads the xml-database and the journalfile */
bool load( const QString filename, bool isJournal );
void updateJournal( const OContact& cnt, journal_action action );
void removeJournal();
protected:
bool m_changed;
QString m_journalName;
QString m_fileName;
QString m_appName;
QList<OContact> m_contactList;
QDateTime m_readtime;
QDict<OContact> m_uidToContact;
};
#endif
diff --git a/libopie/pim/ocontactfields.cpp b/noncore/unsupported/libopie/pim/ocontactfields.cpp
index 0f08a5a..0f08a5a 100644
--- a/libopie/pim/ocontactfields.cpp
+++ b/noncore/unsupported/libopie/pim/ocontactfields.cpp
diff --git a/libopie/pim/ocontactfields.h b/noncore/unsupported/libopie/pim/ocontactfields.h
index f105de7..f105de7 100644
--- a/libopie/pim/ocontactfields.h
+++ b/noncore/unsupported/libopie/pim/ocontactfields.h
diff --git a/libopie/pim/oconversion.cpp b/noncore/unsupported/libopie/pim/oconversion.cpp
index 0d15414..0d15414 100644
--- a/libopie/pim/oconversion.cpp
+++ b/noncore/unsupported/libopie/pim/oconversion.cpp
diff --git a/libopie/pim/oconversion.h b/noncore/unsupported/libopie/pim/oconversion.h
index 4c0a497..4c0a497 100644
--- a/libopie/pim/oconversion.h
+++ b/noncore/unsupported/libopie/pim/oconversion.h
diff --git a/libopie/pim/odatebookaccess.cpp b/noncore/unsupported/libopie/pim/odatebookaccess.cpp
index d95fed6..d95fed6 100644
--- a/libopie/pim/odatebookaccess.cpp
+++ b/noncore/unsupported/libopie/pim/odatebookaccess.cpp
diff --git a/libopie/pim/odatebookaccess.h b/noncore/unsupported/libopie/pim/odatebookaccess.h
index 62196da..62196da 100644
--- a/libopie/pim/odatebookaccess.h
+++ b/noncore/unsupported/libopie/pim/odatebookaccess.h
diff --git a/libopie/pim/odatebookaccessbackend.cpp b/noncore/unsupported/libopie/pim/odatebookaccessbackend.cpp
index f0c5d65..f0c5d65 100644
--- a/libopie/pim/odatebookaccessbackend.cpp
+++ b/noncore/unsupported/libopie/pim/odatebookaccessbackend.cpp
diff --git a/libopie/pim/odatebookaccessbackend.h b/noncore/unsupported/libopie/pim/odatebookaccessbackend.h
index 3472ab3..3472ab3 100644
--- a/libopie/pim/odatebookaccessbackend.h
+++ b/noncore/unsupported/libopie/pim/odatebookaccessbackend.h
diff --git a/libopie/pim/odatebookaccessbackend_sql.cpp b/noncore/unsupported/libopie/pim/odatebookaccessbackend_sql.cpp
index 44dd2bc..5f87afe 100644
--- a/libopie/pim/odatebookaccessbackend_sql.cpp
+++ b/noncore/unsupported/libopie/pim/odatebookaccessbackend_sql.cpp
@@ -1,208 +1,211 @@
/*
* SQL Backend for the OPIE-Calender Database.
*
* Copyright (c) 2003 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.1 2004/11/16 21:46:08 mickeyl
+ * libopie1 goes into unsupported
+ *
* Revision 1.4 2004/03/14 13:50:35 alwin
* namespace correction
*
* Revision 1.3 2003/12/22 11:41:39 eilers
* Fixing stupid bug, found by sourcode review..
*
* Revision 1.2 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.1 2003/12/08 15:18:12 eilers
* Committing unfinished sql implementation before merging to libopie2 starts..
*
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <qarray.h>
#include <qstringlist.h>
#include <qpe/global.h>
#include <opie2/osqldriver.h>
#include <opie2/osqlmanager.h>
#include <opie2/osqlquery.h>
#include "orecur.h"
#include "odatebookaccessbackend_sql.h"
using namespace Opie::DB;
ODateBookAccessBackend_SQL::ODateBookAccessBackend_SQL( const QString& ,
const QString& fileName )
: ODateBookAccessBackend(), m_driver( NULL )
{
m_fileName = fileName.isEmpty() ? Global::applicationFileName( "datebook", "datebook.db" ) : fileName;
// Get the standart sql-driver from the OSQLManager..
OSQLManager man;
m_driver = man.standard();
m_driver->setUrl( m_fileName );
initFields();
load();
}
ODateBookAccessBackend_SQL::~ODateBookAccessBackend_SQL() {
if( m_driver )
delete m_driver;
}
void ODateBookAccessBackend_SQL::initFields()
{
// This map contains the translation of the fieldtype id's to
// the names of the table columns
m_fieldMap.insert( OEvent::FUid, "uid" );
m_fieldMap.insert( OEvent::FCategories, "Categories" );
m_fieldMap.insert( OEvent::FDescription, "Description" );
m_fieldMap.insert( OEvent::FLocation, "Location" );
m_fieldMap.insert( OEvent::FType, "Type" );
m_fieldMap.insert( OEvent::FAlarm, "Alarm" );
m_fieldMap.insert( OEvent::FSound, "Sound" );
m_fieldMap.insert( OEvent::FRType, "RType" );
m_fieldMap.insert( OEvent::FRWeekdays, "RWeekdays" );
m_fieldMap.insert( OEvent::FRPosition, "RPosition" );
m_fieldMap.insert( OEvent::FRFreq, "RFreq" );
m_fieldMap.insert( OEvent::FRHasEndDate, "RHasEndDate" );
m_fieldMap.insert( OEvent::FREndDate, "REndDate" );
m_fieldMap.insert( OEvent::FRCreated, "RCreated" );
m_fieldMap.insert( OEvent::FRExceptions, "RExceptions" );
m_fieldMap.insert( OEvent::FStart, "Start" );
m_fieldMap.insert( OEvent::FEnd, "End" );
m_fieldMap.insert( OEvent::FNote, "Note" );
m_fieldMap.insert( OEvent::FTimeZone, "TimeZone" );
m_fieldMap.insert( OEvent::FRecParent, "RecParent" );
m_fieldMap.insert( OEvent::FRecChildren, "Recchildren" );
// Create a map that maps the column name to the id
QMapConstIterator<int, QString> it;
for ( it = ++m_fieldMap.begin(); it != m_fieldMap.end(); ++it ){
m_reverseFieldMap.insert( it.data(), it.key() );
}
}
bool ODateBookAccessBackend_SQL::load()
{
if (!m_driver->open() )
return false;
// Don't expect that the database exists.
// It is save here to create the table, even if it
// do exist. ( Is that correct for all databases ?? )
QString qu = "create table datebook( uid INTEGER PRIMARY KEY ";
QMap<int, QString>::Iterator it;
for ( it = ++m_fieldMap.begin(); it != m_fieldMap.end(); ++it ){
qu += QString( ",%1 VARCHAR(10)" ).arg( it.data() );
}
qu += " );";
qu += "create table custom_data( uid INTEGER, id INTEGER, type VARCHAR, priority INTEGER, value VARCHAR, PRIMARY KEY /* identifier */ (uid, id) );";
qWarning( "command: %s", qu.latin1() );
OSQLRawQuery raw( qu );
OSQLResult res = m_driver->query( &raw );
if ( res.state() != OSQLResult::Success )
return false;
update();
return true;
}
void ODateBookAccessBackend_SQL::update()
{
QString qu = "select uid from datebook";
OSQLRawQuery raw( qu );
OSQLResult res = m_driver->query( &raw );
if ( res.state() != OSQLResult::Success ){
// m_uids.clear();
return;
}
m_uids = extractUids( res );
}
bool ODateBookAccessBackend_SQL::reload()
{
return load();
}
bool ODateBookAccessBackend_SQL::save()
{
return m_driver->close(); // Shouldn't m_driver->sync be better than close ? (eilers)
}
QArray<int> ODateBookAccessBackend_SQL::allRecords()const
{
return m_uids;
}
QArray<int> ODateBookAccessBackend_SQL::queryByExample(const OEvent&, int, const QDateTime& ) {
return QArray<int>();
}
void ODateBookAccessBackend_SQL::clear()
{
QString qu = "drop table datebook;";
qu += "drop table custom_data;";
OSQLRawQuery raw( qu );
OSQLResult res = m_driver->query( &raw );
reload();
}
OEvent ODateBookAccessBackend_SQL::find( int uid ) const{
QString qu = "select *";
qu += "from datebook where uid = " + QString::number(uid);
OSQLRawQuery raw( qu );
OSQLResult res = m_driver->query( &raw );
OSQLResultItem resItem = res.first();
// Create Map for date event and insert UID
QMap<int,QString> dateEventMap;
dateEventMap.insert( OEvent::FUid, QString::number( uid ) );
// Now insert the data out of the columns into the map.
QMapConstIterator<int, QString> it;
for ( it = ++m_fieldMap.begin(); it != m_fieldMap.end(); ++it ){
dateEventMap.insert( m_reverseFieldMap[*it], resItem.data( *it ) );
}
diff --git a/libopie/pim/odatebookaccessbackend_sql.h b/noncore/unsupported/libopie/pim/odatebookaccessbackend_sql.h
index ba514bc..ba514bc 100644
--- a/libopie/pim/odatebookaccessbackend_sql.h
+++ b/noncore/unsupported/libopie/pim/odatebookaccessbackend_sql.h
diff --git a/libopie/pim/odatebookaccessbackend_xml.cpp b/noncore/unsupported/libopie/pim/odatebookaccessbackend_xml.cpp
index 929d004..929d004 100644
--- a/libopie/pim/odatebookaccessbackend_xml.cpp
+++ b/noncore/unsupported/libopie/pim/odatebookaccessbackend_xml.cpp
diff --git a/libopie/pim/odatebookaccessbackend_xml.h b/noncore/unsupported/libopie/pim/odatebookaccessbackend_xml.h
index a5cc0fc..a5cc0fc 100644
--- a/libopie/pim/odatebookaccessbackend_xml.h
+++ b/noncore/unsupported/libopie/pim/odatebookaccessbackend_xml.h
diff --git a/libopie/pim/oevent.cpp b/noncore/unsupported/libopie/pim/oevent.cpp
index 9b31957..9b31957 100644
--- a/libopie/pim/oevent.cpp
+++ b/noncore/unsupported/libopie/pim/oevent.cpp
diff --git a/libopie/pim/oevent.h b/noncore/unsupported/libopie/pim/oevent.h
index 9eb948f..9eb948f 100644
--- a/libopie/pim/oevent.h
+++ b/noncore/unsupported/libopie/pim/oevent.h
diff --git a/libopie/pim/opimaccessbackend.h b/noncore/unsupported/libopie/pim/opimaccessbackend.h
index fd264fc..fd264fc 100644
--- a/libopie/pim/opimaccessbackend.h
+++ b/noncore/unsupported/libopie/pim/opimaccessbackend.h
diff --git a/libopie/pim/opimaccesstemplate.h b/noncore/unsupported/libopie/pim/opimaccesstemplate.h
index ecbeb68..ecbeb68 100644
--- a/libopie/pim/opimaccesstemplate.h
+++ b/noncore/unsupported/libopie/pim/opimaccesstemplate.h
diff --git a/libopie/pim/opimcache.h b/noncore/unsupported/libopie/pim/opimcache.h
index 7f7cff5..7f7cff5 100644
--- a/libopie/pim/opimcache.h
+++ b/noncore/unsupported/libopie/pim/opimcache.h
diff --git a/libopie/pim/opimmaintainer.cpp b/noncore/unsupported/libopie/pim/opimmaintainer.cpp
index 92cb25a..92cb25a 100644
--- a/libopie/pim/opimmaintainer.cpp
+++ b/noncore/unsupported/libopie/pim/opimmaintainer.cpp
diff --git a/libopie/pim/opimmaintainer.h b/noncore/unsupported/libopie/pim/opimmaintainer.h
index 793d066..793d066 100644
--- a/libopie/pim/opimmaintainer.h
+++ b/noncore/unsupported/libopie/pim/opimmaintainer.h
diff --git a/libopie/pim/opimmainwindow.cpp b/noncore/unsupported/libopie/pim/opimmainwindow.cpp
index 99a0333..99a0333 100644
--- a/libopie/pim/opimmainwindow.cpp
+++ b/noncore/unsupported/libopie/pim/opimmainwindow.cpp
diff --git a/libopie/pim/opimmainwindow.h b/noncore/unsupported/libopie/pim/opimmainwindow.h
index 855d364..855d364 100644
--- a/libopie/pim/opimmainwindow.h
+++ b/noncore/unsupported/libopie/pim/opimmainwindow.h
diff --git a/libopie/pim/opimnotify.cpp b/noncore/unsupported/libopie/pim/opimnotify.cpp
index af5514b..af5514b 100644
--- a/libopie/pim/opimnotify.cpp
+++ b/noncore/unsupported/libopie/pim/opimnotify.cpp
diff --git a/libopie/pim/opimnotify.h b/noncore/unsupported/libopie/pim/opimnotify.h
index 58417db..58417db 100644
--- a/libopie/pim/opimnotify.h
+++ b/noncore/unsupported/libopie/pim/opimnotify.h
diff --git a/libopie/pim/opimnotifymanager.cpp b/noncore/unsupported/libopie/pim/opimnotifymanager.cpp
index d6f0ead..d6f0ead 100644
--- a/libopie/pim/opimnotifymanager.cpp
+++ b/noncore/unsupported/libopie/pim/opimnotifymanager.cpp
diff --git a/libopie/pim/opimnotifymanager.h b/noncore/unsupported/libopie/pim/opimnotifymanager.h
index f3c22f9..f3c22f9 100644
--- a/libopie/pim/opimnotifymanager.h
+++ b/noncore/unsupported/libopie/pim/opimnotifymanager.h
diff --git a/libopie/pim/opimrecord.cpp b/noncore/unsupported/libopie/pim/opimrecord.cpp
index 2365748..2365748 100644
--- a/libopie/pim/opimrecord.cpp
+++ b/noncore/unsupported/libopie/pim/opimrecord.cpp
diff --git a/libopie/pim/opimrecord.h b/noncore/unsupported/libopie/pim/opimrecord.h
index 3d774e2..3d774e2 100644
--- a/libopie/pim/opimrecord.h
+++ b/noncore/unsupported/libopie/pim/opimrecord.h
diff --git a/libopie/pim/opimresolver.cpp b/noncore/unsupported/libopie/pim/opimresolver.cpp
index 4ebbd6e..4ebbd6e 100644
--- a/libopie/pim/opimresolver.cpp
+++ b/noncore/unsupported/libopie/pim/opimresolver.cpp
diff --git a/libopie/pim/opimresolver.h b/noncore/unsupported/libopie/pim/opimresolver.h
index 1ce1619..1ce1619 100644
--- a/libopie/pim/opimresolver.h
+++ b/noncore/unsupported/libopie/pim/opimresolver.h
diff --git a/libopie/pim/opimstate.cpp b/noncore/unsupported/libopie/pim/opimstate.cpp
index 6fb2feb..6fb2feb 100644
--- a/libopie/pim/opimstate.cpp
+++ b/noncore/unsupported/libopie/pim/opimstate.cpp
diff --git a/libopie/pim/opimstate.h b/noncore/unsupported/libopie/pim/opimstate.h
index cf6af46..cf6af46 100644
--- a/libopie/pim/opimstate.h
+++ b/noncore/unsupported/libopie/pim/opimstate.h
diff --git a/libopie/pim/opimxref.cpp b/noncore/unsupported/libopie/pim/opimxref.cpp
index 8eefbd8..8eefbd8 100644
--- a/libopie/pim/opimxref.cpp
+++ b/noncore/unsupported/libopie/pim/opimxref.cpp
diff --git a/libopie/pim/opimxref.h b/noncore/unsupported/libopie/pim/opimxref.h
index 6852651..6852651 100644
--- a/libopie/pim/opimxref.h
+++ b/noncore/unsupported/libopie/pim/opimxref.h
diff --git a/libopie/pim/opimxrefmanager.cpp b/noncore/unsupported/libopie/pim/opimxrefmanager.cpp
index 58bfd24..58bfd24 100644
--- a/libopie/pim/opimxrefmanager.cpp
+++ b/noncore/unsupported/libopie/pim/opimxrefmanager.cpp
diff --git a/libopie/pim/opimxrefmanager.h b/noncore/unsupported/libopie/pim/opimxrefmanager.h
index c485e98..c485e98 100644
--- a/libopie/pim/opimxrefmanager.h
+++ b/noncore/unsupported/libopie/pim/opimxrefmanager.h
diff --git a/libopie/pim/opimxrefpartner.cpp b/noncore/unsupported/libopie/pim/opimxrefpartner.cpp
index 6ef3efb..6ef3efb 100644
--- a/libopie/pim/opimxrefpartner.cpp
+++ b/noncore/unsupported/libopie/pim/opimxrefpartner.cpp
diff --git a/libopie/pim/opimxrefpartner.h b/noncore/unsupported/libopie/pim/opimxrefpartner.h
index d76e384..d76e384 100644
--- a/libopie/pim/opimxrefpartner.h
+++ b/noncore/unsupported/libopie/pim/opimxrefpartner.h
diff --git a/libopie/pim/orecordlist.h b/noncore/unsupported/libopie/pim/orecordlist.h
index 5211f57..5211f57 100644
--- a/libopie/pim/orecordlist.h
+++ b/noncore/unsupported/libopie/pim/orecordlist.h
diff --git a/libopie/pim/orecur.cpp b/noncore/unsupported/libopie/pim/orecur.cpp
index f46f22e..f46f22e 100644
--- a/libopie/pim/orecur.cpp
+++ b/noncore/unsupported/libopie/pim/orecur.cpp
diff --git a/libopie/pim/orecur.h b/noncore/unsupported/libopie/pim/orecur.h
index d7ecd90..d7ecd90 100644
--- a/libopie/pim/orecur.h
+++ b/noncore/unsupported/libopie/pim/orecur.h
diff --git a/libopie/pim/otemplatebase.h b/noncore/unsupported/libopie/pim/otemplatebase.h
index cadac74..cadac74 100644
--- a/libopie/pim/otemplatebase.h
+++ b/noncore/unsupported/libopie/pim/otemplatebase.h
diff --git a/libopie/pim/otimezone.cpp b/noncore/unsupported/libopie/pim/otimezone.cpp
index 34659c3..34659c3 100644
--- a/libopie/pim/otimezone.cpp
+++ b/noncore/unsupported/libopie/pim/otimezone.cpp
diff --git a/libopie/pim/otimezone.h b/noncore/unsupported/libopie/pim/otimezone.h
index bb08349..bb08349 100644
--- a/libopie/pim/otimezone.h
+++ b/noncore/unsupported/libopie/pim/otimezone.h
diff --git a/libopie/pim/otodo.cpp b/noncore/unsupported/libopie/pim/otodo.cpp
index b2c76f8..b2c76f8 100644
--- a/libopie/pim/otodo.cpp
+++ b/noncore/unsupported/libopie/pim/otodo.cpp
diff --git a/libopie/pim/otodo.h b/noncore/unsupported/libopie/pim/otodo.h
index 6df98b9..6df98b9 100644
--- a/libopie/pim/otodo.h
+++ b/noncore/unsupported/libopie/pim/otodo.h
diff --git a/libopie/pim/otodoaccess.cpp b/noncore/unsupported/libopie/pim/otodoaccess.cpp
index 37f6fbc..37f6fbc 100644
--- a/libopie/pim/otodoaccess.cpp
+++ b/noncore/unsupported/libopie/pim/otodoaccess.cpp
diff --git a/libopie/pim/otodoaccess.h b/noncore/unsupported/libopie/pim/otodoaccess.h
index 916923f..916923f 100644
--- a/libopie/pim/otodoaccess.h
+++ b/noncore/unsupported/libopie/pim/otodoaccess.h
diff --git a/libopie/pim/otodoaccessbackend.cpp b/noncore/unsupported/libopie/pim/otodoaccessbackend.cpp
index baaeecc..baaeecc 100644
--- a/libopie/pim/otodoaccessbackend.cpp
+++ b/noncore/unsupported/libopie/pim/otodoaccessbackend.cpp
diff --git a/libopie/pim/otodoaccessbackend.h b/noncore/unsupported/libopie/pim/otodoaccessbackend.h
index 6be95bc..6be95bc 100644
--- a/libopie/pim/otodoaccessbackend.h
+++ b/noncore/unsupported/libopie/pim/otodoaccessbackend.h
diff --git a/libopie/pim/otodoaccesssql.cpp b/noncore/unsupported/libopie/pim/otodoaccesssql.cpp
index fd01a42..fd01a42 100644
--- a/libopie/pim/otodoaccesssql.cpp
+++ b/noncore/unsupported/libopie/pim/otodoaccesssql.cpp
diff --git a/libopie/pim/otodoaccesssql.h b/noncore/unsupported/libopie/pim/otodoaccesssql.h
index 72214de..72214de 100644
--- a/libopie/pim/otodoaccesssql.h
+++ b/noncore/unsupported/libopie/pim/otodoaccesssql.h
diff --git a/libopie/pim/otodoaccessvcal.cpp b/noncore/unsupported/libopie/pim/otodoaccessvcal.cpp
index 6415952..6415952 100644
--- a/libopie/pim/otodoaccessvcal.cpp
+++ b/noncore/unsupported/libopie/pim/otodoaccessvcal.cpp
diff --git a/libopie/pim/otodoaccessvcal.h b/noncore/unsupported/libopie/pim/otodoaccessvcal.h
index 2b17147..2b17147 100644
--- a/libopie/pim/otodoaccessvcal.h
+++ b/noncore/unsupported/libopie/pim/otodoaccessvcal.h
diff --git a/libopie/pim/otodoaccessxml.cpp b/noncore/unsupported/libopie/pim/otodoaccessxml.cpp
index 4a5cb33..4a5cb33 100644
--- a/libopie/pim/otodoaccessxml.cpp
+++ b/noncore/unsupported/libopie/pim/otodoaccessxml.cpp
diff --git a/libopie/pim/otodoaccessxml.h b/noncore/unsupported/libopie/pim/otodoaccessxml.h
index e4850a1..e4850a1 100644
--- a/libopie/pim/otodoaccessxml.h
+++ b/noncore/unsupported/libopie/pim/otodoaccessxml.h
diff --git a/libopie/sharp_compat.cpp b/noncore/unsupported/libopie/sharp_compat.cpp
index 1d16a09..1d16a09 100644
--- a/libopie/sharp_compat.cpp
+++ b/noncore/unsupported/libopie/sharp_compat.cpp
diff --git a/libopie/todayconfigwidget.h b/noncore/unsupported/libopie/todayconfigwidget.h
index f3501a1..f3501a1 100644
--- a/libopie/todayconfigwidget.h
+++ b/noncore/unsupported/libopie/todayconfigwidget.h
diff --git a/libopie/todayplugininterface.h b/noncore/unsupported/libopie/todayplugininterface.h
index 5dfeaa8..5dfeaa8 100644
--- a/libopie/todayplugininterface.h
+++ b/noncore/unsupported/libopie/todayplugininterface.h
diff --git a/libopie/xmltree.cc b/noncore/unsupported/libopie/xmltree.cc
index 27db5b3..27db5b3 100644
--- a/libopie/xmltree.cc
+++ b/noncore/unsupported/libopie/xmltree.cc
diff --git a/libopie/xmltree.h b/noncore/unsupported/libopie/xmltree.h
index 4b6bdfa..4b6bdfa 100644
--- a/libopie/xmltree.h
+++ b/noncore/unsupported/libopie/xmltree.h