author | mickeyl <mickeyl> | 2004-11-16 19:14:18 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-11-16 19:14:18 (UTC) |
commit | ea3945a9bd8f9830f70b1efa133f9df13b19362f (patch) (unidiff) | |
tree | f2ea22cc50e9aa8aa73ee7dea148f41c563c9666 | |
parent | 1c6f490e8541626f68422e0a3a7c7281d7f5b7d3 (diff) | |
download | opie-ea3945a9bd8f9830f70b1efa133f9df13b19362f.zip opie-ea3945a9bd8f9830f70b1efa133f9df13b19362f.tar.gz opie-ea3945a9bd8f9830f70b1efa133f9df13b19362f.tar.bz2 |
libopie1 goes into unsupported
-rw-r--r-- | libopie/TODO | 16 | ||||
-rw-r--r-- | libopie/ofileselector/.cvsignore | 1 | ||||
-rw-r--r-- | libopie/pim/ABSTRACT | 18 | ||||
-rw-r--r-- | libopie/pim/DESIGN | 56 | ||||
-rw-r--r-- | libopie/pim/TODO | 34 | ||||
-rw-r--r-- | libopie/pim/test/converter.cpp | 107 | ||||
-rwxr-xr-x | libopie/pim/test/converter.h | 18 | ||||
-rw-r--r-- | libopie/pim/test/converter.pro | 12 | ||||
-rw-r--r-- | libopie/pim/test/converter_base.ui | 238 | ||||
-rw-r--r-- | libopie/pim/test/oevent_test.cpp | 35 | ||||
-rw-r--r-- | libopie/pim/test/oevent_test.pro | 11 | ||||
-rw-r--r-- | libopie/pim/test/test_todo.cpp | 36 | ||||
-rw-r--r-- | libopie/pim/test/todo_test.pro | 11 | ||||
-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-x | noncore/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.in | 2 | ||||
-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 @@ | |||
1 | - xmltree done | ||
2 | |||
3 | - tododb | ||
4 | - set Alarms | ||
5 | |||
6 | - OFileSelector | ||
7 | - m_mimeCheck always shows the first icon | ||
8 | - mimetype selection broken | ||
9 | - when changing dirs the mimetype selections get messed up | ||
10 | - DocLnk when not in Document Mode ( and vice versa ) | ||
11 | - MultipleDocuments | ||
12 | - Move OFileSelectorItem to it's own files | ||
13 | - new Dirs created inside the listview | ||
14 | |||
15 | - Clickable labels? | ||
16 | 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 @@ | |||
1 | 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 @@ | |||
1 | What is Opie PIM? Why is it special? | ||
2 | Why do we need Opie PIM? | ||
3 | |||
4 | The goal of OpiePIM is to be first of all | ||
5 | extendable, light weight, scalable and fast. | ||
6 | For the programmer we try to add a nice but | ||
7 | powerful API to all classes. | ||
8 | |||
9 | Memory is a costy resource on small and embedded | ||
10 | devices. So we try to keep the memory usage as | ||
11 | low as possible. Never the less we won't use structs | ||
12 | and Pointers in the public API. | ||
13 | The whole pim framework is value based. Internally we try | ||
14 | to use implicit sharing as found in other Qt classes as well. | ||
15 | This makes it possible to give 3rd party devels a nice | ||
16 | API while keeping the memory usage as low as possible. | ||
17 | |||
18 | 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 @@ | |||
1 | Hija to the DESIGN of our OPIE PIM stuff | ||
2 | |||
3 | This design was firstly discussed in the train | ||
4 | from Frankfurt to Hannover between me (zecke ) and eilers. | ||
5 | |||
6 | We had a look at our pim implementation and the one from | ||
7 | trolltech and we looked what was missing. | ||
8 | |||
9 | GOALS: | ||
10 | - clean implementation | ||
11 | - share code | ||
12 | - ObjectOriented Design | ||
13 | - Scalable | ||
14 | - Integration into common solutions like STL and Qt | ||
15 | - Addition | ||
16 | - Ease of Use | ||
17 | |||
18 | GENERAL: | ||
19 | - use templates | ||
20 | - have a common base class for all Records OPimRecord | ||
21 | - use references instead of pointers | ||
22 | - make use of QShared internally memory consumption | ||
23 | |||
24 | We've a 'public' and 'private' part in our lib | ||
25 | OPimAccessTemplate is the public part. This will be used | ||
26 | by 3rd party developers to access the PIMs. | ||
27 | OPimAccessBackend is the backend. You could also call it | ||
28 | resource. | ||
29 | |||
30 | Both things need to be implemented for different kind of records. | ||
31 | By using templates we can make sure we share code and the reason | ||
32 | not to use simple inheretance is that we can specialise quite easy. | ||
33 | |||
34 | For example we have OTodoAccess : public OPimAccessTemplate<OTodo>; | ||
35 | the we would do | ||
36 | OTodoAccess::List list = otodoAccess.all(); | ||
37 | OTodoAccess::List::Iterator it; | ||
38 | for( it = list.begin(); it != list.end(); ++it ); | ||
39 | |||
40 | |||
41 | as you can see from here it just behaves like you expect from Qt or STL. | ||
42 | |||
43 | The kewlest thing is that List and List::Iterator is free to use if you | ||
44 | want to implement your own OPimAccessTemplate. | ||
45 | You just have to sub class it and voila you're done | ||
46 | |||
47 | |||
48 | Hope you enjoy using OPIE PIM | ||
49 | |||
50 | regards Holger 'zecke' Freyther | ||
51 | |||
52 | |||
53 | |||
54 | |||
55 | |||
56 | |||
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 @@ | |||
1 | -Add XML Index ( dropped ) | ||
2 | -Add ReadOnly Resources ( to be discussed ) | ||
3 | -Add Sorted/Random Access mode for faster access to the base ( to be discussed ) | ||
4 | |||
5 | Yeah Stefan you're right I need to stop the fragmentation but these are just ideas | ||
6 | we not to talk about. | ||
7 | |||
8 | New Ideas Widgets: | ||
9 | OCategoryPopup: | ||
10 | Like the function Menu in Xemacs. If there are too many | ||
11 | Categories sort them into sub popups. A-B,B-G,H-K.... | ||
12 | Integrate SUbcategories | ||
13 | |||
14 | |||
15 | New Ideas on Infrastructure: | ||
16 | -finally switch to sqlite | ||
17 | -rework Category Sub Categories | ||
18 | -X-Ref!!!!! | ||
19 | -signalling ( Peer to Peer/ Backend to Backend communication of changes on a file basis ) | ||
20 | -Signal the User about updates. Use QSignal and make it generic push from backend | ||
21 | to the access. | ||
22 | -flocking, mmapping | ||
23 | -Generic Tablewidget, getting QString for a record and attribute ( generic ) like QProperty | ||
24 | -chooser widgets | ||
25 | -hierachies | ||
26 | -multiple backends | ||
27 | -public private sort public and private on backends. default backend for each if multiple | ||
28 | backends loaded. Move from backend to backend.. ( backend mover app? ) | ||
29 | -importer/exporter | ||
30 | -check if cache also drops | ||
31 | -port to BigSize Api | ||
32 | |||
33 | ORedoManager ORedoItem both are templates to allow undoing and redoing to a level... | ||
34 | \ 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 @@ | |||
1 | #include "converter.h" | ||
2 | |||
3 | #include <qdatetime.h> | ||
4 | #include <qprogressbar.h> | ||
5 | |||
6 | #include <qpe/qpeapplication.h> | ||
7 | |||
8 | #include <opie/ocontactaccess.h> | ||
9 | #include <opie/ocontactaccessbackend_xml.h> | ||
10 | #include <opie/ocontactaccessbackend_sql.h> | ||
11 | |||
12 | #include <opie/odatebookaccess.h> | ||
13 | #include <opie/odatebookaccessbackend_xml.h> | ||
14 | #include <opie/odatebookaccessbackend_sql.h> | ||
15 | |||
16 | // #define _ADDRESSBOOK_ACCESS | ||
17 | |||
18 | Converter::Converter(){ | ||
19 | } | ||
20 | |||
21 | void Converter::start_conversion(){ | ||
22 | qWarning("Converting Contacts from XML to SQL.."); | ||
23 | |||
24 | // Creating backends to the requested databases.. | ||
25 | |||
26 | #ifdef _ADDRESSBOOK_ACCESS | ||
27 | OContactAccessBackend* xmlBackend = new OContactAccessBackend_XML( "Converter", | ||
28 | QString::null ); | ||
29 | |||
30 | OContactAccessBackend* sqlBackend = new OContactAccessBackend_SQL( QString::null, | ||
31 | QString::null ); | ||
32 | // Put the created backends into frontends to access them | ||
33 | OContactAccess* xmlAccess = new OContactAccess ( "addressbook_xml", | ||
34 | QString::null , xmlBackend, true ); | ||
35 | |||
36 | OContactAccess* sqlAccess = new OContactAccess ( "addressbook_sql", | ||
37 | QString::null ); | ||
38 | |||
39 | #else | ||
40 | ODateBookAccessBackend* xmlBackend = new ODateBookAccessBackend_XML( "Converter", | ||
41 | QString::null ); | ||
42 | |||
43 | ODateBookAccessBackend* sqlBackend = new ODateBookAccessBackend_SQL( QString::null, | ||
44 | QString::null ); | ||
45 | // Put the created backends into frontends to access them | ||
46 | ODateBookAccess* xmlAccess = new ODateBookAccess ( xmlBackend ); | ||
47 | |||
48 | ODateBookAccess* sqlAccess = new ODateBookAccess ( sqlBackend ); | ||
49 | |||
50 | xmlAccess->load(); | ||
51 | |||
52 | #endif | ||
53 | |||
54 | QTime t; | ||
55 | t.start(); | ||
56 | |||
57 | // Clean the sql-database.. | ||
58 | sqlAccess->clear(); | ||
59 | |||
60 | #ifdef _ADDRESSBOOK_ACCESS | ||
61 | // Now trasmit every contact from the xml database to the sql-database | ||
62 | OContactAccess::List contactList = xmlAccess->allRecords(); | ||
63 | m_progressBar->setTotalSteps( contactList.count() ); | ||
64 | int count = 0; | ||
65 | if ( sqlAccess && xmlAccess ){ | ||
66 | OContactAccess::List::Iterator it; | ||
67 | for ( it = contactList.begin(); it != contactList.end(); ++it ){ | ||
68 | sqlAccess->add( *it ); | ||
69 | m_progressBar->setProgress( ++count ); | ||
70 | } | ||
71 | } | ||
72 | #else | ||
73 | // Now transmit every contact from the xml database to the sql-database | ||
74 | ODateBookAccess::List dateList = xmlAccess->allRecords(); | ||
75 | m_progressBar->setTotalSteps( dateList.count() ); | ||
76 | qWarning( "Number of elements to copy: %d", dateList.count() ); | ||
77 | |||
78 | int count = 0; | ||
79 | if ( sqlAccess && xmlAccess ){ | ||
80 | ODateBookAccess::List::Iterator it; | ||
81 | for ( it = dateList.begin(); it != dateList.end(); ++it ){ | ||
82 | sqlAccess->add( *it ); | ||
83 | m_progressBar->setProgress( ++count ); | ||
84 | } | ||
85 | } | ||
86 | |||
87 | #endif | ||
88 | // Delete the frontends. Backends will be deleted automatically, too ! | ||
89 | delete sqlAccess; | ||
90 | |||
91 | qWarning("Conversion is finished and needed %d ms !", t.elapsed()); | ||
92 | |||
93 | delete xmlAccess; | ||
94 | } | ||
95 | |||
96 | int main( int argc, char** argv ) { | ||
97 | |||
98 | QPEApplication a( argc, argv ); | ||
99 | |||
100 | Converter dlg; | ||
101 | |||
102 | a.showMainWidget( &dlg ); | ||
103 | // dlg. showMaximized ( ); | ||
104 | |||
105 | return a.exec(); | ||
106 | |||
107 | } | ||
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 @@ | |||
1 | #ifndef _CONVERTER_H_ | ||
2 | #define _CONVERTER_H_ | ||
3 | |||
4 | |||
5 | #include "converter_base.h" | ||
6 | |||
7 | |||
8 | class Converter: public converter_base { | ||
9 | public: | ||
10 | Converter(); | ||
11 | |||
12 | void start_conversion(); | ||
13 | private: | ||
14 | |||
15 | }; | ||
16 | |||
17 | |||
18 | #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 @@ | |||
1 | # TEMPLATE= app | ||
2 | CONFIG = qt warn_on debug | ||
3 | # CONFIG = qt warn_on release | ||
4 | #HEADERS = | ||
5 | SOURCES = converter.cpp | ||
6 | INTERFACES = converter_base.ui | ||
7 | INCLUDEPATH+= $(OPIEDIR)/include | ||
8 | DEPENDPATH+= $(OPIEDIR)/include | ||
9 | LIBS += -lqpe -lopie | ||
10 | TARGET = converter | ||
11 | |||
12 | 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 @@ | |||
1 | <!DOCTYPE UI><UI> | ||
2 | <class>converter_base</class> | ||
3 | <widget> | ||
4 | <class>QDialog</class> | ||
5 | <property stdset="1"> | ||
6 | <name>name</name> | ||
7 | <cstring>converter_base</cstring> | ||
8 | </property> | ||
9 | <property stdset="1"> | ||
10 | <name>geometry</name> | ||
11 | <rect> | ||
12 | <x>0</x> | ||
13 | <y>0</y> | ||
14 | <width>273</width> | ||
15 | <height>324</height> | ||
16 | </rect> | ||
17 | </property> | ||
18 | <property stdset="1"> | ||
19 | <name>caption</name> | ||
20 | <string>PIM-Database Converter</string> | ||
21 | </property> | ||
22 | <property> | ||
23 | <name>layoutMargin</name> | ||
24 | </property> | ||
25 | <grid> | ||
26 | <property stdset="1"> | ||
27 | <name>margin</name> | ||
28 | <number>4</number> | ||
29 | </property> | ||
30 | <property stdset="1"> | ||
31 | <name>spacing</name> | ||
32 | <number>6</number> | ||
33 | </property> | ||
34 | <widget row="0" column="0" > | ||
35 | <class>QGroupBox</class> | ||
36 | <property stdset="1"> | ||
37 | <name>name</name> | ||
38 | <cstring>GroupBox6</cstring> | ||
39 | </property> | ||
40 | <property stdset="1"> | ||
41 | <name>title</name> | ||
42 | <string>Converter</string> | ||
43 | </property> | ||
44 | <property> | ||
45 | <name>layoutMargin</name> | ||
46 | </property> | ||
47 | <property> | ||
48 | <name>layoutSpacing</name> | ||
49 | </property> | ||
50 | <vbox> | ||
51 | <property stdset="1"> | ||
52 | <name>margin</name> | ||
53 | <number>4</number> | ||
54 | </property> | ||
55 | <property stdset="1"> | ||
56 | <name>spacing</name> | ||
57 | <number>4</number> | ||
58 | </property> | ||
59 | <widget> | ||
60 | <class>QGroupBox</class> | ||
61 | <property stdset="1"> | ||
62 | <name>name</name> | ||
63 | <cstring>GroupBox1</cstring> | ||
64 | </property> | ||
65 | <property stdset="1"> | ||
66 | <name>title</name> | ||
67 | <string>Select Database:</string> | ||
68 | </property> | ||
69 | <grid> | ||
70 | <property stdset="1"> | ||
71 | <name>margin</name> | ||
72 | <number>11</number> | ||
73 | </property> | ||
74 | <property stdset="1"> | ||
75 | <name>spacing</name> | ||
76 | <number>6</number> | ||
77 | </property> | ||
78 | <widget row="0" column="1" > | ||
79 | <class>QComboBox</class> | ||
80 | <item> | ||
81 | <property> | ||
82 | <name>text</name> | ||
83 | <string>Addressbook</string> | ||
84 | </property> | ||
85 | </item> | ||
86 | <item> | ||
87 | <property> | ||
88 | <name>text</name> | ||
89 | <string>TodoList</string> | ||
90 | </property> | ||
91 | </item> | ||
92 | <property stdset="1"> | ||
93 | <name>name</name> | ||
94 | <cstring>ComboBox1</cstring> | ||
95 | </property> | ||
96 | </widget> | ||
97 | </grid> | ||
98 | </widget> | ||
99 | <widget> | ||
100 | <class>QGroupBox</class> | ||
101 | <property stdset="1"> | ||
102 | <name>name</name> | ||
103 | <cstring>GroupBox2</cstring> | ||
104 | </property> | ||
105 | <property stdset="1"> | ||
106 | <name>title</name> | ||
107 | <string>Source/Destination:</string> | ||
108 | </property> | ||
109 | <grid> | ||
110 | <property stdset="1"> | ||
111 | <name>margin</name> | ||
112 | <number>11</number> | ||
113 | </property> | ||
114 | <property stdset="1"> | ||
115 | <name>spacing</name> | ||
116 | <number>6</number> | ||
117 | </property> | ||
118 | <widget row="1" column="0" > | ||
119 | <class>QLabel</class> | ||
120 | <property stdset="1"> | ||
121 | <name>name</name> | ||
122 | <cstring>TextLabel3_2</cstring> | ||
123 | </property> | ||
124 | <property stdset="1"> | ||
125 | <name>text</name> | ||
126 | <string>to</string> | ||
127 | </property> | ||
128 | </widget> | ||
129 | <widget row="1" column="1" > | ||
130 | <class>QComboBox</class> | ||
131 | <item> | ||
132 | <property> | ||
133 | <name>text</name> | ||
134 | <string>Select</string> | ||
135 | </property> | ||
136 | </item> | ||
137 | <item> | ||
138 | <property> | ||
139 | <name>text</name> | ||
140 | <string>XML</string> | ||
141 | </property> | ||
142 | </item> | ||
143 | <item> | ||
144 | <property> | ||
145 | <name>text</name> | ||
146 | <string>SQL (SQLite)</string> | ||
147 | </property> | ||
148 | </item> | ||
149 | <property stdset="1"> | ||
150 | <name>name</name> | ||
151 | <cstring>ComboBox2_3</cstring> | ||
152 | </property> | ||
153 | </widget> | ||
154 | <widget row="0" column="0" > | ||
155 | <class>QLabel</class> | ||
156 | <property stdset="1"> | ||
157 | <name>name</name> | ||
158 | <cstring>TextLabel2_2</cstring> | ||
159 | </property> | ||
160 | <property stdset="1"> | ||
161 | <name>text</name> | ||
162 | <string>Convert from</string> | ||
163 | </property> | ||
164 | </widget> | ||
165 | <widget row="0" column="1" > | ||
166 | <class>QComboBox</class> | ||
167 | <item> | ||
168 | <property> | ||
169 | <name>text</name> | ||
170 | <string>XML</string> | ||
171 | </property> | ||
172 | </item> | ||
173 | <item> | ||
174 | <property> | ||
175 | <name>text</name> | ||
176 | <string>SQL (SQLite)</string> | ||
177 | </property> | ||
178 | </item> | ||
179 | <property stdset="1"> | ||
180 | <name>name</name> | ||
181 | <cstring>ComboBox2_2_2</cstring> | ||
182 | </property> | ||
183 | </widget> | ||
184 | </grid> | ||
185 | </widget> | ||
186 | <widget> | ||
187 | <class>QGroupBox</class> | ||
188 | <property stdset="1"> | ||
189 | <name>name</name> | ||
190 | <cstring>GroupBox4</cstring> | ||
191 | </property> | ||
192 | <property stdset="1"> | ||
193 | <name>title</name> | ||
194 | <string>Progress:</string> | ||
195 | </property> | ||
196 | <grid> | ||
197 | <property stdset="1"> | ||
198 | <name>margin</name> | ||
199 | <number>11</number> | ||
200 | </property> | ||
201 | <property stdset="1"> | ||
202 | <name>spacing</name> | ||
203 | <number>6</number> | ||
204 | </property> | ||
205 | <widget row="0" column="0" > | ||
206 | <class>QProgressBar</class> | ||
207 | <property stdset="1"> | ||
208 | <name>name</name> | ||
209 | <cstring>m_progressBar</cstring> | ||
210 | </property> | ||
211 | </widget> | ||
212 | </grid> | ||
213 | </widget> | ||
214 | <widget> | ||
215 | <class>QPushButton</class> | ||
216 | <property stdset="1"> | ||
217 | <name>name</name> | ||
218 | <cstring>PushButton1</cstring> | ||
219 | </property> | ||
220 | <property stdset="1"> | ||
221 | <name>text</name> | ||
222 | <string>Go!</string> | ||
223 | </property> | ||
224 | </widget> | ||
225 | </vbox> | ||
226 | </widget> | ||
227 | </grid> | ||
228 | </widget> | ||
229 | <connections> | ||
230 | <connection> | ||
231 | <sender>PushButton1</sender> | ||
232 | <signal>clicked()</signal> | ||
233 | <receiver>converter_base</receiver> | ||
234 | <slot>start_conversion()</slot> | ||
235 | </connection> | ||
236 | <slot access="public">start_conversion()</slot> | ||
237 | </connections> | ||
238 | </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 @@ | |||
1 | #include <qdatetime.h> | ||
2 | |||
3 | #include "../oevent.h" | ||
4 | #include "../odatebookaccess.h" | ||
5 | |||
6 | int main(int argc, char* argv ) { | ||
7 | ODateBookAccess acc; | ||
8 | if(!acc.load() ) qWarning("could not load"); | ||
9 | |||
10 | ODateBookAccess::List::Iterator it; | ||
11 | ODateBookAccess::List list = acc.allRecords(); | ||
12 | |||
13 | for( it = list.begin(); it != list.end(); ++it ){ | ||
14 | OEvent ev = (*it); | ||
15 | qWarning("Summary: %s",ev.description().latin1() ); | ||
16 | qWarning("Start: %s End: %s",ev.startDateTime().toString().latin1(), ev.endDateTime().toString().latin1() ); | ||
17 | qWarning("All Day: %d Recurrence: %d",ev.isAllDay(), ev.hasRecurrence() ); | ||
18 | qWarning("UID %d", ev.uid() ); | ||
19 | |||
20 | } | ||
21 | QDate date1(2003,02,01 ); | ||
22 | QDate date2(2003,03,01 ); | ||
23 | |||
24 | OEffectiveEvent::ValueList effList = acc.effectiveEvents( date1,date2 ); | ||
25 | OEffectiveEvent::ValueList::Iterator effIt; | ||
26 | |||
27 | for( effIt = effList.begin(); effIt != effList.end(); ++effIt ){ | ||
28 | OEffectiveEvent ef = (*effIt); | ||
29 | qWarning("Summary: %s", ef.description().latin1() ); | ||
30 | qWarning("Date: %s", ef.date().toString().latin1() ); | ||
31 | } | ||
32 | acc.save(); | ||
33 | |||
34 | return 0; | ||
35 | } | ||
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 @@ | |||
1 | TEMPLATE= app | ||
2 | #CONFIG = qt warn_on debug | ||
3 | CONFIG = qt warn_on release | ||
4 | #HEADERS = | ||
5 | SOURCES = oevent_test.cpp | ||
6 | INCLUDEPATH+= $(OPIEDIR)/include | ||
7 | DEPENDPATH+= $(OPIEDIR)/include | ||
8 | LIBS += -lqpe -lopie | ||
9 | TARGET = oevent_test | ||
10 | |||
11 | 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 @@ | |||
1 | #include <qdatetime.h> | ||
2 | #include <qmap.h> | ||
3 | |||
4 | #include <opie/otodo.h> | ||
5 | #include <opie/otodoaccess.h> | ||
6 | #include <opie/otodoaccessxml.h> | ||
7 | |||
8 | int main(int argc, char* argv[] ) { | ||
9 | |||
10 | OTodoAccessXML* xml = new OTodoAccessXML("demo"); | ||
11 | OTodoAccess ac(xml); | ||
12 | int elc; | ||
13 | QTime timer; | ||
14 | qWarning("start loading"); | ||
15 | timer.start(); | ||
16 | ac.load(); | ||
17 | elc = timer.elapsed(); | ||
18 | qWarning("Elapsed loading %d %d", elc, elc/1000); | ||
19 | |||
20 | timer.start(); | ||
21 | OTodoAccess::List lis = ac.allRecords(); | ||
22 | elc = timer.elapsed(); | ||
23 | qWarning("Elapsed allRecords %d %d", elc, elc/1000 ); | ||
24 | OTodoAccess::List::Iterator it; | ||
25 | timer.start(); | ||
26 | ac.save(); | ||
27 | /* | ||
28 | for( it = lis.begin(); it != lis.end(); ++it ) { | ||
29 | qWarning("Desc: " + (*it).summary() ); | ||
30 | qWarning("UID %d", (*it).uid() ); | ||
31 | } | ||
32 | */ | ||
33 | elc = timer.elapsed(); | ||
34 | |||
35 | qWarning("elapsed iterating %d %d", elc, elc/1000 ); | ||
36 | }; | ||
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 @@ | |||
1 | TEMPLATE= app | ||
2 | #CONFIG = qt warn_on debug | ||
3 | CONFIG = qt warn_on release | ||
4 | #HEADERS = | ||
5 | SOURCES = test_todo.cpp | ||
6 | INCLUDEPATH+= $(OPIEDIR)/include | ||
7 | DEPENDPATH+= $(OPIEDIR)/include | ||
8 | LIBS += -lqpe -lopie -lopiesql | ||
9 | TARGET = todo_test | ||
10 | |||
11 | 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 @@ | |||
1 | menu "Pim" | ||
2 | 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,114 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | * Class to manage Backends. | 2 | * Class to manage Backends. |
3 | * | 3 | * |
4 | * Copyright (c) 2002 by Stefan Eilers (Eilers.Stefan@epost.de) | 4 | * Copyright (c) 2002 by Stefan Eilers (Eilers.Stefan@epost.de) |
5 | * | 5 | * |
6 | * ===================================================================== | 6 | * ===================================================================== |
7 | *This program is free software; you can redistribute it and/or | 7 | *This program is free software; you can redistribute it and/or |
8 | *modify it under the terms of the GNU Library General Public | 8 | *modify it under the terms of the GNU Library General Public |
9 | * License as published by the Free Software Foundation; | 9 | * License as published by the Free Software Foundation; |
10 | * either version 2 of the License, or (at your option) any later | 10 | * either version 2 of the License, or (at your option) any later |
11 | * version. | 11 | * version. |
12 | * ===================================================================== | 12 | * ===================================================================== |
13 | * ToDo: Use plugins | 13 | * ToDo: Use plugins |
14 | * ===================================================================== | 14 | * ===================================================================== |
15 | * Version: $Id$ | 15 | * Version: $Id$ |
16 | * ===================================================================== | 16 | * ===================================================================== |
17 | * History: | 17 | * History: |
18 | * $Log$ | 18 | * $Log$ |
19 | * Revision 1.1 2004/11/16 21:46:07 mickeyl | ||
20 | * libopie1 goes into unsupported | ||
21 | * | ||
19 | * Revision 1.9 2003/12/22 10:19:26 eilers | 22 | * Revision 1.9 2003/12/22 10:19:26 eilers |
20 | * Finishing implementation of sql-backend for datebook. But I have to | 23 | * Finishing implementation of sql-backend for datebook. But I have to |
21 | * port the PIM datebook application to use it, before I could debug the | 24 | * port the PIM datebook application to use it, before I could debug the |
22 | * whole stuff. | 25 | * whole stuff. |
23 | * Thus, PIM-Database backend is finished, but highly experimental. And some | 26 | * Thus, PIM-Database backend is finished, but highly experimental. And some |
24 | * parts are still generic. For instance, the "queryByExample()" methods are | 27 | * parts are still generic. For instance, the "queryByExample()" methods are |
25 | * not (or not fully) implemented. Todo: custom-entries not stored. | 28 | * not (or not fully) implemented. Todo: custom-entries not stored. |
26 | * The big show stopper: matchRegExp() (needed by OpieSearch) needs regular | 29 | * The big show stopper: matchRegExp() (needed by OpieSearch) needs regular |
27 | * expression search in the database, which is not supported by sqlite ! | 30 | * expression search in the database, which is not supported by sqlite ! |
28 | * Therefore we need either an extended sqlite or a workaround which would | 31 | * Therefore we need either an extended sqlite or a workaround which would |
29 | * be very slow and memory consuming.. | 32 | * be very slow and memory consuming.. |
30 | * | 33 | * |
31 | * Revision 1.8 2003/09/22 14:31:16 eilers | 34 | * Revision 1.8 2003/09/22 14:31:16 eilers |
32 | * Added first experimental incarnation of sql-backend for addressbook. | 35 | * Added first experimental incarnation of sql-backend for addressbook. |
33 | * Some modifications to be able to compile the todo sql-backend. | 36 | * Some modifications to be able to compile the todo sql-backend. |
34 | * A lot of changes fill follow... | 37 | * A lot of changes fill follow... |
35 | * | 38 | * |
36 | * Revision 1.7 2003/08/01 12:30:16 eilers | 39 | * Revision 1.7 2003/08/01 12:30:16 eilers |
37 | * Merging changes from BRANCH_1_0 to HEAD | 40 | * Merging changes from BRANCH_1_0 to HEAD |
38 | * | 41 | * |
39 | * Revision 1.6.4.1 2003/06/30 14:34:19 eilers | 42 | * Revision 1.6.4.1 2003/06/30 14:34:19 eilers |
40 | * Patches from Zecke: | 43 | * Patches from Zecke: |
41 | * Fixing and cleaning up extraMap handling | 44 | * Fixing and cleaning up extraMap handling |
42 | * Adding d_ptr for binary compatibility in the future | 45 | * Adding d_ptr for binary compatibility in the future |
43 | * | 46 | * |
44 | * Revision 1.6 2003/04/13 18:07:10 zecke | 47 | * Revision 1.6 2003/04/13 18:07:10 zecke |
45 | * More API doc | 48 | * More API doc |
46 | * QString -> const QString& | 49 | * QString -> const QString& |
47 | * QString = 0l -> QString::null | 50 | * QString = 0l -> QString::null |
48 | * | 51 | * |
49 | * Revision 1.5 2003/02/21 23:31:52 zecke | 52 | * Revision 1.5 2003/02/21 23:31:52 zecke |
50 | * Add XML datebookresource | 53 | * Add XML datebookresource |
51 | * -clean up todoaccessxml header | 54 | * -clean up todoaccessxml header |
52 | * -implement some more stuff in the oeven tester | 55 | * -implement some more stuff in the oeven tester |
53 | * -extend DefaultFactory to not crash and to use datebook | 56 | * -extend DefaultFactory to not crash and to use datebook |
54 | * | 57 | * |
55 | * -reading of OEvents is working nicely.. saving will be added | 58 | * -reading of OEvents is working nicely.. saving will be added |
56 | * tomorrow | 59 | * tomorrow |
57 | * -fix spelling in ODateBookAcces | 60 | * -fix spelling in ODateBookAcces |
58 | * | 61 | * |
59 | * Revision 1.4 2002/10/14 15:55:18 eilers | 62 | * Revision 1.4 2002/10/14 15:55:18 eilers |
60 | * Redeactivate SQL.. ;) | 63 | * Redeactivate SQL.. ;) |
61 | * | 64 | * |
62 | * Revision 1.3 2002/10/10 17:08:58 zecke | 65 | * Revision 1.3 2002/10/10 17:08:58 zecke |
63 | * The Cache is finally in place | 66 | * The Cache is finally in place |
64 | * I tested it with my todolist and it 'works' for 10.000 todos the hits are awesome ;) | 67 | * I tested it with my todolist and it 'works' for 10.000 todos the hits are awesome ;) |
65 | * 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.... | 68 | * 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.... |
66 | * I still have to fully implement read ahead | 69 | * I still have to fully implement read ahead |
67 | * This change is bic but sc | 70 | * This change is bic but sc |
68 | * | 71 | * |
69 | * Revision 1.2 2002/10/08 09:27:36 eilers | 72 | * Revision 1.2 2002/10/08 09:27:36 eilers |
70 | * Fixed libopie.pro to include the new pim-API. | 73 | * Fixed libopie.pro to include the new pim-API. |
71 | * The SQL-Stuff is currently deactivated. Otherwise everyone who wants to | 74 | * The SQL-Stuff is currently deactivated. Otherwise everyone who wants to |
72 | * compile itself would need to install libsqlite, libopiesql... | 75 | * compile itself would need to install libsqlite, libopiesql... |
73 | * Therefore, the backend currently uses XML only.. | 76 | * Therefore, the backend currently uses XML only.. |
74 | * | 77 | * |
75 | * Revision 1.1 2002/10/07 17:35:01 eilers | 78 | * Revision 1.1 2002/10/07 17:35:01 eilers |
76 | * added OBackendFactory for advanced backend access | 79 | * added OBackendFactory for advanced backend access |
77 | * | 80 | * |
78 | * | 81 | * |
79 | * ===================================================================== | 82 | * ===================================================================== |
80 | */ | 83 | */ |
81 | #ifndef OPIE_BACKENDFACTORY_H_ | 84 | #ifndef OPIE_BACKENDFACTORY_H_ |
82 | #define OPIE_BACKENDFACTORY_H_ | 85 | #define OPIE_BACKENDFACTORY_H_ |
83 | 86 | ||
84 | #include <qstring.h> | 87 | #include <qstring.h> |
85 | #include <qasciidict.h> | 88 | #include <qasciidict.h> |
86 | #include <qpe/config.h> | 89 | #include <qpe/config.h> |
87 | 90 | ||
88 | #include "otodoaccessxml.h" | 91 | #include "otodoaccessxml.h" |
89 | #include "ocontactaccessbackend_xml.h" | 92 | #include "ocontactaccessbackend_xml.h" |
90 | #include "odatebookaccessbackend_xml.h" | 93 | #include "odatebookaccessbackend_xml.h" |
91 | 94 | ||
92 | #ifdef __USE_SQL | 95 | #ifdef __USE_SQL |
93 | #include "otodoaccesssql.h" | 96 | #include "otodoaccesssql.h" |
94 | #include "ocontactaccessbackend_sql.h" | 97 | #include "ocontactaccessbackend_sql.h" |
95 | #include "odatebookaccessbackend_sql.h" | 98 | #include "odatebookaccessbackend_sql.h" |
96 | #endif | 99 | #endif |
97 | 100 | ||
98 | class OBackendPrivate; | 101 | class OBackendPrivate; |
99 | 102 | ||
100 | /** | 103 | /** |
101 | * This class is our factory. It will give us the default implementations | 104 | * This class is our factory. It will give us the default implementations |
102 | * of at least Todolist, Contacts and Datebook. In the future this class will | 105 | * of at least Todolist, Contacts and Datebook. In the future this class will |
103 | * allow users to switch the backend with ( XML->SQLite ) without the need | 106 | * allow users to switch the backend with ( XML->SQLite ) without the need |
104 | * to recompile.# | 107 | * to recompile.# |
105 | * This class as the whole PIM Api is making use of templates | 108 | * This class as the whole PIM Api is making use of templates |
106 | * | 109 | * |
107 | * <pre> | 110 | * <pre> |
108 | * OTodoAccessBackend* backend = OBackEndFactory<OTodoAccessBackend>::Default("todo", QString::null ); | 111 | * OTodoAccessBackend* backend = OBackEndFactory<OTodoAccessBackend>::Default("todo", QString::null ); |
109 | * backend->load(); | 112 | * backend->load(); |
110 | * </pre> | 113 | * </pre> |
111 | * | 114 | * |
112 | * @author Stefan Eilers | 115 | * @author Stefan Eilers |
113 | * @version 0.1 | 116 | * @version 0.1 |
114 | */ | 117 | */ |
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,119 +1,122 @@ | |||
1 | /* | 1 | /* |
2 | * Class to manage the Contacts. | 2 | * Class to manage the Contacts. |
3 | * | 3 | * |
4 | * Copyright (c) 2002 by Stefan Eilers (Eilers.Stefan@epost.de) | 4 | * Copyright (c) 2002 by Stefan Eilers (Eilers.Stefan@epost.de) |
5 | * | 5 | * |
6 | * ===================================================================== | 6 | * ===================================================================== |
7 | *This program is free software; you can redistribute it and/or | 7 | *This program is free software; you can redistribute it and/or |
8 | *modify it under the terms of the GNU Library General Public | 8 | *modify it under the terms of the GNU Library General Public |
9 | * License as published by the Free Software Foundation; either | 9 | * License as published by the Free Software Foundation; either |
10 | * version 2 of the License, or (at your option) any later version. | 10 | * version 2 of the License, or (at your option) any later version. |
11 | * ===================================================================== | 11 | * ===================================================================== |
12 | * Info: This class could just work with a change in the header-file | 12 | * Info: This class could just work with a change in the header-file |
13 | * of the Contact class ! Therefore our libopie only compiles | 13 | * of the Contact class ! Therefore our libopie only compiles |
14 | * with our version of libqpe | 14 | * with our version of libqpe |
15 | * ===================================================================== | 15 | * ===================================================================== |
16 | * ToDo: XML-Backend: Automatic reload if something was changed... | 16 | * ToDo: XML-Backend: Automatic reload if something was changed... |
17 | * | 17 | * |
18 | * | 18 | * |
19 | * ===================================================================== | 19 | * ===================================================================== |
20 | * Version: $Id$ | 20 | * Version: $Id$ |
21 | * ===================================================================== | 21 | * ===================================================================== |
22 | * History: | 22 | * History: |
23 | * $Log$ | 23 | * $Log$ |
24 | * Revision 1.1 2004/11/16 21:46:07 mickeyl | ||
25 | * libopie1 goes into unsupported | ||
26 | * | ||
24 | * Revision 1.9 2004/03/02 12:14:22 alwin | 27 | * Revision 1.9 2004/03/02 12:14:22 alwin |
25 | * run the optimize_connect script | 28 | * run the optimize_connect script |
26 | * the whole cvs is tagged with "before_optimize_connect" if there are problems you | 29 | * the whole cvs is tagged with "before_optimize_connect" if there are problems you |
27 | * can check the diff (but it had compiled and run here) | 30 | * can check the diff (but it had compiled and run here) |
28 | * | 31 | * |
29 | * Revision 1.8 2003/05/08 13:55:09 tille | 32 | * Revision 1.8 2003/05/08 13:55:09 tille |
30 | * search stuff | 33 | * search stuff |
31 | * and match, toRichText & toShortText in oevent | 34 | * and match, toRichText & toShortText in oevent |
32 | * | 35 | * |
33 | * Revision 1.7 2002/11/13 14:14:51 eilers | 36 | * Revision 1.7 2002/11/13 14:14:51 eilers |
34 | * Added sorted for Contacts.. | 37 | * Added sorted for Contacts.. |
35 | * | 38 | * |
36 | * Revision 1.6 2002/11/01 15:10:42 eilers | 39 | * Revision 1.6 2002/11/01 15:10:42 eilers |
37 | * Added regExp-search in database for all fields in a contact. | 40 | * Added regExp-search in database for all fields in a contact. |
38 | * | 41 | * |
39 | * Revision 1.5 2002/10/16 10:52:40 eilers | 42 | * Revision 1.5 2002/10/16 10:52:40 eilers |
40 | * Added some docu to the interface and now using the cache infrastucture by zecke.. :) | 43 | * Added some docu to the interface and now using the cache infrastucture by zecke.. :) |
41 | * | 44 | * |
42 | * Revision 1.4 2002/10/14 16:21:54 eilers | 45 | * Revision 1.4 2002/10/14 16:21:54 eilers |
43 | * Some minor interface updates | 46 | * Some minor interface updates |
44 | * | 47 | * |
45 | * Revision 1.3 2002/10/07 17:34:24 eilers | 48 | * Revision 1.3 2002/10/07 17:34:24 eilers |
46 | * added OBackendFactory for advanced backend access | 49 | * added OBackendFactory for advanced backend access |
47 | * | 50 | * |
48 | * Revision 1.2 2002/10/02 16:18:11 eilers | 51 | * Revision 1.2 2002/10/02 16:18:11 eilers |
49 | * debugged and seems to work almost perfectly .. | 52 | * debugged and seems to work almost perfectly .. |
50 | * | 53 | * |
51 | * Revision 1.1 2002/09/27 17:11:44 eilers | 54 | * Revision 1.1 2002/09/27 17:11:44 eilers |
52 | * Added API for accessing the Contact-Database ! It is compiling, but | 55 | * Added API for accessing the Contact-Database ! It is compiling, but |
53 | * please do not expect that anything is working ! | 56 | * please do not expect that anything is working ! |
54 | * I will debug that stuff in the next time .. | 57 | * I will debug that stuff in the next time .. |
55 | * Please read README_COMPILE for compiling ! | 58 | * Please read README_COMPILE for compiling ! |
56 | * | 59 | * |
57 | * | 60 | * |
58 | */ | 61 | */ |
59 | 62 | ||
60 | #include "ocontactaccess.h" | 63 | #include "ocontactaccess.h" |
61 | #include "obackendfactory.h" | 64 | #include "obackendfactory.h" |
62 | 65 | ||
63 | #include <qasciidict.h> | 66 | #include <qasciidict.h> |
64 | #include <qdatetime.h> | 67 | #include <qdatetime.h> |
65 | #include <qfile.h> | 68 | #include <qfile.h> |
66 | #include <qregexp.h> | 69 | #include <qregexp.h> |
67 | #include <qlist.h> | 70 | #include <qlist.h> |
68 | #include <qcopchannel_qws.h> | 71 | #include <qcopchannel_qws.h> |
69 | 72 | ||
70 | //#include <qpe/qcopenvelope_qws.h> | 73 | //#include <qpe/qcopenvelope_qws.h> |
71 | #include <qpe/global.h> | 74 | #include <qpe/global.h> |
72 | 75 | ||
73 | #include <errno.h> | 76 | #include <errno.h> |
74 | #include <fcntl.h> | 77 | #include <fcntl.h> |
75 | #include <unistd.h> | 78 | #include <unistd.h> |
76 | #include <stdlib.h> | 79 | #include <stdlib.h> |
77 | 80 | ||
78 | #include "ocontactaccessbackend_xml.h" | 81 | #include "ocontactaccessbackend_xml.h" |
79 | 82 | ||
80 | 83 | ||
81 | OContactAccess::OContactAccess ( const QString appname, const QString , | 84 | OContactAccess::OContactAccess ( const QString appname, const QString , |
82 | OContactAccessBackend* end, bool autosync ): | 85 | OContactAccessBackend* end, bool autosync ): |
83 | OPimAccessTemplate<OContact>( end ) | 86 | OPimAccessTemplate<OContact>( end ) |
84 | { | 87 | { |
85 | /* take care of the backend. If there is no one defined, we | 88 | /* take care of the backend. If there is no one defined, we |
86 | * will use the XML-Backend as default (until we have a cute SQL-Backend..). | 89 | * will use the XML-Backend as default (until we have a cute SQL-Backend..). |
87 | */ | 90 | */ |
88 | if( end == 0 ) { | 91 | if( end == 0 ) { |
89 | qWarning ("Using BackendFactory !"); | 92 | qWarning ("Using BackendFactory !"); |
90 | end = OBackendFactory<OContactAccessBackend>::Default( "contact", appname ); | 93 | end = OBackendFactory<OContactAccessBackend>::Default( "contact", appname ); |
91 | } | 94 | } |
92 | // Set backend locally and in template | 95 | // Set backend locally and in template |
93 | m_backEnd = end; | 96 | m_backEnd = end; |
94 | OPimAccessTemplate<OContact>::setBackEnd (end); | 97 | OPimAccessTemplate<OContact>::setBackEnd (end); |
95 | 98 | ||
96 | 99 | ||
97 | /* Connect signal of external db change to function */ | 100 | /* Connect signal of external db change to function */ |
98 | QCopChannel *dbchannel = new QCopChannel( "QPE/PIM", this ); | 101 | QCopChannel *dbchannel = new QCopChannel( "QPE/PIM", this ); |
99 | connect( dbchannel, SIGNAL(received(const QCString&,const QByteArray&)), | 102 | connect( dbchannel, SIGNAL(received(const QCString&,const QByteArray&)), |
100 | this, SLOT(copMessage(const QCString&,const QByteArray&)) ); | 103 | this, SLOT(copMessage(const QCString&,const QByteArray&)) ); |
101 | if ( autosync ){ | 104 | if ( autosync ){ |
102 | QCopChannel *syncchannel = new QCopChannel( "QPE/Sync", this ); | 105 | QCopChannel *syncchannel = new QCopChannel( "QPE/Sync", this ); |
103 | connect( syncchannel, SIGNAL(received(const QCString&,const QByteArray&)), | 106 | connect( syncchannel, SIGNAL(received(const QCString&,const QByteArray&)), |
104 | this, SLOT(copMessage(const QCString&,const QByteArray&)) ); | 107 | this, SLOT(copMessage(const QCString&,const QByteArray&)) ); |
105 | } | 108 | } |
106 | 109 | ||
107 | 110 | ||
108 | } | 111 | } |
109 | OContactAccess::~OContactAccess () | 112 | OContactAccess::~OContactAccess () |
110 | { | 113 | { |
111 | /* The user may forget to save the changed database, therefore try to | 114 | /* The user may forget to save the changed database, therefore try to |
112 | * do it for him.. | 115 | * do it for him.. |
113 | */ | 116 | */ |
114 | save(); | 117 | save(); |
115 | // delete m_backEnd; is done by template.. | 118 | // delete m_backEnd; is done by template.. |
116 | } | 119 | } |
117 | 120 | ||
118 | 121 | ||
119 | bool OContactAccess::save () | 122 | bool OContactAccess::save () |
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,115 +1,118 @@ | |||
1 | /* | 1 | /* |
2 | * Class to manage the Contacts. | 2 | * Class to manage the Contacts. |
3 | * | 3 | * |
4 | * Copyright (c) 2002 by Stefan Eilers (Eilers.Stefan@epost.de) | 4 | * Copyright (c) 2002 by Stefan Eilers (Eilers.Stefan@epost.de) |
5 | * Copyright (c) 2002 by Holger Freyther (zecke@handhelds.org) | 5 | * Copyright (c) 2002 by Holger Freyther (zecke@handhelds.org) |
6 | * | 6 | * |
7 | * ===================================================================== | 7 | * ===================================================================== |
8 | *This program is free software; you can redistribute it and/or | 8 | *This program is free software; you can redistribute it and/or |
9 | *modify it under the terms of the GNU Library General Public | 9 | *modify it under the terms of the GNU Library General Public |
10 | * License as published by the Free Software Foundation; | 10 | * License as published by the Free Software Foundation; |
11 | * either version 2 of the License, or (at your option) any later | 11 | * either version 2 of the License, or (at your option) any later |
12 | * version. | 12 | * version. |
13 | * ===================================================================== | 13 | * ===================================================================== |
14 | * ToDo: Define enum for query settings | 14 | * ToDo: Define enum for query settings |
15 | * ===================================================================== | 15 | * ===================================================================== |
16 | * Version: $Id$ | 16 | * Version: $Id$ |
17 | * ===================================================================== | 17 | * ===================================================================== |
18 | * History: | 18 | * History: |
19 | * $Log$ | 19 | * $Log$ |
20 | * Revision 1.1 2004/11/16 21:46:07 mickeyl | ||
21 | * libopie1 goes into unsupported | ||
22 | * | ||
20 | * Revision 1.10 2003/12/22 10:19:26 eilers | 23 | * Revision 1.10 2003/12/22 10:19:26 eilers |
21 | * Finishing implementation of sql-backend for datebook. But I have to | 24 | * Finishing implementation of sql-backend for datebook. But I have to |
22 | * port the PIM datebook application to use it, before I could debug the | 25 | * port the PIM datebook application to use it, before I could debug the |
23 | * whole stuff. | 26 | * whole stuff. |
24 | * Thus, PIM-Database backend is finished, but highly experimental. And some | 27 | * Thus, PIM-Database backend is finished, but highly experimental. And some |
25 | * parts are still generic. For instance, the "queryByExample()" methods are | 28 | * parts are still generic. For instance, the "queryByExample()" methods are |
26 | * not (or not fully) implemented. Todo: custom-entries not stored. | 29 | * not (or not fully) implemented. Todo: custom-entries not stored. |
27 | * The big show stopper: matchRegExp() (needed by OpieSearch) needs regular | 30 | * The big show stopper: matchRegExp() (needed by OpieSearch) needs regular |
28 | * expression search in the database, which is not supported by sqlite ! | 31 | * expression search in the database, which is not supported by sqlite ! |
29 | * Therefore we need either an extended sqlite or a workaround which would | 32 | * Therefore we need either an extended sqlite or a workaround which would |
30 | * be very slow and memory consuming.. | 33 | * be very slow and memory consuming.. |
31 | * | 34 | * |
32 | * Revision 1.9 2003/08/01 12:30:16 eilers | 35 | * Revision 1.9 2003/08/01 12:30:16 eilers |
33 | * Merging changes from BRANCH_1_0 to HEAD | 36 | * Merging changes from BRANCH_1_0 to HEAD |
34 | * | 37 | * |
35 | * Revision 1.8.2.1 2003/06/30 14:34:19 eilers | 38 | * Revision 1.8.2.1 2003/06/30 14:34:19 eilers |
36 | * Patches from Zecke: | 39 | * Patches from Zecke: |
37 | * Fixing and cleaning up extraMap handling | 40 | * Fixing and cleaning up extraMap handling |
38 | * Adding d_ptr for binary compatibility in the future | 41 | * Adding d_ptr for binary compatibility in the future |
39 | * | 42 | * |
40 | * Revision 1.8 2003/05/08 13:55:09 tille | 43 | * Revision 1.8 2003/05/08 13:55:09 tille |
41 | * search stuff | 44 | * search stuff |
42 | * and match, toRichText & toShortText in oevent | 45 | * and match, toRichText & toShortText in oevent |
43 | * | 46 | * |
44 | * Revision 1.7 2003/04/13 18:07:10 zecke | 47 | * Revision 1.7 2003/04/13 18:07:10 zecke |
45 | * More API doc | 48 | * More API doc |
46 | * QString -> const QString& | 49 | * QString -> const QString& |
47 | * QString = 0l -> QString::null | 50 | * QString = 0l -> QString::null |
48 | * | 51 | * |
49 | * Revision 1.6 2003/01/02 14:27:12 eilers | 52 | * Revision 1.6 2003/01/02 14:27:12 eilers |
50 | * Improved query by example: Search by date is possible.. First step | 53 | * Improved query by example: Search by date is possible.. First step |
51 | * for a today plugin for birthdays.. | 54 | * for a today plugin for birthdays.. |
52 | * | 55 | * |
53 | * Revision 1.5 2002/11/13 14:14:51 eilers | 56 | * Revision 1.5 2002/11/13 14:14:51 eilers |
54 | * Added sorted for Contacts.. | 57 | * Added sorted for Contacts.. |
55 | * | 58 | * |
56 | * Revision 1.4 2002/11/01 15:10:42 eilers | 59 | * Revision 1.4 2002/11/01 15:10:42 eilers |
57 | * Added regExp-search in database for all fields in a contact. | 60 | * Added regExp-search in database for all fields in a contact. |
58 | * | 61 | * |
59 | * Revision 1.3 2002/10/16 10:52:40 eilers | 62 | * Revision 1.3 2002/10/16 10:52:40 eilers |
60 | * Added some docu to the interface and now using the cache infrastucture by zecke.. :) | 63 | * Added some docu to the interface and now using the cache infrastucture by zecke.. :) |
61 | * | 64 | * |
62 | * Revision 1.2 2002/10/14 16:21:54 eilers | 65 | * Revision 1.2 2002/10/14 16:21:54 eilers |
63 | * Some minor interface updates | 66 | * Some minor interface updates |
64 | * | 67 | * |
65 | * Revision 1.1 2002/09/27 17:11:44 eilers | 68 | * Revision 1.1 2002/09/27 17:11:44 eilers |
66 | * Added API for accessing the Contact-Database ! It is compiling, but | 69 | * Added API for accessing the Contact-Database ! It is compiling, but |
67 | * please do not expect that anything is working ! | 70 | * please do not expect that anything is working ! |
68 | * I will debug that stuff in the next time .. | 71 | * I will debug that stuff in the next time .. |
69 | * Please read README_COMPILE for compiling ! | 72 | * Please read README_COMPILE for compiling ! |
70 | * | 73 | * |
71 | * ===================================================================== | 74 | * ===================================================================== |
72 | */ | 75 | */ |
73 | #ifndef _OCONTACTACCESS_H | 76 | #ifndef _OCONTACTACCESS_H |
74 | #define _OCONTACTACCESS_H | 77 | #define _OCONTACTACCESS_H |
75 | 78 | ||
76 | #include <qobject.h> | 79 | #include <qobject.h> |
77 | 80 | ||
78 | #include <qpe/qcopenvelope_qws.h> | 81 | #include <qpe/qcopenvelope_qws.h> |
79 | 82 | ||
80 | #include <qvaluelist.h> | 83 | #include <qvaluelist.h> |
81 | #include <qfileinfo.h> | 84 | #include <qfileinfo.h> |
82 | 85 | ||
83 | #include "ocontact.h" | 86 | #include "ocontact.h" |
84 | #include "ocontactaccessbackend.h" | 87 | #include "ocontactaccessbackend.h" |
85 | #include "opimaccesstemplate.h" | 88 | #include "opimaccesstemplate.h" |
86 | 89 | ||
87 | /** | 90 | /** |
88 | * Class to access the contacts database. | 91 | * Class to access the contacts database. |
89 | * This is just a frontend for the real database handling which is | 92 | * This is just a frontend for the real database handling which is |
90 | * done by the backend. | 93 | * done by the backend. |
91 | * This class is used to access the Contacts on a system. This class as any OPIE PIM | 94 | * This class is used to access the Contacts on a system. This class as any OPIE PIM |
92 | * class is backend independent. | 95 | * class is backend independent. |
93 | * @author Stefan Eilers, Holger Freyther | 96 | * @author Stefan Eilers, Holger Freyther |
94 | * @see OPimAccessTemplate | 97 | * @see OPimAccessTemplate |
95 | */ | 98 | */ |
96 | class OContactAccess: public QObject, public OPimAccessTemplate<OContact> | 99 | class OContactAccess: public QObject, public OPimAccessTemplate<OContact> |
97 | { | 100 | { |
98 | Q_OBJECT | 101 | Q_OBJECT |
99 | 102 | ||
100 | public: | 103 | public: |
101 | /** | 104 | /** |
102 | * Create Database with contacts (addressbook). | 105 | * Create Database with contacts (addressbook). |
103 | * @param appname Name of application which wants access to the database | 106 | * @param appname Name of application which wants access to the database |
104 | * (i.e. "todolist") | 107 | * (i.e. "todolist") |
105 | * @param filename The name of the database file. If not set, the default one | 108 | * @param filename The name of the database file. If not set, the default one |
106 | * is used. | 109 | * is used. |
107 | * @param backend Pointer to an alternative Backend. If not set, we will use | 110 | * @param backend Pointer to an alternative Backend. If not set, we will use |
108 | * the default backend. | 111 | * the default backend. |
109 | * @param handlesync If <b>true</b> the database stores the current state | 112 | * @param handlesync If <b>true</b> the database stores the current state |
110 | * automatically if it receives the signals <i>flush()</i> and <i>reload()</i> | 113 | * automatically if it receives the signals <i>flush()</i> and <i>reload()</i> |
111 | * which are used before and after synchronisation. If the application wants | 114 | * which are used before and after synchronisation. If the application wants |
112 | * to react itself, it should be disabled by setting it to <b>false</b> | 115 | * to react itself, it should be disabled by setting it to <b>false</b> |
113 | * @see OContactAccessBackend | 116 | * @see OContactAccessBackend |
114 | */ | 117 | */ |
115 | OContactAccess (const QString appname, const QString filename = 0l, | 118 | OContactAccess (const QString appname, const QString filename = 0l, |
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,117 +1,120 @@ | |||
1 | /** | 1 | /** |
2 | * The class responsible for managing a backend. | 2 | * The class responsible for managing a backend. |
3 | * The implementation of this abstract class contains | 3 | * The implementation of this abstract class contains |
4 | * the complete database handling. | 4 | * the complete database handling. |
5 | * | 5 | * |
6 | * Copyright (c) 2002 by Stefan Eilers (Eilers.Stefan@epost.de) | 6 | * Copyright (c) 2002 by Stefan Eilers (Eilers.Stefan@epost.de) |
7 | * Copyright (c) 2002 by Holger Freyther (zecke@handhelds.org) | 7 | * Copyright (c) 2002 by Holger Freyther (zecke@handhelds.org) |
8 | * | 8 | * |
9 | * ===================================================================== | 9 | * ===================================================================== |
10 | *This program is free software; you can redistribute it and/or | 10 | *This program is free software; you can redistribute it and/or |
11 | *modify it under the terms of the GNU Library General Public | 11 | *modify it under the terms of the GNU Library General Public |
12 | * License as published by the Free Software Foundation; | 12 | * License as published by the Free Software Foundation; |
13 | * either version 2 of the License, or (at your option) any later | 13 | * either version 2 of the License, or (at your option) any later |
14 | * version. | 14 | * version. |
15 | * ===================================================================== | 15 | * ===================================================================== |
16 | * ToDo: Define enum for query settings | 16 | * ToDo: Define enum for query settings |
17 | * ===================================================================== | 17 | * ===================================================================== |
18 | * Version: $Id$ | 18 | * Version: $Id$ |
19 | * ===================================================================== | 19 | * ===================================================================== |
20 | * History: | 20 | * History: |
21 | * $Log$ | 21 | * $Log$ |
22 | * Revision 1.1 2004/11/16 21:46:07 mickeyl | ||
23 | * libopie1 goes into unsupported | ||
24 | * | ||
22 | * Revision 1.7 2004/02/19 02:05:37 zecke | 25 | * Revision 1.7 2004/02/19 02:05:37 zecke |
23 | * Add notes for API fixes and BC stuff | 26 | * Add notes for API fixes and BC stuff |
24 | * | 27 | * |
25 | * Revision 1.6 2003/08/01 12:30:16 eilers | 28 | * Revision 1.6 2003/08/01 12:30:16 eilers |
26 | * Merging changes from BRANCH_1_0 to HEAD | 29 | * Merging changes from BRANCH_1_0 to HEAD |
27 | * | 30 | * |
28 | * Revision 1.5.4.1 2003/06/30 14:34:19 eilers | 31 | * Revision 1.5.4.1 2003/06/30 14:34:19 eilers |
29 | * Patches from Zecke: | 32 | * Patches from Zecke: |
30 | * Fixing and cleaning up extraMap handling | 33 | * Fixing and cleaning up extraMap handling |
31 | * Adding d_ptr for binary compatibility in the future | 34 | * Adding d_ptr for binary compatibility in the future |
32 | * | 35 | * |
33 | * Revision 1.5 2003/04/13 18:07:10 zecke | 36 | * Revision 1.5 2003/04/13 18:07:10 zecke |
34 | * More API doc | 37 | * More API doc |
35 | * QString -> const QString& | 38 | * QString -> const QString& |
36 | * QString = 0l -> QString::null | 39 | * QString = 0l -> QString::null |
37 | * | 40 | * |
38 | * Revision 1.4 2002/11/13 14:14:51 eilers | 41 | * Revision 1.4 2002/11/13 14:14:51 eilers |
39 | * Added sorted for Contacts.. | 42 | * Added sorted for Contacts.. |
40 | * | 43 | * |
41 | * Revision 1.3 2002/11/01 15:10:42 eilers | 44 | * Revision 1.3 2002/11/01 15:10:42 eilers |
42 | * Added regExp-search in database for all fields in a contact. | 45 | * Added regExp-search in database for all fields in a contact. |
43 | * | 46 | * |
44 | * Revision 1.2 2002/10/07 17:34:24 eilers | 47 | * Revision 1.2 2002/10/07 17:34:24 eilers |
45 | * added OBackendFactory for advanced backend access | 48 | * added OBackendFactory for advanced backend access |
46 | * | 49 | * |
47 | * Revision 1.1 2002/09/27 17:11:44 eilers | 50 | * Revision 1.1 2002/09/27 17:11:44 eilers |
48 | * Added API for accessing the Contact-Database ! It is compiling, but | 51 | * Added API for accessing the Contact-Database ! It is compiling, but |
49 | * please do not expect that anything is working ! | 52 | * please do not expect that anything is working ! |
50 | * I will debug that stuff in the next time .. | 53 | * I will debug that stuff in the next time .. |
51 | * Please read README_COMPILE for compiling ! | 54 | * Please read README_COMPILE for compiling ! |
52 | * | 55 | * |
53 | * ===================================================================== | 56 | * ===================================================================== |
54 | * | 57 | * |
55 | */ | 58 | */ |
56 | 59 | ||
57 | #ifndef _OCONTACTACCESSBACKEND_H_ | 60 | #ifndef _OCONTACTACCESSBACKEND_H_ |
58 | #define _OCONTACTACCESSBACKEND_H_ | 61 | #define _OCONTACTACCESSBACKEND_H_ |
59 | 62 | ||
60 | #include "ocontact.h" | 63 | #include "ocontact.h" |
61 | #include "opimaccessbackend.h" | 64 | #include "opimaccessbackend.h" |
62 | 65 | ||
63 | #include <qregexp.h> | 66 | #include <qregexp.h> |
64 | 67 | ||
65 | /** | 68 | /** |
66 | * This class represents the interface of all Contact Backends. | 69 | * This class represents the interface of all Contact Backends. |
67 | * Derivates of this class will be used to access the contacts. | 70 | * Derivates of this class will be used to access the contacts. |
68 | * As implementation currently XML and vCard exist. This class needs to be implemented | 71 | * As implementation currently XML and vCard exist. This class needs to be implemented |
69 | * if you want to provide your own storage. | 72 | * if you want to provide your own storage. |
70 | * In all queries a list of uids is passed on instead of loading the actual record! | 73 | * In all queries a list of uids is passed on instead of loading the actual record! |
71 | * | 74 | * |
72 | * @see OContactAccessBackend_VCard | 75 | * @see OContactAccessBackend_VCard |
73 | * @see OContactAccessBackend_XML | 76 | * @see OContactAccessBackend_XML |
74 | */ | 77 | */ |
75 | class OContactAccessBackend: public OPimAccessBackend<OContact> { | 78 | class OContactAccessBackend: public OPimAccessBackend<OContact> { |
76 | public: | 79 | public: |
77 | /** | 80 | /** |
78 | * @todo make non line in regard to BC guide of KDE | 81 | * @todo make non line in regard to BC guide of KDE |
79 | */ | 82 | */ |
80 | OContactAccessBackend() {} | 83 | OContactAccessBackend() {} |
81 | /** | 84 | /** |
82 | * @todo make non inline in regard to the BC guide of KDE | 85 | * @todo make non inline in regard to the BC guide of KDE |
83 | */ | 86 | */ |
84 | virtual ~OContactAccessBackend() {} | 87 | virtual ~OContactAccessBackend() {} |
85 | 88 | ||
86 | 89 | ||
87 | /** | 90 | /** |
88 | * Return if database was changed externally. | 91 | * Return if database was changed externally. |
89 | * This may just make sense on file based databases like a XML-File. | 92 | * This may just make sense on file based databases like a XML-File. |
90 | * It is used to prevent to overwrite the current database content | 93 | * It is used to prevent to overwrite the current database content |
91 | * if the file was already changed by something else ! | 94 | * if the file was already changed by something else ! |
92 | * If this happens, we have to reload before save our data. | 95 | * If this happens, we have to reload before save our data. |
93 | * If we use real databases, this should be handled by the database | 96 | * If we use real databases, this should be handled by the database |
94 | * management system themselve, therefore this function should always return false in | 97 | * management system themselve, therefore this function should always return false in |
95 | * this case. It is not our problem to handle this conflict ... | 98 | * this case. It is not our problem to handle this conflict ... |
96 | * @return <i>true</i> if the database was changed and if save without reload will | 99 | * @return <i>true</i> if the database was changed and if save without reload will |
97 | * be dangerous. <i>false</i> if the database was not changed or it is save to write | 100 | * be dangerous. <i>false</i> if the database was not changed or it is save to write |
98 | * in this situation. | 101 | * in this situation. |
99 | */ | 102 | */ |
100 | virtual bool wasChangedExternally() = 0; | 103 | virtual bool wasChangedExternally() = 0; |
101 | 104 | ||
102 | virtual QArray<int> matchRegexp( const QRegExp &r ) const = 0; | 105 | virtual QArray<int> matchRegexp( const QRegExp &r ) const = 0; |
103 | 106 | ||
104 | /** | 107 | /** |
105 | * Return all possible settings. | 108 | * Return all possible settings. |
106 | * @return All settings provided by the current backend | 109 | * @return All settings provided by the current backend |
107 | * (i.e.: query_WildCards & query_IgnoreCase) | 110 | * (i.e.: query_WildCards & query_IgnoreCase) |
108 | */ | 111 | */ |
109 | virtual const uint querySettings() = 0; | 112 | virtual const uint querySettings() = 0; |
110 | 113 | ||
111 | /** | 114 | /** |
112 | * Check whether settings are correct. | 115 | * Check whether settings are correct. |
113 | * @return <i>true</i> if the given settings are correct and possible. | 116 | * @return <i>true</i> if the given settings are correct and possible. |
114 | */ | 117 | */ |
115 | virtual bool hasQuerySettings (uint querySettings) const = 0; | 118 | virtual bool hasQuerySettings (uint querySettings) const = 0; |
116 | 119 | ||
117 | /** | 120 | /** |
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,112 +1,115 @@ | |||
1 | /* | 1 | /* |
2 | * SQL Backend for the OPIE-Contact Database. | 2 | * SQL Backend for the OPIE-Contact Database. |
3 | * | 3 | * |
4 | * Copyright (c) 2002 by Stefan Eilers (Eilers.Stefan@epost.de) | 4 | * Copyright (c) 2002 by Stefan Eilers (Eilers.Stefan@epost.de) |
5 | * | 5 | * |
6 | * ===================================================================== | 6 | * ===================================================================== |
7 | *This program is free software; you can redistribute it and/or | 7 | *This program is free software; you can redistribute it and/or |
8 | *modify it under the terms of the GNU Library General Public | 8 | *modify it under the terms of the GNU Library General Public |
9 | * License as published by the Free Software Foundation; either | 9 | * License as published by the Free Software Foundation; either |
10 | * version 2 of the License, or (at your option) any later version. | 10 | * version 2 of the License, or (at your option) any later version. |
11 | * ===================================================================== | 11 | * ===================================================================== |
12 | * ===================================================================== | 12 | * ===================================================================== |
13 | * Version: $Id$ | 13 | * Version: $Id$ |
14 | * ===================================================================== | 14 | * ===================================================================== |
15 | * History: | 15 | * History: |
16 | * $Log$ | 16 | * $Log$ |
17 | * Revision 1.1 2004/11/16 21:46:07 mickeyl | ||
18 | * libopie1 goes into unsupported | ||
19 | * | ||
17 | * Revision 1.5 2004/03/14 13:50:35 alwin | 20 | * Revision 1.5 2004/03/14 13:50:35 alwin |
18 | * namespace correction | 21 | * namespace correction |
19 | * | 22 | * |
20 | * Revision 1.4 2003/12/22 10:19:26 eilers | 23 | * Revision 1.4 2003/12/22 10:19:26 eilers |
21 | * Finishing implementation of sql-backend for datebook. But I have to | 24 | * Finishing implementation of sql-backend for datebook. But I have to |
22 | * port the PIM datebook application to use it, before I could debug the | 25 | * port the PIM datebook application to use it, before I could debug the |
23 | * whole stuff. | 26 | * whole stuff. |
24 | * Thus, PIM-Database backend is finished, but highly experimental. And some | 27 | * Thus, PIM-Database backend is finished, but highly experimental. And some |
25 | * parts are still generic. For instance, the "queryByExample()" methods are | 28 | * parts are still generic. For instance, the "queryByExample()" methods are |
26 | * not (or not fully) implemented. Todo: custom-entries not stored. | 29 | * not (or not fully) implemented. Todo: custom-entries not stored. |
27 | * The big show stopper: matchRegExp() (needed by OpieSearch) needs regular | 30 | * The big show stopper: matchRegExp() (needed by OpieSearch) needs regular |
28 | * expression search in the database, which is not supported by sqlite ! | 31 | * expression search in the database, which is not supported by sqlite ! |
29 | * Therefore we need either an extended sqlite or a workaround which would | 32 | * Therefore we need either an extended sqlite or a workaround which would |
30 | * be very slow and memory consuming.. | 33 | * be very slow and memory consuming.. |
31 | * | 34 | * |
32 | * Revision 1.3 2003/12/08 15:18:10 eilers | 35 | * Revision 1.3 2003/12/08 15:18:10 eilers |
33 | * Committing unfinished sql implementation before merging to libopie2 starts.. | 36 | * Committing unfinished sql implementation before merging to libopie2 starts.. |
34 | * | 37 | * |
35 | * Revision 1.2 2003/09/29 07:44:26 eilers | 38 | * Revision 1.2 2003/09/29 07:44:26 eilers |
36 | * Improvement of PIM-SQL Databases, but search queries are still limited. | 39 | * Improvement of PIM-SQL Databases, but search queries are still limited. |
37 | * Addressbook: Changed table layout. Now, we just need 1/3 of disk-space. | 40 | * Addressbook: Changed table layout. Now, we just need 1/3 of disk-space. |
38 | * Todo: Started to add new attributes. Some type conversions missing. | 41 | * Todo: Started to add new attributes. Some type conversions missing. |
39 | * | 42 | * |
40 | * Revision 1.1 2003/09/22 14:31:16 eilers | 43 | * Revision 1.1 2003/09/22 14:31:16 eilers |
41 | * Added first experimental incarnation of sql-backend for addressbook. | 44 | * Added first experimental incarnation of sql-backend for addressbook. |
42 | * Some modifications to be able to compile the todo sql-backend. | 45 | * Some modifications to be able to compile the todo sql-backend. |
43 | * A lot of changes fill follow... | 46 | * A lot of changes fill follow... |
44 | * | 47 | * |
45 | */ | 48 | */ |
46 | 49 | ||
47 | #include "ocontactaccessbackend_sql.h" | 50 | #include "ocontactaccessbackend_sql.h" |
48 | 51 | ||
49 | #include <qarray.h> | 52 | #include <qarray.h> |
50 | #include <qdatetime.h> | 53 | #include <qdatetime.h> |
51 | #include <qstringlist.h> | 54 | #include <qstringlist.h> |
52 | 55 | ||
53 | #include <qpe/global.h> | 56 | #include <qpe/global.h> |
54 | #include <qpe/recordfields.h> | 57 | #include <qpe/recordfields.h> |
55 | 58 | ||
56 | #include <opie/ocontactfields.h> | 59 | #include <opie/ocontactfields.h> |
57 | #include <opie/oconversion.h> | 60 | #include <opie/oconversion.h> |
58 | #include <opie2/osqldriver.h> | 61 | #include <opie2/osqldriver.h> |
59 | #include <opie2/osqlresult.h> | 62 | #include <opie2/osqlresult.h> |
60 | #include <opie2/osqlmanager.h> | 63 | #include <opie2/osqlmanager.h> |
61 | #include <opie2/osqlquery.h> | 64 | #include <opie2/osqlquery.h> |
62 | 65 | ||
63 | using namespace Opie::DB; | 66 | using namespace Opie::DB; |
64 | 67 | ||
65 | 68 | ||
66 | // If defined, we use a horizontal table ( uid, attr1, attr2, attr3, ..., attrn ) instead | 69 | // If defined, we use a horizontal table ( uid, attr1, attr2, attr3, ..., attrn ) instead |
67 | // vertical like "uid, type, value". | 70 | // vertical like "uid, type, value". |
68 | // DON'T DEACTIVATE THIS DEFINE IN PRODUCTIVE ENVIRONMENTS !! | 71 | // DON'T DEACTIVATE THIS DEFINE IN PRODUCTIVE ENVIRONMENTS !! |
69 | #define __STORE_HORIZONTAL_ | 72 | #define __STORE_HORIZONTAL_ |
70 | 73 | ||
71 | // Distinct loading is not very fast. If I expect that every person has just | 74 | // Distinct loading is not very fast. If I expect that every person has just |
72 | // one (and always one) 'Last Name', I can request all uid's for existing lastnames, | 75 | // one (and always one) 'Last Name', I can request all uid's for existing lastnames, |
73 | // which is faster.. | 76 | // which is faster.. |
74 | // But this may not be true for all entries, like company contacts.. | 77 | // But this may not be true for all entries, like company contacts.. |
75 | // The current AddressBook application handles this problem, but other may not.. (eilers) | 78 | // The current AddressBook application handles this problem, but other may not.. (eilers) |
76 | #define __USE_SUPERFAST_LOADQUERY | 79 | #define __USE_SUPERFAST_LOADQUERY |
77 | 80 | ||
78 | 81 | ||
79 | /* | 82 | /* |
80 | * Implementation of used query types | 83 | * Implementation of used query types |
81 | * CREATE query | 84 | * CREATE query |
82 | * LOAD query | 85 | * LOAD query |
83 | * INSERT | 86 | * INSERT |
84 | * REMOVE | 87 | * REMOVE |
85 | * CLEAR | 88 | * CLEAR |
86 | */ | 89 | */ |
87 | namespace { | 90 | namespace { |
88 | /** | 91 | /** |
89 | * CreateQuery for the Todolist Table | 92 | * CreateQuery for the Todolist Table |
90 | */ | 93 | */ |
91 | class CreateQuery : public OSQLQuery { | 94 | class CreateQuery : public OSQLQuery { |
92 | public: | 95 | public: |
93 | CreateQuery(); | 96 | CreateQuery(); |
94 | ~CreateQuery(); | 97 | ~CreateQuery(); |
95 | QString query()const; | 98 | QString query()const; |
96 | }; | 99 | }; |
97 | 100 | ||
98 | /** | 101 | /** |
99 | * Clears (delete) a Table | 102 | * Clears (delete) a Table |
100 | */ | 103 | */ |
101 | class ClearQuery : public OSQLQuery { | 104 | class ClearQuery : public OSQLQuery { |
102 | public: | 105 | public: |
103 | ClearQuery(); | 106 | ClearQuery(); |
104 | ~ClearQuery(); | 107 | ~ClearQuery(); |
105 | QString query()const; | 108 | QString query()const; |
106 | 109 | ||
107 | }; | 110 | }; |
108 | 111 | ||
109 | 112 | ||
110 | /** | 113 | /** |
111 | * LoadQuery | 114 | * LoadQuery |
112 | * this one queries for all uids | 115 | * this one queries for all uids |
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 @@ | |||
1 | /* | 1 | /* |
2 | * SQL Backend for the OPIE-Contact Database. | 2 | * SQL Backend for the OPIE-Contact Database. |
3 | * | 3 | * |
4 | * Copyright (c) 2002 by Stefan Eilers (Eilers.Stefan@epost.de) | 4 | * Copyright (c) 2002 by Stefan Eilers (Eilers.Stefan@epost.de) |
5 | * | 5 | * |
6 | * ===================================================================== | 6 | * ===================================================================== |
7 | *This program is free software; you can redistribute it and/or | 7 | *This program is free software; you can redistribute it and/or |
8 | *modify it under the terms of the GNU Library General Public | 8 | *modify it under the terms of the GNU Library General Public |
9 | * License as published by the Free Software Foundation; either | 9 | * License as published by the Free Software Foundation; either |
10 | * version 2 of the License, or (at your option) any later version. | 10 | * version 2 of the License, or (at your option) any later version. |
11 | * ===================================================================== | 11 | * ===================================================================== |
12 | * | 12 | * |
13 | * | 13 | * |
14 | * ===================================================================== | 14 | * ===================================================================== |
15 | * Version: $Id$ | 15 | * Version: $Id$ |
16 | * ===================================================================== | 16 | * ===================================================================== |
17 | * History: | 17 | * History: |
18 | * $Log$ | 18 | * $Log$ |
19 | * Revision 1.1 2004/11/16 21:46:07 mickeyl | ||
20 | * libopie1 goes into unsupported | ||
21 | * | ||
19 | * Revision 1.3 2004/03/14 13:50:35 alwin | 22 | * Revision 1.3 2004/03/14 13:50:35 alwin |
20 | * namespace correction | 23 | * namespace correction |
21 | * | 24 | * |
22 | * Revision 1.2 2003/12/08 15:18:11 eilers | 25 | * Revision 1.2 2003/12/08 15:18:11 eilers |
23 | * Committing unfinished sql implementation before merging to libopie2 starts.. | 26 | * Committing unfinished sql implementation before merging to libopie2 starts.. |
24 | * | 27 | * |
25 | * Revision 1.1 2003/09/22 14:31:16 eilers | 28 | * Revision 1.1 2003/09/22 14:31:16 eilers |
26 | * Added first experimental incarnation of sql-backend for addressbook. | 29 | * Added first experimental incarnation of sql-backend for addressbook. |
27 | * Some modifications to be able to compile the todo sql-backend. | 30 | * Some modifications to be able to compile the todo sql-backend. |
28 | * A lot of changes fill follow... | 31 | * A lot of changes fill follow... |
29 | * | 32 | * |
30 | * | 33 | * |
31 | */ | 34 | */ |
32 | 35 | ||
33 | #ifndef _OContactAccessBackend_SQL_ | 36 | #ifndef _OContactAccessBackend_SQL_ |
34 | #define _OContactAccessBackend_SQL_ | 37 | #define _OContactAccessBackend_SQL_ |
35 | 38 | ||
36 | #include "ocontactaccessbackend.h" | 39 | #include "ocontactaccessbackend.h" |
37 | #include "ocontactaccess.h" | 40 | #include "ocontactaccess.h" |
38 | 41 | ||
39 | #include <qlist.h> | 42 | #include <qlist.h> |
40 | #include <qdict.h> | 43 | #include <qdict.h> |
41 | 44 | ||
42 | namespace Opie { namespace DB { | 45 | namespace Opie { namespace DB { |
43 | class OSQLDriver; | 46 | class OSQLDriver; |
44 | class OSQLResult; | 47 | class OSQLResult; |
45 | class OSQLResultItem; | 48 | class OSQLResultItem; |
46 | 49 | ||
47 | }} | 50 | }} |
48 | 51 | ||
49 | /* the default xml implementation */ | 52 | /* the default xml implementation */ |
50 | /** | 53 | /** |
51 | * This class is the SQL implementation of a Contact backend | 54 | * This class is the SQL implementation of a Contact backend |
52 | * it does implement everything available for OContact. | 55 | * it does implement everything available for OContact. |
53 | * @see OPimAccessBackend for more information of available methods | 56 | * @see OPimAccessBackend for more information of available methods |
54 | */ | 57 | */ |
55 | class OContactAccessBackend_SQL : public OContactAccessBackend { | 58 | class OContactAccessBackend_SQL : public OContactAccessBackend { |
56 | public: | 59 | public: |
57 | OContactAccessBackend_SQL ( const QString& appname, const QString& filename = QString::null ); | 60 | OContactAccessBackend_SQL ( const QString& appname, const QString& filename = QString::null ); |
58 | 61 | ||
59 | ~OContactAccessBackend_SQL (); | 62 | ~OContactAccessBackend_SQL (); |
60 | 63 | ||
61 | bool save(); | 64 | bool save(); |
62 | 65 | ||
63 | bool load (); | 66 | bool load (); |
64 | 67 | ||
65 | void clear (); | 68 | void clear (); |
66 | 69 | ||
67 | bool wasChangedExternally(); | 70 | bool wasChangedExternally(); |
68 | 71 | ||
69 | QArray<int> allRecords() const; | 72 | QArray<int> allRecords() const; |
70 | 73 | ||
71 | OContact find ( int uid ) const; | 74 | OContact find ( int uid ) const; |
72 | // FIXME: Add lookahead-cache support ! | 75 | // FIXME: Add lookahead-cache support ! |
73 | //OContact find(int uid, const QArray<int>&, uint cur, Frontend::CacheDirection )const; | 76 | //OContact find(int uid, const QArray<int>&, uint cur, Frontend::CacheDirection )const; |
74 | 77 | ||
75 | QArray<int> queryByExample ( const OContact &query, int settings, | 78 | QArray<int> queryByExample ( const OContact &query, int settings, |
76 | const QDateTime& d ); | 79 | const QDateTime& d ); |
77 | 80 | ||
78 | QArray<int> matchRegexp( const QRegExp &r ) const; | 81 | QArray<int> matchRegexp( const QRegExp &r ) const; |
79 | 82 | ||
80 | const uint querySettings(); | 83 | const uint querySettings(); |
81 | 84 | ||
82 | bool hasQuerySettings (uint querySettings) const; | 85 | bool hasQuerySettings (uint querySettings) const; |
83 | 86 | ||
84 | // Currently only asc implemented.. | 87 | // Currently only asc implemented.. |
85 | QArray<int> sorted( bool asc, int , int , int ); | 88 | QArray<int> sorted( bool asc, int , int , int ); |
86 | bool add ( const OContact &newcontact ); | 89 | bool add ( const OContact &newcontact ); |
87 | 90 | ||
88 | bool replace ( const OContact &contact ); | 91 | bool replace ( const OContact &contact ); |
89 | 92 | ||
90 | bool remove ( int uid ); | 93 | bool remove ( int uid ); |
91 | bool reload(); | 94 | bool reload(); |
92 | 95 | ||
93 | private: | 96 | private: |
94 | QArray<int> extractUids( Opie::DB::OSQLResult& res ) const; | 97 | QArray<int> extractUids( Opie::DB::OSQLResult& res ) const; |
95 | QMap<int, QString> requestNonCustom( int uid ) const; | 98 | QMap<int, QString> requestNonCustom( int uid ) const; |
96 | QMap<QString, QString> requestCustom( int uid ) const; | 99 | QMap<QString, QString> requestCustom( int uid ) const; |
97 | void update(); | 100 | void update(); |
98 | 101 | ||
99 | protected: | 102 | protected: |
100 | bool m_changed; | 103 | bool m_changed; |
101 | QString m_fileName; | 104 | QString m_fileName; |
102 | QArray<int> m_uids; | 105 | QArray<int> m_uids; |
103 | 106 | ||
104 | Opie::DB::OSQLDriver* m_driver; | 107 | Opie::DB::OSQLDriver* m_driver; |
105 | }; | 108 | }; |
106 | 109 | ||
107 | #endif | 110 | #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,115 +1,118 @@ | |||
1 | /* | 1 | /* |
2 | * VCard Backend for the OPIE-Contact Database. | 2 | * VCard Backend for the OPIE-Contact Database. |
3 | * | 3 | * |
4 | * Copyright (C) 2000 Trolltech AS. All rights reserved. | 4 | * Copyright (C) 2000 Trolltech AS. All rights reserved. |
5 | * Copyright (c) 2002 by Stefan Eilers (Eilers.Stefan@epost.de) | 5 | * Copyright (c) 2002 by Stefan Eilers (Eilers.Stefan@epost.de) |
6 | * | 6 | * |
7 | * ===================================================================== | 7 | * ===================================================================== |
8 | *This program is free software; you can redistribute it and/or | 8 | *This program is free software; you can redistribute it and/or |
9 | *modify it under the terms of the GNU Library General Public | 9 | *modify it under the terms of the GNU Library General Public |
10 | * License as published by the Free Software Foundation; either | 10 | * License as published by the Free Software Foundation; either |
11 | * version 2 of the License, or (at your option) any later version. | 11 | * version 2 of the License, or (at your option) any later version. |
12 | * ===================================================================== | 12 | * ===================================================================== |
13 | * ToDo: | 13 | * ToDo: |
14 | * | 14 | * |
15 | * ===================================================================== | 15 | * ===================================================================== |
16 | * Version: $Id$ | 16 | * Version: $Id$ |
17 | * ===================================================================== | 17 | * ===================================================================== |
18 | * History: | 18 | * History: |
19 | * $Log$ | 19 | * $Log$ |
20 | * Revision 1.1 2004/11/16 21:46:07 mickeyl | ||
21 | * libopie1 goes into unsupported | ||
22 | * | ||
20 | * Revision 1.11 2003/08/01 12:30:16 eilers | 23 | * Revision 1.11 2003/08/01 12:30:16 eilers |
21 | * Merging changes from BRANCH_1_0 to HEAD | 24 | * Merging changes from BRANCH_1_0 to HEAD |
22 | * | 25 | * |
23 | * Revision 1.10.4.3 2003/07/23 08:54:37 eilers | 26 | * Revision 1.10.4.3 2003/07/23 08:54:37 eilers |
24 | * Default email was added to the list of all emails, which already contains | 27 | * Default email was added to the list of all emails, which already contains |
25 | * the default email.. | 28 | * the default email.. |
26 | * This closes bug #1045 | 29 | * This closes bug #1045 |
27 | * | 30 | * |
28 | * Revision 1.10.4.2 2003/07/23 08:44:45 eilers | 31 | * Revision 1.10.4.2 2003/07/23 08:44:45 eilers |
29 | * Importing of Notes in vcard files wasn't implemented. | 32 | * Importing of Notes in vcard files wasn't implemented. |
30 | * Closes bug #1044 | 33 | * Closes bug #1044 |
31 | * | 34 | * |
32 | * Revision 1.10.4.1 2003/06/02 13:37:49 eilers | 35 | * Revision 1.10.4.1 2003/06/02 13:37:49 eilers |
33 | * Fixing memory leak | 36 | * Fixing memory leak |
34 | * | 37 | * |
35 | * Revision 1.10 2003/04/13 18:07:10 zecke | 38 | * Revision 1.10 2003/04/13 18:07:10 zecke |
36 | * More API doc | 39 | * More API doc |
37 | * QString -> const QString& | 40 | * QString -> const QString& |
38 | * QString = 0l -> QString::null | 41 | * QString = 0l -> QString::null |
39 | * | 42 | * |
40 | * Revision 1.9 2003/03/21 10:33:09 eilers | 43 | * Revision 1.9 2003/03/21 10:33:09 eilers |
41 | * Merged speed optimized xml backend for contacts to main. | 44 | * Merged speed optimized xml backend for contacts to main. |
42 | * Added QDateTime to querybyexample. For instance, it is now possible to get | 45 | * Added QDateTime to querybyexample. For instance, it is now possible to get |
43 | * all Birthdays/Anniversaries between two dates. This should be used | 46 | * all Birthdays/Anniversaries between two dates. This should be used |
44 | * to show all birthdays in the datebook.. | 47 | * to show all birthdays in the datebook.. |
45 | * This change is sourcecode backward compatible but you have to upgrade | 48 | * This change is sourcecode backward compatible but you have to upgrade |
46 | * the binaries for today-addressbook. | 49 | * the binaries for today-addressbook. |
47 | * | 50 | * |
48 | * Revision 1.8 2003/02/21 16:52:49 zecke | 51 | * Revision 1.8 2003/02/21 16:52:49 zecke |
49 | * -Remove old Todo classes they're deprecated and today I already using the | 52 | * -Remove old Todo classes they're deprecated and today I already using the |
50 | * new API | 53 | * new API |
51 | * -Guard against self assignment in OTodo | 54 | * -Guard against self assignment in OTodo |
52 | * -Add test apps for OPIM | 55 | * -Add test apps for OPIM |
53 | * -Opiefied Event classes | 56 | * -Opiefied Event classes |
54 | * -Added TimeZone handling and pinning of TimeZones to OEvent | 57 | * -Added TimeZone handling and pinning of TimeZones to OEvent |
55 | * -Adjust ORecur and the widget to better timezone behaviour | 58 | * -Adjust ORecur and the widget to better timezone behaviour |
56 | * | 59 | * |
57 | * Revision 1.7 2003/02/16 22:25:46 zecke | 60 | * Revision 1.7 2003/02/16 22:25:46 zecke |
58 | * 0000276 Fix for that bug.. or better temp workaround | 61 | * 0000276 Fix for that bug.. or better temp workaround |
59 | * A Preferred Number is HOME|VOICE | 62 | * A Preferred Number is HOME|VOICE |
60 | * A CellPhone is HOME|VOICE|CELL the type & HOME|VOICE test | 63 | * A CellPhone is HOME|VOICE|CELL the type & HOME|VOICE test |
61 | * triggers both | 64 | * triggers both |
62 | * and the cell phone number overrides the other entries.. | 65 | * and the cell phone number overrides the other entries.. |
63 | * | 66 | * |
64 | * as a temp I check that it's not equal to HOME|VOICE|CELL before setting the | 67 | * as a temp I check that it's not equal to HOME|VOICE|CELL before setting the |
65 | * number | 68 | * number |
66 | * | 69 | * |
67 | * The right and final fix would be to reorder the if statement to make it | 70 | * The right and final fix would be to reorder the if statement to make it |
68 | * if else based and the less common thing put to the bottom | 71 | * if else based and the less common thing put to the bottom |
69 | * | 72 | * |
70 | * OTodoAccessVcal fix the date for beaming | 73 | * OTodoAccessVcal fix the date for beaming |
71 | * | 74 | * |
72 | * Revision 1.6 2003/01/13 15:49:31 eilers | 75 | * Revision 1.6 2003/01/13 15:49:31 eilers |
73 | * Fixing crash when businesscard.vcf is missing.. | 76 | * Fixing crash when businesscard.vcf is missing.. |
74 | * | 77 | * |
75 | * Revision 1.5 2002/12/07 13:26:22 eilers | 78 | * Revision 1.5 2002/12/07 13:26:22 eilers |
76 | * Fixing bug in storing anniversary.. | 79 | * Fixing bug in storing anniversary.. |
77 | * | 80 | * |
78 | * Revision 1.4 2002/11/13 14:14:51 eilers | 81 | * Revision 1.4 2002/11/13 14:14:51 eilers |
79 | * Added sorted for Contacts.. | 82 | * Added sorted for Contacts.. |
80 | * | 83 | * |
81 | * Revision 1.3 2002/11/11 16:41:09 kergoth | 84 | * Revision 1.3 2002/11/11 16:41:09 kergoth |
82 | * no default arguments in implementation | 85 | * no default arguments in implementation |
83 | * | 86 | * |
84 | * Revision 1.2 2002/11/10 15:41:53 eilers | 87 | * Revision 1.2 2002/11/10 15:41:53 eilers |
85 | * Bugfixes.. | 88 | * Bugfixes.. |
86 | * | 89 | * |
87 | * Revision 1.1 2002/11/09 14:34:52 eilers | 90 | * Revision 1.1 2002/11/09 14:34:52 eilers |
88 | * Added VCard Backend. | 91 | * Added VCard Backend. |
89 | * | 92 | * |
90 | */ | 93 | */ |
91 | #include "ocontactaccessbackend_vcard.h" | 94 | #include "ocontactaccessbackend_vcard.h" |
92 | #include "../../library/backend/vobject_p.h" | 95 | #include "../../library/backend/vobject_p.h" |
93 | #include "../../library/backend/qfiledirect_p.h" | 96 | #include "../../library/backend/qfiledirect_p.h" |
94 | 97 | ||
95 | #include <qpe/timeconversion.h> | 98 | #include <qpe/timeconversion.h> |
96 | 99 | ||
97 | #include <qfile.h> | 100 | #include <qfile.h> |
98 | 101 | ||
99 | OContactAccessBackend_VCard::OContactAccessBackend_VCard ( const QString& , const QString& filename ): | 102 | OContactAccessBackend_VCard::OContactAccessBackend_VCard ( const QString& , const QString& filename ): |
100 | m_dirty( false ), | 103 | m_dirty( false ), |
101 | m_file( filename ) | 104 | m_file( filename ) |
102 | { | 105 | { |
103 | load(); | 106 | load(); |
104 | } | 107 | } |
105 | 108 | ||
106 | 109 | ||
107 | bool OContactAccessBackend_VCard::load () | 110 | bool OContactAccessBackend_VCard::load () |
108 | { | 111 | { |
109 | m_map.clear(); | 112 | m_map.clear(); |
110 | m_dirty = false; | 113 | m_dirty = false; |
111 | 114 | ||
112 | VObject* obj = 0l; | 115 | VObject* obj = 0l; |
113 | 116 | ||
114 | if ( QFile::exists(m_file) ){ | 117 | if ( QFile::exists(m_file) ){ |
115 | obj = Parse_MIME_FromFileName( QFile::encodeName(m_file).data() ); | 118 | obj = Parse_MIME_FromFileName( QFile::encodeName(m_file).data() ); |
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 @@ | |||
1 | /* | 1 | /* |
2 | * VCard Backend for the OPIE-Contact Database. | 2 | * VCard Backend for the OPIE-Contact Database. |
3 | * | 3 | * |
4 | * Copyright (C) 2000 Trolltech AS. All rights reserved. | 4 | * Copyright (C) 2000 Trolltech AS. All rights reserved. |
5 | * Copyright (c) 2002 by Stefan Eilers (Eilers.Stefan@epost.de) | 5 | * Copyright (c) 2002 by Stefan Eilers (Eilers.Stefan@epost.de) |
6 | * | 6 | * |
7 | * ===================================================================== | 7 | * ===================================================================== |
8 | *This program is free software; you can redistribute it and/or | 8 | *This program is free software; you can redistribute it and/or |
9 | *modify it under the terms of the GNU Library General Public | 9 | *modify it under the terms of the GNU Library General Public |
10 | * License as published by the Free Software Foundation; either | 10 | * License as published by the Free Software Foundation; either |
11 | * version 2 of the License, or (at your option) any later version. | 11 | * version 2 of the License, or (at your option) any later version. |
12 | * ===================================================================== | 12 | * ===================================================================== |
13 | * ToDo: | 13 | * ToDo: |
14 | * | 14 | * |
15 | * ===================================================================== | 15 | * ===================================================================== |
16 | * Version: $Id$ | 16 | * Version: $Id$ |
17 | * ===================================================================== | 17 | * ===================================================================== |
18 | * History: | 18 | * History: |
19 | * $Log$ | 19 | * $Log$ |
20 | * Revision 1.1 2004/11/16 21:46:07 mickeyl | ||
21 | * libopie1 goes into unsupported | ||
22 | * | ||
20 | * Revision 1.6 2003/04/13 18:07:10 zecke | 23 | * Revision 1.6 2003/04/13 18:07:10 zecke |
21 | * More API doc | 24 | * More API doc |
22 | * QString -> const QString& | 25 | * QString -> const QString& |
23 | * QString = 0l -> QString::null | 26 | * QString = 0l -> QString::null |
24 | * | 27 | * |
25 | * Revision 1.5 2003/03/21 10:33:09 eilers | 28 | * Revision 1.5 2003/03/21 10:33:09 eilers |
26 | * Merged speed optimized xml backend for contacts to main. | 29 | * Merged speed optimized xml backend for contacts to main. |
27 | * Added QDateTime to querybyexample. For instance, it is now possible to get | 30 | * Added QDateTime to querybyexample. For instance, it is now possible to get |
28 | * all Birthdays/Anniversaries between two dates. This should be used | 31 | * all Birthdays/Anniversaries between two dates. This should be used |
29 | * to show all birthdays in the datebook.. | 32 | * to show all birthdays in the datebook.. |
30 | * This change is sourcecode backward compatible but you have to upgrade | 33 | * This change is sourcecode backward compatible but you have to upgrade |
31 | * the binaries for today-addressbook. | 34 | * the binaries for today-addressbook. |
32 | * | 35 | * |
33 | * Revision 1.4 2002/12/07 13:26:22 eilers | 36 | * Revision 1.4 2002/12/07 13:26:22 eilers |
34 | * Fixing bug in storing anniversary.. | 37 | * Fixing bug in storing anniversary.. |
35 | * | 38 | * |
36 | * Revision 1.3 2002/11/13 14:14:51 eilers | 39 | * Revision 1.3 2002/11/13 14:14:51 eilers |
37 | * Added sorted for Contacts.. | 40 | * Added sorted for Contacts.. |
38 | * | 41 | * |
39 | * Revision 1.2 2002/11/10 15:41:53 eilers | 42 | * Revision 1.2 2002/11/10 15:41:53 eilers |
40 | * Bugfixes.. | 43 | * Bugfixes.. |
41 | * | 44 | * |
42 | * Revision 1.1 2002/11/09 14:34:52 eilers | 45 | * Revision 1.1 2002/11/09 14:34:52 eilers |
43 | * Added VCard Backend. | 46 | * Added VCard Backend. |
44 | * | 47 | * |
45 | */ | 48 | */ |
46 | #ifndef __OCONTACTACCESSBACKEND_VCARD_H_ | 49 | #ifndef __OCONTACTACCESSBACKEND_VCARD_H_ |
47 | #define __OCONTACTACCESSBACKEND_VCARD_H_ | 50 | #define __OCONTACTACCESSBACKEND_VCARD_H_ |
48 | 51 | ||
49 | #include <opie/ocontact.h> | 52 | #include <opie/ocontact.h> |
50 | 53 | ||
51 | #include "ocontactaccessbackend.h" | 54 | #include "ocontactaccessbackend.h" |
52 | 55 | ||
53 | class VObject; | 56 | class VObject; |
54 | 57 | ||
55 | /** | 58 | /** |
56 | * This is the vCard 2.1 implementation of the Contact Storage | 59 | * This is the vCard 2.1 implementation of the Contact Storage |
57 | * @see OContactAccessBackend_XML | 60 | * @see OContactAccessBackend_XML |
58 | * @see OPimAccessBackend | 61 | * @see OPimAccessBackend |
59 | */ | 62 | */ |
60 | class OContactAccessBackend_VCard : public OContactAccessBackend { | 63 | class OContactAccessBackend_VCard : public OContactAccessBackend { |
61 | public: | 64 | public: |
62 | OContactAccessBackend_VCard ( const QString& appname, const QString& filename = QString::null ); | 65 | OContactAccessBackend_VCard ( const QString& appname, const QString& filename = QString::null ); |
63 | 66 | ||
64 | bool load (); | 67 | bool load (); |
65 | bool reload(); | 68 | bool reload(); |
66 | bool save(); | 69 | bool save(); |
67 | void clear (); | 70 | void clear (); |
68 | 71 | ||
69 | bool add ( const OContact& newcontact ); | 72 | bool add ( const OContact& newcontact ); |
70 | bool remove ( int uid ); | 73 | bool remove ( int uid ); |
71 | bool replace ( const OContact& contact ); | 74 | bool replace ( const OContact& contact ); |
72 | 75 | ||
73 | OContact find ( int uid ) const; | 76 | OContact find ( int uid ) const; |
74 | QArray<int> allRecords() const; | 77 | QArray<int> allRecords() const; |
75 | QArray<int> queryByExample ( const OContact &query, int settings, const QDateTime& d = QDateTime() ); | 78 | QArray<int> queryByExample ( const OContact &query, int settings, const QDateTime& d = QDateTime() ); |
76 | QArray<int> matchRegexp( const QRegExp &r ) const; | 79 | QArray<int> matchRegexp( const QRegExp &r ) const; |
77 | 80 | ||
78 | const uint querySettings(); | 81 | const uint querySettings(); |
79 | bool hasQuerySettings (uint querySettings) const; | 82 | bool hasQuerySettings (uint querySettings) const; |
80 | QArray<int> sorted( bool ascending, int sortOrder, int sortFilter, int cat ); | 83 | QArray<int> sorted( bool ascending, int sortOrder, int sortFilter, int cat ); |
81 | bool wasChangedExternally(); | 84 | bool wasChangedExternally(); |
82 | 85 | ||
83 | private: | 86 | private: |
84 | OContact parseVObject( VObject* obj ); | 87 | OContact parseVObject( VObject* obj ); |
85 | VObject* createVObject( const OContact& c ); | 88 | VObject* createVObject( const OContact& c ); |
86 | QString convDateToVCardDate( const QDate& c ) const; | 89 | QString convDateToVCardDate( const QDate& c ) const; |
87 | QDate convVCardDateToDate( const QString& datestr ); | 90 | QDate convVCardDateToDate( const QString& datestr ); |
88 | VObject *safeAddPropValue( VObject *o, const char* prop, const QString& value ); | 91 | VObject *safeAddPropValue( VObject *o, const char* prop, const QString& value ); |
89 | VObject *safeAddProp( VObject* o, const char* prop); | 92 | VObject *safeAddProp( VObject* o, const char* prop); |
90 | 93 | ||
91 | bool m_dirty : 1; | 94 | bool m_dirty : 1; |
92 | QString m_file; | 95 | QString m_file; |
93 | QMap<int, OContact> m_map; | 96 | QMap<int, OContact> m_map; |
94 | }; | 97 | }; |
95 | 98 | ||
96 | #endif | 99 | #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,113 +1,116 @@ | |||
1 | /* | 1 | /* |
2 | * XML Backend for the OPIE-Contact Database. | 2 | * XML Backend for the OPIE-Contact Database. |
3 | * | 3 | * |
4 | * Copyright (c) 2002 by Stefan Eilers (Eilers.Stefan@epost.de) | 4 | * Copyright (c) 2002 by Stefan Eilers (Eilers.Stefan@epost.de) |
5 | * | 5 | * |
6 | * ===================================================================== | 6 | * ===================================================================== |
7 | *This program is free software; you can redistribute it and/or | 7 | *This program is free software; you can redistribute it and/or |
8 | *modify it under the terms of the GNU Library General Public | 8 | *modify it under the terms of the GNU Library General Public |
9 | * License as published by the Free Software Foundation; either | 9 | * License as published by the Free Software Foundation; either |
10 | * version 2 of the License, or (at your option) any later version. | 10 | * version 2 of the License, or (at your option) any later version. |
11 | * ===================================================================== | 11 | * ===================================================================== |
12 | * | 12 | * |
13 | * ===================================================================== | 13 | * ===================================================================== |
14 | * Version: $Id$ | 14 | * Version: $Id$ |
15 | * ===================================================================== | 15 | * ===================================================================== |
16 | * History: | 16 | * History: |
17 | * $Log$ | 17 | * $Log$ |
18 | * Revision 1.1 2004/11/16 21:46:07 mickeyl | ||
19 | * libopie1 goes into unsupported | ||
20 | * | ||
18 | * Revision 1.10 2004/03/01 15:44:36 chicken | 21 | * Revision 1.10 2004/03/01 15:44:36 chicken |
19 | * fix includes | 22 | * fix includes |
20 | * | 23 | * |
21 | * Revision 1.9 2003/09/22 14:31:16 eilers | 24 | * Revision 1.9 2003/09/22 14:31:16 eilers |
22 | * Added first experimental incarnation of sql-backend for addressbook. | 25 | * Added first experimental incarnation of sql-backend for addressbook. |
23 | * Some modifications to be able to compile the todo sql-backend. | 26 | * Some modifications to be able to compile the todo sql-backend. |
24 | * A lot of changes fill follow... | 27 | * A lot of changes fill follow... |
25 | * | 28 | * |
26 | * Revision 1.8 2003/08/30 15:28:26 eilers | 29 | * Revision 1.8 2003/08/30 15:28:26 eilers |
27 | * Removed some unimportant debug output which causes slow down.. | 30 | * Removed some unimportant debug output which causes slow down.. |
28 | * | 31 | * |
29 | * Revision 1.7 2003/08/01 12:30:16 eilers | 32 | * Revision 1.7 2003/08/01 12:30:16 eilers |
30 | * Merging changes from BRANCH_1_0 to HEAD | 33 | * Merging changes from BRANCH_1_0 to HEAD |
31 | * | 34 | * |
32 | * Revision 1.6 2003/07/07 16:19:47 eilers | 35 | * Revision 1.6 2003/07/07 16:19:47 eilers |
33 | * Fixing serious bug in hasQuerySettings() | 36 | * Fixing serious bug in hasQuerySettings() |
34 | * | 37 | * |
35 | * Revision 1.5 2003/04/13 18:07:10 zecke | 38 | * Revision 1.5 2003/04/13 18:07:10 zecke |
36 | * More API doc | 39 | * More API doc |
37 | * QString -> const QString& | 40 | * QString -> const QString& |
38 | * QString = 0l -> QString::null | 41 | * QString = 0l -> QString::null |
39 | * | 42 | * |
40 | * Revision 1.4 2003/03/21 14:32:54 mickeyl | 43 | * Revision 1.4 2003/03/21 14:32:54 mickeyl |
41 | * g++ compliance fix: default arguments belong into the declaration, but not the definition | 44 | * g++ compliance fix: default arguments belong into the declaration, but not the definition |
42 | * | 45 | * |
43 | * Revision 1.3 2003/03/21 12:26:28 eilers | 46 | * Revision 1.3 2003/03/21 12:26:28 eilers |
44 | * Fixing small bug: If we search a birthday from today to today, it returned | 47 | * Fixing small bug: If we search a birthday from today to today, it returned |
45 | * every contact .. | 48 | * every contact .. |
46 | * | 49 | * |
47 | * Revision 1.2 2003/03/21 10:33:09 eilers | 50 | * Revision 1.2 2003/03/21 10:33:09 eilers |
48 | * Merged speed optimized xml backend for contacts to main. | 51 | * Merged speed optimized xml backend for contacts to main. |
49 | * Added QDateTime to querybyexample. For instance, it is now possible to get | 52 | * Added QDateTime to querybyexample. For instance, it is now possible to get |
50 | * all Birthdays/Anniversaries between two dates. This should be used | 53 | * all Birthdays/Anniversaries between two dates. This should be used |
51 | * to show all birthdays in the datebook.. | 54 | * to show all birthdays in the datebook.. |
52 | * This change is sourcecode backward compatible but you have to upgrade | 55 | * This change is sourcecode backward compatible but you have to upgrade |
53 | * the binaries for today-addressbook. | 56 | * the binaries for today-addressbook. |
54 | * | 57 | * |
55 | * Revision 1.1.2.2 2003/02/11 12:17:28 eilers | 58 | * Revision 1.1.2.2 2003/02/11 12:17:28 eilers |
56 | * Speed optimization. Removed the sequential search loops. | 59 | * Speed optimization. Removed the sequential search loops. |
57 | * | 60 | * |
58 | * Revision 1.1.2.1 2003/02/10 15:31:38 eilers | 61 | * Revision 1.1.2.1 2003/02/10 15:31:38 eilers |
59 | * Writing offsets to debug output.. | 62 | * Writing offsets to debug output.. |
60 | * | 63 | * |
61 | * Revision 1.1 2003/02/09 15:05:01 eilers | 64 | * Revision 1.1 2003/02/09 15:05:01 eilers |
62 | * Nothing happened.. Just some cleanup before I will start.. | 65 | * Nothing happened.. Just some cleanup before I will start.. |
63 | * | 66 | * |
64 | * Revision 1.12 2003/01/03 16:58:03 eilers | 67 | * Revision 1.12 2003/01/03 16:58:03 eilers |
65 | * Reenable debug output | 68 | * Reenable debug output |
66 | * | 69 | * |
67 | * Revision 1.11 2003/01/03 12:31:28 eilers | 70 | * Revision 1.11 2003/01/03 12:31:28 eilers |
68 | * Bugfix for calculating data diffs.. | 71 | * Bugfix for calculating data diffs.. |
69 | * | 72 | * |
70 | * Revision 1.10 2003/01/02 14:27:12 eilers | 73 | * Revision 1.10 2003/01/02 14:27:12 eilers |
71 | * Improved query by example: Search by date is possible.. First step | 74 | * Improved query by example: Search by date is possible.. First step |
72 | * for a today plugin for birthdays.. | 75 | * for a today plugin for birthdays.. |
73 | * | 76 | * |
74 | * Revision 1.9 2002/12/08 12:48:57 eilers | 77 | * Revision 1.9 2002/12/08 12:48:57 eilers |
75 | * Moved journal-enum from ocontact into i the xml-backend.. | 78 | * Moved journal-enum from ocontact into i the xml-backend.. |
76 | * | 79 | * |
77 | * Revision 1.8 2002/11/14 17:04:24 eilers | 80 | * Revision 1.8 2002/11/14 17:04:24 eilers |
78 | * Sorting will now work if fullname is identical on some entries | 81 | * Sorting will now work if fullname is identical on some entries |
79 | * | 82 | * |
80 | * Revision 1.7 2002/11/13 15:02:46 eilers | 83 | * Revision 1.7 2002/11/13 15:02:46 eilers |
81 | * Small Bug in sorted fixed | 84 | * Small Bug in sorted fixed |
82 | * | 85 | * |
83 | * Revision 1.6 2002/11/13 14:14:51 eilers | 86 | * Revision 1.6 2002/11/13 14:14:51 eilers |
84 | * Added sorted for Contacts.. | 87 | * Added sorted for Contacts.. |
85 | * | 88 | * |
86 | * Revision 1.5 2002/11/01 15:10:42 eilers | 89 | * Revision 1.5 2002/11/01 15:10:42 eilers |
87 | * Added regExp-search in database for all fields in a contact. | 90 | * Added regExp-search in database for all fields in a contact. |
88 | * | 91 | * |
89 | * Revision 1.4 2002/10/16 10:52:40 eilers | 92 | * Revision 1.4 2002/10/16 10:52:40 eilers |
90 | * Added some docu to the interface and now using the cache infrastucture by zecke.. :) | 93 | * Added some docu to the interface and now using the cache infrastucture by zecke.. :) |
91 | * | 94 | * |
92 | * Revision 1.3 2002/10/14 16:21:54 eilers | 95 | * Revision 1.3 2002/10/14 16:21:54 eilers |
93 | * Some minor interface updates | 96 | * Some minor interface updates |
94 | * | 97 | * |
95 | * Revision 1.2 2002/10/07 17:34:24 eilers | 98 | * Revision 1.2 2002/10/07 17:34:24 eilers |
96 | * added OBackendFactory for advanced backend access | 99 | * added OBackendFactory for advanced backend access |
97 | * | 100 | * |
98 | * Revision 1.1 2002/09/27 17:11:44 eilers | 101 | * Revision 1.1 2002/09/27 17:11:44 eilers |
99 | * Added API for accessing the Contact-Database ! It is compiling, but | 102 | * Added API for accessing the Contact-Database ! It is compiling, but |
100 | * please do not expect that anything is working ! | 103 | * please do not expect that anything is working ! |
101 | * I will debug that stuff in the next time .. | 104 | * I will debug that stuff in the next time .. |
102 | * Please read README_COMPILE for compiling ! | 105 | * Please read README_COMPILE for compiling ! |
103 | * | 106 | * |
104 | * | 107 | * |
105 | */ | 108 | */ |
106 | 109 | ||
107 | #include "ocontactaccessbackend_xml.h" | 110 | #include "ocontactaccessbackend_xml.h" |
108 | 111 | ||
109 | #include <qasciidict.h> | 112 | #include <qasciidict.h> |
110 | #include <qfile.h> | 113 | #include <qfile.h> |
111 | #include <qfileinfo.h> | 114 | #include <qfileinfo.h> |
112 | #include <qregexp.h> | 115 | #include <qregexp.h> |
113 | #include <qarray.h> | 116 | #include <qarray.h> |
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,116 +1,119 @@ | |||
1 | /* | 1 | /* |
2 | * XML Backend for the OPIE-Contact Database. | 2 | * XML Backend for the OPIE-Contact Database. |
3 | * | 3 | * |
4 | * Copyright (c) 2002 by Stefan Eilers (Eilers.Stefan@epost.de) | 4 | * Copyright (c) 2002 by Stefan Eilers (Eilers.Stefan@epost.de) |
5 | * | 5 | * |
6 | * ===================================================================== | 6 | * ===================================================================== |
7 | *This program is free software; you can redistribute it and/or | 7 | *This program is free software; you can redistribute it and/or |
8 | *modify it under the terms of the GNU Library General Public | 8 | *modify it under the terms of the GNU Library General Public |
9 | * License as published by the Free Software Foundation; either | 9 | * License as published by the Free Software Foundation; either |
10 | * version 2 of the License, or (at your option) any later version. | 10 | * version 2 of the License, or (at your option) any later version. |
11 | * ===================================================================== | 11 | * ===================================================================== |
12 | * ToDo: XML-Backend: Automatic reload if something was changed... | 12 | * ToDo: XML-Backend: Automatic reload if something was changed... |
13 | * File Locking to protect against concurrent access | 13 | * File Locking to protect against concurrent access |
14 | * | 14 | * |
15 | * | 15 | * |
16 | * ===================================================================== | 16 | * ===================================================================== |
17 | * Version: $Id$ | 17 | * Version: $Id$ |
18 | * ===================================================================== | 18 | * ===================================================================== |
19 | * History: | 19 | * History: |
20 | * $Log$ | 20 | * $Log$ |
21 | * Revision 1.1 2004/11/16 21:46:07 mickeyl | ||
22 | * libopie1 goes into unsupported | ||
23 | * | ||
21 | * Revision 1.15 2003/09/22 14:31:16 eilers | 24 | * Revision 1.15 2003/09/22 14:31:16 eilers |
22 | * Added first experimental incarnation of sql-backend for addressbook. | 25 | * Added first experimental incarnation of sql-backend for addressbook. |
23 | * Some modifications to be able to compile the todo sql-backend. | 26 | * Some modifications to be able to compile the todo sql-backend. |
24 | * A lot of changes fill follow... | 27 | * A lot of changes fill follow... |
25 | * | 28 | * |
26 | * Revision 1.14 2003/04/13 18:07:10 zecke | 29 | * Revision 1.14 2003/04/13 18:07:10 zecke |
27 | * More API doc | 30 | * More API doc |
28 | * QString -> const QString& | 31 | * QString -> const QString& |
29 | * QString = 0l -> QString::null | 32 | * QString = 0l -> QString::null |
30 | * | 33 | * |
31 | * Revision 1.13 2003/03/21 10:33:09 eilers | 34 | * Revision 1.13 2003/03/21 10:33:09 eilers |
32 | * Merged speed optimized xml backend for contacts to main. | 35 | * Merged speed optimized xml backend for contacts to main. |
33 | * Added QDateTime to querybyexample. For instance, it is now possible to get | 36 | * Added QDateTime to querybyexample. For instance, it is now possible to get |
34 | * all Birthdays/Anniversaries between two dates. This should be used | 37 | * all Birthdays/Anniversaries between two dates. This should be used |
35 | * to show all birthdays in the datebook.. | 38 | * to show all birthdays in the datebook.. |
36 | * This change is sourcecode backward compatible but you have to upgrade | 39 | * This change is sourcecode backward compatible but you have to upgrade |
37 | * the binaries for today-addressbook. | 40 | * the binaries for today-addressbook. |
38 | * | 41 | * |
39 | * Revision 1.12.2.2 2003/02/11 12:17:28 eilers | 42 | * Revision 1.12.2.2 2003/02/11 12:17:28 eilers |
40 | * Speed optimization. Removed the sequential search loops. | 43 | * Speed optimization. Removed the sequential search loops. |
41 | * | 44 | * |
42 | * Revision 1.12.2.1 2003/02/09 15:05:01 eilers | 45 | * Revision 1.12.2.1 2003/02/09 15:05:01 eilers |
43 | * Nothing happened.. Just some cleanup before I will start.. | 46 | * Nothing happened.. Just some cleanup before I will start.. |
44 | * | 47 | * |
45 | * Revision 1.12 2003/01/03 16:58:03 eilers | 48 | * Revision 1.12 2003/01/03 16:58:03 eilers |
46 | * Reenable debug output | 49 | * Reenable debug output |
47 | * | 50 | * |
48 | * Revision 1.11 2003/01/03 12:31:28 eilers | 51 | * Revision 1.11 2003/01/03 12:31:28 eilers |
49 | * Bugfix for calculating data diffs.. | 52 | * Bugfix for calculating data diffs.. |
50 | * | 53 | * |
51 | * Revision 1.10 2003/01/02 14:27:12 eilers | 54 | * Revision 1.10 2003/01/02 14:27:12 eilers |
52 | * Improved query by example: Search by date is possible.. First step | 55 | * Improved query by example: Search by date is possible.. First step |
53 | * for a today plugin for birthdays.. | 56 | * for a today plugin for birthdays.. |
54 | * | 57 | * |
55 | * Revision 1.9 2002/12/08 12:48:57 eilers | 58 | * Revision 1.9 2002/12/08 12:48:57 eilers |
56 | * Moved journal-enum from ocontact into i the xml-backend.. | 59 | * Moved journal-enum from ocontact into i the xml-backend.. |
57 | * | 60 | * |
58 | * Revision 1.8 2002/11/14 17:04:24 eilers | 61 | * Revision 1.8 2002/11/14 17:04:24 eilers |
59 | * Sorting will now work if fullname is identical on some entries | 62 | * Sorting will now work if fullname is identical on some entries |
60 | * | 63 | * |
61 | * Revision 1.7 2002/11/13 15:02:46 eilers | 64 | * Revision 1.7 2002/11/13 15:02:46 eilers |
62 | * Small Bug in sorted fixed | 65 | * Small Bug in sorted fixed |
63 | * | 66 | * |
64 | * Revision 1.6 2002/11/13 14:14:51 eilers | 67 | * Revision 1.6 2002/11/13 14:14:51 eilers |
65 | * Added sorted for Contacts.. | 68 | * Added sorted for Contacts.. |
66 | * | 69 | * |
67 | * Revision 1.5 2002/11/01 15:10:42 eilers | 70 | * Revision 1.5 2002/11/01 15:10:42 eilers |
68 | * Added regExp-search in database for all fields in a contact. | 71 | * Added regExp-search in database for all fields in a contact. |
69 | * | 72 | * |
70 | * Revision 1.4 2002/10/16 10:52:40 eilers | 73 | * Revision 1.4 2002/10/16 10:52:40 eilers |
71 | * Added some docu to the interface and now using the cache infrastucture by zecke.. :) | 74 | * Added some docu to the interface and now using the cache infrastucture by zecke.. :) |
72 | * | 75 | * |
73 | * Revision 1.3 2002/10/14 16:21:54 eilers | 76 | * Revision 1.3 2002/10/14 16:21:54 eilers |
74 | * Some minor interface updates | 77 | * Some minor interface updates |
75 | * | 78 | * |
76 | * Revision 1.2 2002/10/07 17:34:24 eilers | 79 | * Revision 1.2 2002/10/07 17:34:24 eilers |
77 | * added OBackendFactory for advanced backend access | 80 | * added OBackendFactory for advanced backend access |
78 | * | 81 | * |
79 | * Revision 1.1 2002/09/27 17:11:44 eilers | 82 | * Revision 1.1 2002/09/27 17:11:44 eilers |
80 | * Added API for accessing the Contact-Database ! It is compiling, but | 83 | * Added API for accessing the Contact-Database ! It is compiling, but |
81 | * please do not expect that anything is working ! | 84 | * please do not expect that anything is working ! |
82 | * I will debug that stuff in the next time .. | 85 | * I will debug that stuff in the next time .. |
83 | * Please read README_COMPILE for compiling ! | 86 | * Please read README_COMPILE for compiling ! |
84 | * | 87 | * |
85 | * | 88 | * |
86 | */ | 89 | */ |
87 | 90 | ||
88 | #ifndef _OContactAccessBackend_XML_ | 91 | #ifndef _OContactAccessBackend_XML_ |
89 | #define _OContactAccessBackend_XML_ | 92 | #define _OContactAccessBackend_XML_ |
90 | 93 | ||
91 | #include "ocontactaccessbackend.h" | 94 | #include "ocontactaccessbackend.h" |
92 | #include "ocontactaccess.h" | 95 | #include "ocontactaccess.h" |
93 | 96 | ||
94 | #include <qlist.h> | 97 | #include <qlist.h> |
95 | #include <qdict.h> | 98 | #include <qdict.h> |
96 | 99 | ||
97 | /* the default xml implementation */ | 100 | /* the default xml implementation */ |
98 | /** | 101 | /** |
99 | * This class is the XML implementation of a Contact backend | 102 | * This class is the XML implementation of a Contact backend |
100 | * it does implement everything available for OContact. | 103 | * it does implement everything available for OContact. |
101 | * @see OPimAccessBackend for more information of available methods | 104 | * @see OPimAccessBackend for more information of available methods |
102 | */ | 105 | */ |
103 | class OContactAccessBackend_XML : public OContactAccessBackend { | 106 | class OContactAccessBackend_XML : public OContactAccessBackend { |
104 | public: | 107 | public: |
105 | OContactAccessBackend_XML ( const QString& appname, const QString& filename = QString::null ); | 108 | OContactAccessBackend_XML ( const QString& appname, const QString& filename = QString::null ); |
106 | 109 | ||
107 | bool save(); | 110 | bool save(); |
108 | 111 | ||
109 | bool load (); | 112 | bool load (); |
110 | 113 | ||
111 | void clear (); | 114 | void clear (); |
112 | 115 | ||
113 | bool wasChangedExternally(); | 116 | bool wasChangedExternally(); |
114 | 117 | ||
115 | QArray<int> allRecords() const; | 118 | QArray<int> allRecords() const; |
116 | 119 | ||
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,112 +1,115 @@ | |||
1 | /* | 1 | /* |
2 | * SQL Backend for the OPIE-Calender Database. | 2 | * SQL Backend for the OPIE-Calender Database. |
3 | * | 3 | * |
4 | * Copyright (c) 2003 by Stefan Eilers (Eilers.Stefan@epost.de) | 4 | * Copyright (c) 2003 by Stefan Eilers (Eilers.Stefan@epost.de) |
5 | * | 5 | * |
6 | * ===================================================================== | 6 | * ===================================================================== |
7 | *This program is free software; you can redistribute it and/or | 7 | *This program is free software; you can redistribute it and/or |
8 | *modify it under the terms of the GNU Library General Public | 8 | *modify it under the terms of the GNU Library General Public |
9 | * License as published by the Free Software Foundation; either | 9 | * License as published by the Free Software Foundation; either |
10 | * version 2 of the License, or (at your option) any later version. | 10 | * version 2 of the License, or (at your option) any later version. |
11 | * ===================================================================== | 11 | * ===================================================================== |
12 | * ===================================================================== | 12 | * ===================================================================== |
13 | * Version: $Id$ | 13 | * Version: $Id$ |
14 | * ===================================================================== | 14 | * ===================================================================== |
15 | * History: | 15 | * History: |
16 | * $Log$ | 16 | * $Log$ |
17 | * Revision 1.1 2004/11/16 21:46:08 mickeyl | ||
18 | * libopie1 goes into unsupported | ||
19 | * | ||
17 | * Revision 1.4 2004/03/14 13:50:35 alwin | 20 | * Revision 1.4 2004/03/14 13:50:35 alwin |
18 | * namespace correction | 21 | * namespace correction |
19 | * | 22 | * |
20 | * Revision 1.3 2003/12/22 11:41:39 eilers | 23 | * Revision 1.3 2003/12/22 11:41:39 eilers |
21 | * Fixing stupid bug, found by sourcode review.. | 24 | * Fixing stupid bug, found by sourcode review.. |
22 | * | 25 | * |
23 | * Revision 1.2 2003/12/22 10:19:26 eilers | 26 | * Revision 1.2 2003/12/22 10:19:26 eilers |
24 | * Finishing implementation of sql-backend for datebook. But I have to | 27 | * Finishing implementation of sql-backend for datebook. But I have to |
25 | * port the PIM datebook application to use it, before I could debug the | 28 | * port the PIM datebook application to use it, before I could debug the |
26 | * whole stuff. | 29 | * whole stuff. |
27 | * Thus, PIM-Database backend is finished, but highly experimental. And some | 30 | * Thus, PIM-Database backend is finished, but highly experimental. And some |
28 | * parts are still generic. For instance, the "queryByExample()" methods are | 31 | * parts are still generic. For instance, the "queryByExample()" methods are |
29 | * not (or not fully) implemented. Todo: custom-entries not stored. | 32 | * not (or not fully) implemented. Todo: custom-entries not stored. |
30 | * The big show stopper: matchRegExp() (needed by OpieSearch) needs regular | 33 | * The big show stopper: matchRegExp() (needed by OpieSearch) needs regular |
31 | * expression search in the database, which is not supported by sqlite ! | 34 | * expression search in the database, which is not supported by sqlite ! |
32 | * Therefore we need either an extended sqlite or a workaround which would | 35 | * Therefore we need either an extended sqlite or a workaround which would |
33 | * be very slow and memory consuming.. | 36 | * be very slow and memory consuming.. |
34 | * | 37 | * |
35 | * Revision 1.1 2003/12/08 15:18:12 eilers | 38 | * Revision 1.1 2003/12/08 15:18:12 eilers |
36 | * Committing unfinished sql implementation before merging to libopie2 starts.. | 39 | * Committing unfinished sql implementation before merging to libopie2 starts.. |
37 | * | 40 | * |
38 | * | 41 | * |
39 | */ | 42 | */ |
40 | 43 | ||
41 | #include <stdio.h> | 44 | #include <stdio.h> |
42 | #include <stdlib.h> | 45 | #include <stdlib.h> |
43 | 46 | ||
44 | #include <qarray.h> | 47 | #include <qarray.h> |
45 | #include <qstringlist.h> | 48 | #include <qstringlist.h> |
46 | 49 | ||
47 | #include <qpe/global.h> | 50 | #include <qpe/global.h> |
48 | 51 | ||
49 | #include <opie2/osqldriver.h> | 52 | #include <opie2/osqldriver.h> |
50 | #include <opie2/osqlmanager.h> | 53 | #include <opie2/osqlmanager.h> |
51 | #include <opie2/osqlquery.h> | 54 | #include <opie2/osqlquery.h> |
52 | 55 | ||
53 | #include "orecur.h" | 56 | #include "orecur.h" |
54 | #include "odatebookaccessbackend_sql.h" | 57 | #include "odatebookaccessbackend_sql.h" |
55 | 58 | ||
56 | using namespace Opie::DB; | 59 | using namespace Opie::DB; |
57 | 60 | ||
58 | 61 | ||
59 | ODateBookAccessBackend_SQL::ODateBookAccessBackend_SQL( const QString& , | 62 | ODateBookAccessBackend_SQL::ODateBookAccessBackend_SQL( const QString& , |
60 | const QString& fileName ) | 63 | const QString& fileName ) |
61 | : ODateBookAccessBackend(), m_driver( NULL ) | 64 | : ODateBookAccessBackend(), m_driver( NULL ) |
62 | { | 65 | { |
63 | m_fileName = fileName.isEmpty() ? Global::applicationFileName( "datebook", "datebook.db" ) : fileName; | 66 | m_fileName = fileName.isEmpty() ? Global::applicationFileName( "datebook", "datebook.db" ) : fileName; |
64 | 67 | ||
65 | // Get the standart sql-driver from the OSQLManager.. | 68 | // Get the standart sql-driver from the OSQLManager.. |
66 | OSQLManager man; | 69 | OSQLManager man; |
67 | m_driver = man.standard(); | 70 | m_driver = man.standard(); |
68 | m_driver->setUrl( m_fileName ); | 71 | m_driver->setUrl( m_fileName ); |
69 | 72 | ||
70 | initFields(); | 73 | initFields(); |
71 | 74 | ||
72 | load(); | 75 | load(); |
73 | } | 76 | } |
74 | 77 | ||
75 | ODateBookAccessBackend_SQL::~ODateBookAccessBackend_SQL() { | 78 | ODateBookAccessBackend_SQL::~ODateBookAccessBackend_SQL() { |
76 | if( m_driver ) | 79 | if( m_driver ) |
77 | delete m_driver; | 80 | delete m_driver; |
78 | } | 81 | } |
79 | 82 | ||
80 | void ODateBookAccessBackend_SQL::initFields() | 83 | void ODateBookAccessBackend_SQL::initFields() |
81 | { | 84 | { |
82 | 85 | ||
83 | // This map contains the translation of the fieldtype id's to | 86 | // This map contains the translation of the fieldtype id's to |
84 | // the names of the table columns | 87 | // the names of the table columns |
85 | m_fieldMap.insert( OEvent::FUid, "uid" ); | 88 | m_fieldMap.insert( OEvent::FUid, "uid" ); |
86 | m_fieldMap.insert( OEvent::FCategories, "Categories" ); | 89 | m_fieldMap.insert( OEvent::FCategories, "Categories" ); |
87 | m_fieldMap.insert( OEvent::FDescription, "Description" ); | 90 | m_fieldMap.insert( OEvent::FDescription, "Description" ); |
88 | m_fieldMap.insert( OEvent::FLocation, "Location" ); | 91 | m_fieldMap.insert( OEvent::FLocation, "Location" ); |
89 | m_fieldMap.insert( OEvent::FType, "Type" ); | 92 | m_fieldMap.insert( OEvent::FType, "Type" ); |
90 | m_fieldMap.insert( OEvent::FAlarm, "Alarm" ); | 93 | m_fieldMap.insert( OEvent::FAlarm, "Alarm" ); |
91 | m_fieldMap.insert( OEvent::FSound, "Sound" ); | 94 | m_fieldMap.insert( OEvent::FSound, "Sound" ); |
92 | m_fieldMap.insert( OEvent::FRType, "RType" ); | 95 | m_fieldMap.insert( OEvent::FRType, "RType" ); |
93 | m_fieldMap.insert( OEvent::FRWeekdays, "RWeekdays" ); | 96 | m_fieldMap.insert( OEvent::FRWeekdays, "RWeekdays" ); |
94 | m_fieldMap.insert( OEvent::FRPosition, "RPosition" ); | 97 | m_fieldMap.insert( OEvent::FRPosition, "RPosition" ); |
95 | m_fieldMap.insert( OEvent::FRFreq, "RFreq" ); | 98 | m_fieldMap.insert( OEvent::FRFreq, "RFreq" ); |
96 | m_fieldMap.insert( OEvent::FRHasEndDate, "RHasEndDate" ); | 99 | m_fieldMap.insert( OEvent::FRHasEndDate, "RHasEndDate" ); |
97 | m_fieldMap.insert( OEvent::FREndDate, "REndDate" ); | 100 | m_fieldMap.insert( OEvent::FREndDate, "REndDate" ); |
98 | m_fieldMap.insert( OEvent::FRCreated, "RCreated" ); | 101 | m_fieldMap.insert( OEvent::FRCreated, "RCreated" ); |
99 | m_fieldMap.insert( OEvent::FRExceptions, "RExceptions" ); | 102 | m_fieldMap.insert( OEvent::FRExceptions, "RExceptions" ); |
100 | m_fieldMap.insert( OEvent::FStart, "Start" ); | 103 | m_fieldMap.insert( OEvent::FStart, "Start" ); |
101 | m_fieldMap.insert( OEvent::FEnd, "End" ); | 104 | m_fieldMap.insert( OEvent::FEnd, "End" ); |
102 | m_fieldMap.insert( OEvent::FNote, "Note" ); | 105 | m_fieldMap.insert( OEvent::FNote, "Note" ); |
103 | m_fieldMap.insert( OEvent::FTimeZone, "TimeZone" ); | 106 | m_fieldMap.insert( OEvent::FTimeZone, "TimeZone" ); |
104 | m_fieldMap.insert( OEvent::FRecParent, "RecParent" ); | 107 | m_fieldMap.insert( OEvent::FRecParent, "RecParent" ); |
105 | m_fieldMap.insert( OEvent::FRecChildren, "Recchildren" ); | 108 | m_fieldMap.insert( OEvent::FRecChildren, "Recchildren" ); |
106 | 109 | ||
107 | // Create a map that maps the column name to the id | 110 | // Create a map that maps the column name to the id |
108 | QMapConstIterator<int, QString> it; | 111 | QMapConstIterator<int, QString> it; |
109 | for ( it = ++m_fieldMap.begin(); it != m_fieldMap.end(); ++it ){ | 112 | for ( it = ++m_fieldMap.begin(); it != m_fieldMap.end(); ++it ){ |
110 | m_reverseFieldMap.insert( it.data(), it.key() ); | 113 | m_reverseFieldMap.insert( it.data(), it.key() ); |
111 | } | 114 | } |
112 | 115 | ||
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 | |||