summaryrefslogtreecommitdiff
path: root/libopie2
authoralwin <alwin>2004-02-20 02:06:52 (UTC)
committer alwin <alwin>2004-02-20 02:06:52 (UTC)
commit55f4d502486e01927356908223622e435c975f7e (patch) (side-by-side diff)
tree824b5c1e8992564677c4f39473bc108a32a2cf2a /libopie2
parent060b4fc7a3fd5c1b5f745167fe084f7486719b7e (diff)
downloadopie-55f4d502486e01927356908223622e435c975f7e.zip
opie-55f4d502486e01927356908223622e435c975f7e.tar.gz
opie-55f4d502486e01927356908223622e435c975f7e.tar.bz2
moved the opie pim stuff to libopie2 - pim. Tried to resort them, may be someone should take a look for a better file order. but now all applications can start using libopiepim2 instead of libopie1-pim-stuff.
Diffstat (limited to 'libopie2') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/backend/backends.pro31
-rw-r--r--libopie2/opiepim/backend/obackendfactory.h118
-rw-r--r--libopie2/opiepim/backend/ocontactaccessbackend.h82
-rw-r--r--libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp77
-rw-r--r--libopie2/opiepim/backend/ocontactaccessbackend_sql.h62
-rw-r--r--libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp125
-rw-r--r--libopie2/opiepim/backend/ocontactaccessbackend_vcard.h77
-rw-r--r--libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp135
-rw-r--r--libopie2/opiepim/backend/ocontactaccessbackend_xml.h118
-rw-r--r--libopie2/opiepim/backend/odatebookaccessbackend.cpp38
-rw-r--r--libopie2/opiepim/backend/odatebookaccessbackend.h35
-rw-r--r--libopie2/opiepim/backend/odatebookaccessbackend_sql.cpp67
-rw-r--r--libopie2/opiepim/backend/odatebookaccessbackend_sql.h33
-rw-r--r--libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp41
-rw-r--r--libopie2/opiepim/backend/odatebookaccessbackend_xml.h33
-rw-r--r--libopie2/opiepim/backend/opimaccessbackend.h36
-rw-r--r--libopie2/opiepim/backend/otodoaccessbackend.cpp33
-rw-r--r--libopie2/opiepim/backend/otodoaccessbackend.h35
-rw-r--r--libopie2/opiepim/backend/otodoaccesssql.cpp41
-rw-r--r--libopie2/opiepim/backend/otodoaccesssql.h34
-rw-r--r--libopie2/opiepim/backend/otodoaccessvcal.cpp35
-rw-r--r--libopie2/opiepim/backend/otodoaccessvcal.h34
-rw-r--r--libopie2/opiepim/backend/otodoaccessxml.cpp45
-rw-r--r--libopie2/opiepim/backend/otodoaccessxml.h33
-rw-r--r--libopie2/opiepim/core/core.pro21
-rw-r--r--libopie2/opiepim/core/ocontactaccess.cpp80
-rw-r--r--libopie2/opiepim/core/ocontactaccess.h105
-rw-r--r--libopie2/opiepim/core/oconversion.cpp47
-rw-r--r--libopie2/opiepim/core/oconversion.h50
-rw-r--r--libopie2/opiepim/core/odatebookaccess.cpp35
-rw-r--r--libopie2/opiepim/core/odatebookaccess.h33
-rw-r--r--libopie2/opiepim/core/opimaccesstemplate.h43
-rw-r--r--libopie2/opiepim/core/opimcache.h33
-rw-r--r--libopie2/opiepim/core/opimmaintainer.cpp34
-rw-r--r--libopie2/opiepim/core/opimmaintainer.h31
-rw-r--r--libopie2/opiepim/core/opimnotify.cpp33
-rw-r--r--libopie2/opiepim/core/opimnotify.h32
-rw-r--r--libopie2/opiepim/core/opimnotifymanager.cpp37
-rw-r--r--libopie2/opiepim/core/opimnotifymanager.h33
-rw-r--r--libopie2/opiepim/core/opimrecord.cpp33
-rw-r--r--libopie2/opiepim/core/opimrecord.h33
-rw-r--r--libopie2/opiepim/core/opimresolver.cpp38
-rw-r--r--libopie2/opiepim/core/opimresolver.h33
-rw-r--r--libopie2/opiepim/core/opimstate.cpp31
-rw-r--r--libopie2/opiepim/core/opimstate.h31
-rw-r--r--libopie2/opiepim/core/opimxref.cpp34
-rw-r--r--libopie2/opiepim/core/opimxref.h34
-rw-r--r--libopie2/opiepim/core/opimxrefmanager.cpp33
-rw-r--r--libopie2/opiepim/core/opimxrefmanager.h33
-rw-r--r--libopie2/opiepim/core/opimxrefpartner.cpp34
-rw-r--r--libopie2/opiepim/core/opimxrefpartner.h30
-rw-r--r--libopie2/opiepim/core/orecur.cpp36
-rw-r--r--libopie2/opiepim/core/orecur.h31
-rw-r--r--libopie2/opiepim/core/otemplatebase.h33
-rw-r--r--libopie2/opiepim/core/otimezone.cpp37
-rw-r--r--libopie2/opiepim/core/otimezone.h33
-rw-r--r--libopie2/opiepim/core/otodoaccess.cpp37
-rw-r--r--libopie2/opiepim/core/otodoaccess.h37
-rw-r--r--libopie2/opiepim/ocontact.cpp37
-rw-r--r--libopie2/opiepim/ocontact.h51
-rw-r--r--libopie2/opiepim/ocontactfields.cpp35
-rw-r--r--libopie2/opiepim/ocontactfields.h33
-rw-r--r--libopie2/opiepim/oevent.cpp40
-rw-r--r--libopie2/opiepim/oevent.h36
-rw-r--r--libopie2/opiepim/opiepim.pro10
-rw-r--r--libopie2/opiepim/orecordlist.h36
-rw-r--r--libopie2/opiepim/otodo.cpp44
-rw-r--r--libopie2/opiepim/otodo.h34
-rw-r--r--libopie2/opiepim/ui/opimmainwindow.cpp33
-rw-r--r--libopie2/opiepim/ui/opimmainwindow.h36
-rw-r--r--libopie2/opiepim/ui/ui.pro3
71 files changed, 2288 insertions, 826 deletions
diff --git a/libopie2/opiepim/backend/backends.pro b/libopie2/opiepim/backend/backends.pro
new file mode 100644
index 0000000..4231a00
--- a/dev/null
+++ b/libopie2/opiepim/backend/backends.pro
@@ -0,0 +1,31 @@
+SOURCES += core/backends/ocontactaccessbackend_sql.cpp \
+ core/backends/ocontactaccessbackend_vcard.cpp \
+ core/backends/ocontactaccessbackend_xml.cpp \
+ core/backends/ocontactaccess.cpp \
+ core/backends/odatebookaccessbackend.cpp \
+ core/backends/odatebookaccessbackend_xml.cpp \
+ core/backends/otodoaccessbackend.cpp \
+ core/backends/otodoaccess.cpp \
+ core/backends/otodoaccesssql.cpp \
+ core/backends/otodoaccessvcal.cpp \
+ core/backends/otodoaccessxml.cpp \
+ core/backends/odatebookaccess.cpp \
+ core/backends/odatebookaccessbackend_sql.cpp
+
+HEADERS += core/backends/obackendfactory.h \
+ core/backends/ocontactaccessbackend.h \
+ core/backends/ocontactaccessbackend_sql.h \
+ core/backends/ocontactaccessbackend_vcard.h \
+ core/backends/ocontactaccessbackend_xml.h \
+ core/backends/ocontactaccess.h \
+ core/backends/odatebookaccessbackend.h \
+ core/backends/odatebookaccessbackend_sql.h \
+ core/backends/odatebookaccessbackend_xml.h \
+ core/backends/opimaccessbackend.h \
+ core/backends/opimaccesstemplate.h \
+ core/backends/otodoaccessbackend.h \
+ core/backends/otodoaccess.h \
+ core/backends/otodoaccesssql.h \
+ core/backends/otodoaccessvcal.h \
+ core/backends/otodoaccessxml.h \
+ core/backends/odatebookaccess.h
diff --git a/libopie2/opiepim/backend/obackendfactory.h b/libopie2/opiepim/backend/obackendfactory.h
index 761ab9a..346e2f5 100644
--- a/libopie2/opiepim/backend/obackendfactory.h
+++ b/libopie2/opiepim/backend/obackendfactory.h
@@ -1,103 +1,58 @@
/*
- * Class to manage Backends.
- *
- * Copyright (c) 2002 by Stefan Eilers (Eilers.Stefan@epost.de)
- *
- * =====================================================================
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation;
- * either version 2 of the License, or (at your option) any later
- * version.
+ This file is part of the Opie Project
+ Copyright (C) The Main Author <main-author@whereever.org>
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+/*
* =====================================================================
* ToDo: Use plugins
* =====================================================================
- * Version: $Id$
- * =====================================================================
- * History:
- * $Log$
- * Revision 1.9 2003/12/22 10:19:26 eilers
- * Finishing implementation of sql-backend for datebook. But I have to
- * port the PIM datebook application to use it, before I could debug the
- * whole stuff.
- * Thus, PIM-Database backend is finished, but highly experimental. And some
- * parts are still generic. For instance, the "queryByExample()" methods are
- * not (or not fully) implemented. Todo: custom-entries not stored.
- * The big show stopper: matchRegExp() (needed by OpieSearch) needs regular
- * expression search in the database, which is not supported by sqlite !
- * Therefore we need either an extended sqlite or a workaround which would
- * be very slow and memory consuming..
- *
- * Revision 1.8 2003/09/22 14:31:16 eilers
- * Added first experimental incarnation of sql-backend for addressbook.
- * Some modifications to be able to compile the todo sql-backend.
- * A lot of changes fill follow...
- *
- * Revision 1.7 2003/08/01 12:30:16 eilers
- * Merging changes from BRANCH_1_0 to HEAD
- *
- * Revision 1.6.4.1 2003/06/30 14:34:19 eilers
- * Patches from Zecke:
- * Fixing and cleaning up extraMap handling
- * Adding d_ptr for binary compatibility in the future
- *
- * Revision 1.6 2003/04/13 18:07:10 zecke
- * More API doc
- * QString -> const QString&
- * QString = 0l -> QString::null
- *
- * Revision 1.5 2003/02/21 23:31:52 zecke
- * Add XML datebookresource
- * -clean up todoaccessxml header
- * -implement some more stuff in the oeven tester
- * -extend DefaultFactory to not crash and to use datebook
- *
- * -reading of OEvents is working nicely.. saving will be added
- * tomorrow
- * -fix spelling in ODateBookAcces
- *
- * Revision 1.4 2002/10/14 15:55:18 eilers
- * Redeactivate SQL.. ;)
- *
- * Revision 1.3 2002/10/10 17:08:58 zecke
- * The Cache is finally in place
- * I tested it with my todolist and it 'works' for 10.000 todos the hits are awesome ;)
- * The read ahead functionality does not make sense for XMLs backends because most of the stuff is already in memory. While using readahead on SQL makes things a lot faster....
- * I still have to fully implement read ahead
- * This change is bic but sc
- *
- * Revision 1.2 2002/10/08 09:27:36 eilers
- * Fixed libopie.pro to include the new pim-API.
- * The SQL-Stuff is currently deactivated. Otherwise everyone who wants to
- * compile itself would need to install libsqlite, libopiesql...
- * Therefore, the backend currently uses XML only..
- *
- * Revision 1.1 2002/10/07 17:35:01 eilers
- * added OBackendFactory for advanced backend access
- *
- *
- * =====================================================================
*/
#ifndef OPIE_BACKENDFACTORY_H_
#define OPIE_BACKENDFACTORY_H_
#include <qstring.h>
#include <qasciidict.h>
#include <qpe/config.h>
-#include "otodoaccessxml.h"
-#include "ocontactaccessbackend_xml.h"
-#include "odatebookaccessbackend_xml.h"
+#include <opie2/otodoaccessxml.h>
+#include <opie2/ocontactaccessbackend_xml.h>
+#include <opie2/odatebookaccessbackend_xml.h>
#ifdef __USE_SQL
-#include "otodoaccesssql.h"
-#include "ocontactaccessbackend_sql.h"
-#include "odatebookaccessbackend_sql.h"
+#include <opie2/otodoaccesssql.h>
+#include <opie2/ocontactaccessbackend_sql.h>
+#include <opie2/odatebookaccessbackend_sql.h>
#endif
+namespace Opie {
+
class OBackendPrivate;
/**
* This class is our factory. It will give us the default implementations
* of at least Todolist, Contacts and Datebook. In the future this class will
* allow users to switch the backend with ( XML->SQLite ) without the need
@@ -187,8 +142,9 @@ class OBackendFactory
}
private:
OBackendPrivate* d;
};
+}
#endif
diff --git a/libopie2/opiepim/backend/ocontactaccessbackend.h b/libopie2/opiepim/backend/ocontactaccessbackend.h
index 0eac6dc..6113cea 100644
--- a/libopie2/opiepim/backend/ocontactaccessbackend.h
+++ b/libopie2/opiepim/backend/ocontactaccessbackend.h
@@ -1,70 +1,53 @@
+/*
+ This file is part of the Opie Project
+ Copyright (C) The Main Author <main-author@whereever.org>
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
/**
* The class responsible for managing a backend.
* The implementation of this abstract class contains
* the complete database handling.
*
* Copyright (c) 2002 by Stefan Eilers (Eilers.Stefan@epost.de)
* Copyright (c) 2002 by Holger Freyther (zecke@handhelds.org)
*
- * =====================================================================
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation;
- * either version 2 of the License, or (at your option) any later
- * version.
- * =====================================================================
- * ToDo: Define enum for query settings
- * =====================================================================
- * Version: $Id$
- * =====================================================================
- * History:
- * $Log$
- * Revision 1.7 2004/02/19 02:05:37 zecke
- * Add notes for API fixes and BC stuff
- *
- * Revision 1.6 2003/08/01 12:30:16 eilers
- * Merging changes from BRANCH_1_0 to HEAD
- *
- * Revision 1.5.4.1 2003/06/30 14:34:19 eilers
- * Patches from Zecke:
- * Fixing and cleaning up extraMap handling
- * Adding d_ptr for binary compatibility in the future
- *
- * Revision 1.5 2003/04/13 18:07:10 zecke
- * More API doc
- * QString -> const QString&
- * QString = 0l -> QString::null
- *
- * Revision 1.4 2002/11/13 14:14:51 eilers
- * Added sorted for Contacts..
- *
- * Revision 1.3 2002/11/01 15:10:42 eilers
- * Added regExp-search in database for all fields in a contact.
- *
- * Revision 1.2 2002/10/07 17:34:24 eilers
- * added OBackendFactory for advanced backend access
- *
- * Revision 1.1 2002/09/27 17:11:44 eilers
- * Added API for accessing the Contact-Database ! It is compiling, but
- * please do not expect that anything is working !
- * I will debug that stuff in the next time ..
- * Please read README_COMPILE for compiling !
- *
- * =====================================================================
- *
*/
#ifndef _OCONTACTACCESSBACKEND_H_
#define _OCONTACTACCESSBACKEND_H_
-#include "ocontact.h"
-#include "opimaccessbackend.h"
+#include <opie2/ocontact.h>
+#include <opie2/opimaccessbackend.h>
#include <qregexp.h>
+namespace Opie {
/**
* This class represents the interface of all Contact Backends.
* Derivates of this class will be used to access the contacts.
* As implementation currently XML and vCard exist. This class needs to be implemented
* if you want to provide your own storage.
* In all queries a list of uids is passed on instead of loading the actual record!
@@ -122,7 +105,10 @@ class OContactAccessBackend: public OPimAccessBackend<OContact> {
private:
class Private;
Private *d;
};
+
+}
+
#endif
diff --git a/libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp b/libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp
index a5be4c8..d0c8052 100644
--- a/libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp
+++ b/libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp
@@ -1,60 +1,49 @@
/*
+ This file is part of the Opie Project
+ Copyright (C) The Main Author <main-author@whereever.org>
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+/*
* SQL Backend for the OPIE-Contact Database.
- *
- * Copyright (c) 2002 by Stefan Eilers (Eilers.Stefan@epost.de)
- *
- * =====================================================================
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- * =====================================================================
- * =====================================================================
- * Version: $Id$
- * =====================================================================
- * History:
- * $Log$
- * Revision 1.4 2003/12/22 10:19:26 eilers
- * Finishing implementation of sql-backend for datebook. But I have to
- * port the PIM datebook application to use it, before I could debug the
- * whole stuff.
- * Thus, PIM-Database backend is finished, but highly experimental. And some
- * parts are still generic. For instance, the "queryByExample()" methods are
- * not (or not fully) implemented. Todo: custom-entries not stored.
- * The big show stopper: matchRegExp() (needed by OpieSearch) needs regular
- * expression search in the database, which is not supported by sqlite !
- * Therefore we need either an extended sqlite or a workaround which would
- * be very slow and memory consuming..
- *
- * Revision 1.3 2003/12/08 15:18:10 eilers
- * Committing unfinished sql implementation before merging to libopie2 starts..
- *
- * Revision 1.2 2003/09/29 07:44:26 eilers
- * Improvement of PIM-SQL Databases, but search queries are still limited.
- * Addressbook: Changed table layout. Now, we just need 1/3 of disk-space.
- * Todo: Started to add new attributes. Some type conversions missing.
- *
- * Revision 1.1 2003/09/22 14:31:16 eilers
- * Added first experimental incarnation of sql-backend for addressbook.
- * Some modifications to be able to compile the todo sql-backend.
- * A lot of changes fill follow...
- *
*/
#include "ocontactaccessbackend_sql.h"
#include <qarray.h>
#include <qdatetime.h>
#include <qstringlist.h>
#include <qpe/global.h>
#include <qpe/recordfields.h>
-#include <opie/ocontactfields.h>
-#include <opie/oconversion.h>
+#include <opie2/ocontactfields.h>
+#include <opie2/oconversion.h>
#include <opie2/osqldriver.h>
#include <opie2/osqlresult.h>
#include <opie2/osqlmanager.h>
#include <opie2/osqlquery.h>
@@ -78,13 +67,13 @@
* CREATE query
* LOAD query
* INSERT
* REMOVE
* CLEAR
*/
-namespace {
+namespace Opie {
/**
* CreateQuery for the Todolist Table
*/
class CreateQuery : public OSQLQuery {
public:
CreateQuery();
@@ -465,12 +454,14 @@ namespace {
};
/* --------------------------------------------------------------------------- */
+namespace Opie {
+
OContactAccessBackend_SQL::OContactAccessBackend_SQL ( const QString& /* appname */,
const QString& filename ):
OContactAccessBackend(), m_changed(false), m_driver( NULL )
{
qWarning("C'tor OContactAccessBackend_SQL starts");
QTime t;
@@ -937,6 +928,8 @@ QMap<QString, QString> OContactAccessBackend_SQL::requestCustom( int uid ) cons
customMap.insert( (*it).data( "type" ), (*it).data( "value" ) );
}
qWarning("RequestCustom needed: %d ms", t.elapsed() );
return customMap;
}
+
+}
diff --git a/libopie2/opiepim/backend/ocontactaccessbackend_sql.h b/libopie2/opiepim/backend/ocontactaccessbackend_sql.h
index b8f1d8d..55b95fd 100644
--- a/libopie2/opiepim/backend/ocontactaccessbackend_sql.h
+++ b/libopie2/opiepim/backend/ocontactaccessbackend_sql.h
@@ -1,48 +1,54 @@
/*
+ This file is part of the Opie Project
+ Copyright (C) Stefan Eilers (Eilers.Stefan@epost.de)
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+/*
* SQL Backend for the OPIE-Contact Database.
- *
- * Copyright (c) 2002 by Stefan Eilers (Eilers.Stefan@epost.de)
- *
- * =====================================================================
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- * =====================================================================
- *
- *
- * =====================================================================
- * Version: $Id$
- * =====================================================================
- * History:
- * $Log$
- * Revision 1.2 2003/12/08 15:18:11 eilers
- * Committing unfinished sql implementation before merging to libopie2 starts..
- *
- * Revision 1.1 2003/09/22 14:31:16 eilers
- * Added first experimental incarnation of sql-backend for addressbook.
- * Some modifications to be able to compile the todo sql-backend.
- * A lot of changes fill follow...
- *
- *
*/
#ifndef _OContactAccessBackend_SQL_
#define _OContactAccessBackend_SQL_
-#include "ocontactaccessbackend.h"
-#include "ocontactaccess.h"
+#include <opie2/ocontactaccessbackend.h>
+#include <opie2/ocontactaccess.h>
#include <qlist.h>
#include <qdict.h>
+/* aren't in namespace Opie yet - alwin */
class OSQLDriver;
class OSQLResult;
class OSQLResultItem;
+namespace Opie {
+
/* the default xml implementation */
/**
* This class is the SQL implementation of a Contact backend
* it does implement everything available for OContact.
* @see OPimAccessBackend for more information of available methods
*/
@@ -95,7 +101,9 @@ class OContactAccessBackend_SQL : public OContactAccessBackend {
QString m_fileName;
QArray<int> m_uids;
OSQLDriver* m_driver;
};
+}
+
#endif
diff --git a/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp b/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp
index b60c5be..f85cf38 100644
--- a/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp
+++ b/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp
@@ -1,104 +1,47 @@
/*
+ This file is part of the Opie Project
+ Copyright (C) The Main Author <main-author@whereever.org>
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+/*
* VCard Backend for the OPIE-Contact Database.
- *
- * Copyright (C) 2000 Trolltech AS. All rights reserved.
- * Copyright (c) 2002 by Stefan Eilers (Eilers.Stefan@epost.de)
- *
- * =====================================================================
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- * =====================================================================
- * ToDo:
- *
- * =====================================================================
- * Version: $Id$
- * =====================================================================
- * History:
- * $Log$
- * Revision 1.11 2003/08/01 12:30:16 eilers
- * Merging changes from BRANCH_1_0 to HEAD
- *
- * Revision 1.10.4.3 2003/07/23 08:54:37 eilers
- * Default email was added to the list of all emails, which already contains
- * the default email..
- * This closes bug #1045
- *
- * Revision 1.10.4.2 2003/07/23 08:44:45 eilers
- * Importing of Notes in vcard files wasn't implemented.
- * Closes bug #1044
- *
- * Revision 1.10.4.1 2003/06/02 13:37:49 eilers
- * Fixing memory leak
- *
- * Revision 1.10 2003/04/13 18:07:10 zecke
- * More API doc
- * QString -> const QString&
- * QString = 0l -> QString::null
- *
- * Revision 1.9 2003/03/21 10:33:09 eilers
- * Merged speed optimized xml backend for contacts to main.
- * Added QDateTime to querybyexample. For instance, it is now possible to get
- * all Birthdays/Anniversaries between two dates. This should be used
- * to show all birthdays in the datebook..
- * This change is sourcecode backward compatible but you have to upgrade
- * the binaries for today-addressbook.
- *
- * Revision 1.8 2003/02/21 16:52:49 zecke
- * -Remove old Todo classes they're deprecated and today I already using the
- * new API
- * -Guard against self assignment in OTodo
- * -Add test apps for OPIM
- * -Opiefied Event classes
- * -Added TimeZone handling and pinning of TimeZones to OEvent
- * -Adjust ORecur and the widget to better timezone behaviour
- *
- * Revision 1.7 2003/02/16 22:25:46 zecke
- * 0000276 Fix for that bug.. or better temp workaround
- * A Preferred Number is HOME|VOICE
- * A CellPhone is HOME|VOICE|CELL the type & HOME|VOICE test
- * triggers both
- * and the cell phone number overrides the other entries..
- *
- * as a temp I check that it's not equal to HOME|VOICE|CELL before setting the
- * number
- *
- * The right and final fix would be to reorder the if statement to make it
- * if else based and the less common thing put to the bottom
- *
- * OTodoAccessVcal fix the date for beaming
- *
- * Revision 1.6 2003/01/13 15:49:31 eilers
- * Fixing crash when businesscard.vcf is missing..
- *
- * Revision 1.5 2002/12/07 13:26:22 eilers
- * Fixing bug in storing anniversary..
- *
- * Revision 1.4 2002/11/13 14:14:51 eilers
- * Added sorted for Contacts..
- *
- * Revision 1.3 2002/11/11 16:41:09 kergoth
- * no default arguments in implementation
- *
- * Revision 1.2 2002/11/10 15:41:53 eilers
- * Bugfixes..
- *
- * Revision 1.1 2002/11/09 14:34:52 eilers
- * Added VCard Backend.
- *
*/
-#include "ocontactaccessbackend_vcard.h"
-#include "../../library/backend/vobject_p.h"
-#include "../../library/backend/qfiledirect_p.h"
+#include <opie2/ocontactaccessbackend_vcard.h>
+#include "../../../../library/backend/vobject_p.h"
+#include "../../../../library/backend/qfiledirect_p.h"
#include <qpe/timeconversion.h>
#include <qfile.h>
+namespace Opie {
+
OContactAccessBackend_VCard::OContactAccessBackend_VCard ( const QString& , const QString& filename ):
m_dirty( false ),
m_file( filename )
{
load();
}
@@ -641,6 +584,8 @@ VObject* OContactAccessBackend_VCard::safeAddProp( VObject *o, const char *prop)
{
VObject *ret = 0;
if ( o )
ret = addProp( o, prop );
return ret;
}
+
+}
diff --git a/libopie2/opiepim/backend/ocontactaccessbackend_vcard.h b/libopie2/opiepim/backend/ocontactaccessbackend_vcard.h
index 712d769..11be027 100644
--- a/libopie2/opiepim/backend/ocontactaccessbackend_vcard.h
+++ b/libopie2/opiepim/backend/ocontactaccessbackend_vcard.h
@@ -1,60 +1,47 @@
/*
+ This file is part of the Opie Project
+ Copyright (C) The Main Author <main-author@whereever.org>
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+/*
* VCard Backend for the OPIE-Contact Database.
- *
- * Copyright (C) 2000 Trolltech AS. All rights reserved.
- * Copyright (c) 2002 by Stefan Eilers (Eilers.Stefan@epost.de)
- *
- * =====================================================================
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- * =====================================================================
- * ToDo:
- *
- * =====================================================================
- * Version: $Id$
- * =====================================================================
- * History:
- * $Log$
- * Revision 1.6 2003/04/13 18:07:10 zecke
- * More API doc
- * QString -> const QString&
- * QString = 0l -> QString::null
- *
- * Revision 1.5 2003/03/21 10:33:09 eilers
- * Merged speed optimized xml backend for contacts to main.
- * Added QDateTime to querybyexample. For instance, it is now possible to get
- * all Birthdays/Anniversaries between two dates. This should be used
- * to show all birthdays in the datebook..
- * This change is sourcecode backward compatible but you have to upgrade
- * the binaries for today-addressbook.
- *
- * Revision 1.4 2002/12/07 13:26:22 eilers
- * Fixing bug in storing anniversary..
- *
- * Revision 1.3 2002/11/13 14:14:51 eilers
- * Added sorted for Contacts..
- *
- * Revision 1.2 2002/11/10 15:41:53 eilers
- * Bugfixes..
- *
- * Revision 1.1 2002/11/09 14:34:52 eilers
- * Added VCard Backend.
- *
*/
#ifndef __OCONTACTACCESSBACKEND_VCARD_H_
#define __OCONTACTACCESSBACKEND_VCARD_H_
-#include <opie/ocontact.h>
+#include <opie2/ocontact.h>
-#include "ocontactaccessbackend.h"
+#include <opie2/ocontactaccessbackend.h>
class VObject;
+namespace Opie {
/**
* This is the vCard 2.1 implementation of the Contact Storage
* @see OContactAccessBackend_XML
* @see OPimAccessBackend
*/
class OContactAccessBackend_VCard : public OContactAccessBackend {
@@ -90,7 +77,9 @@ private:
bool m_dirty : 1;
QString m_file;
QMap<int, OContact> m_map;
};
+}
+
#endif
diff --git a/libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp b/libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp
index aae7fca..4c3da0c 100644
--- a/libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp
+++ b/libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp
@@ -1,110 +1,39 @@
/*
+ This file is part of the Opie Project
+ Copyright (C) Stefan Eilers (Eilers.Stefan@epost.de)
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+/*
* XML Backend for the OPIE-Contact Database.
- *
- * Copyright (c) 2002 by Stefan Eilers (Eilers.Stefan@epost.de)
- *
- * =====================================================================
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- * =====================================================================
- *
- * =====================================================================
- * Version: $Id$
- * =====================================================================
- * History:
- * $Log$
- * Revision 1.9 2003/09/22 14:31:16 eilers
- * Added first experimental incarnation of sql-backend for addressbook.
- * Some modifications to be able to compile the todo sql-backend.
- * A lot of changes fill follow...
- *
- * Revision 1.8 2003/08/30 15:28:26 eilers
- * Removed some unimportant debug output which causes slow down..
- *
- * Revision 1.7 2003/08/01 12:30:16 eilers
- * Merging changes from BRANCH_1_0 to HEAD
- *
- * Revision 1.6 2003/07/07 16:19:47 eilers
- * Fixing serious bug in hasQuerySettings()
- *
- * Revision 1.5 2003/04/13 18:07:10 zecke
- * More API doc
- * QString -> const QString&
- * QString = 0l -> QString::null
- *
- * Revision 1.4 2003/03/21 14:32:54 mickeyl
- * g++ compliance fix: default arguments belong into the declaration, but not the definition
- *
- * Revision 1.3 2003/03/21 12:26:28 eilers
- * Fixing small bug: If we search a birthday from today to today, it returned
- * every contact ..
- *
- * Revision 1.2 2003/03/21 10:33:09 eilers
- * Merged speed optimized xml backend for contacts to main.
- * Added QDateTime to querybyexample. For instance, it is now possible to get
- * all Birthdays/Anniversaries between two dates. This should be used
- * to show all birthdays in the datebook..
- * This change is sourcecode backward compatible but you have to upgrade
- * the binaries for today-addressbook.
- *
- * Revision 1.1.2.2 2003/02/11 12:17:28 eilers
- * Speed optimization. Removed the sequential search loops.
- *
- * Revision 1.1.2.1 2003/02/10 15:31:38 eilers
- * Writing offsets to debug output..
- *
- * Revision 1.1 2003/02/09 15:05:01 eilers
- * Nothing happened.. Just some cleanup before I will start..
- *
- * Revision 1.12 2003/01/03 16:58:03 eilers
- * Reenable debug output
- *
- * Revision 1.11 2003/01/03 12:31:28 eilers
- * Bugfix for calculating data diffs..
- *
- * Revision 1.10 2003/01/02 14:27:12 eilers
- * Improved query by example: Search by date is possible.. First step
- * for a today plugin for birthdays..
- *
- * Revision 1.9 2002/12/08 12:48:57 eilers
- * Moved journal-enum from ocontact into i the xml-backend..
- *
- * Revision 1.8 2002/11/14 17:04:24 eilers
- * Sorting will now work if fullname is identical on some entries
- *
- * Revision 1.7 2002/11/13 15:02:46 eilers
- * Small Bug in sorted fixed
- *
- * Revision 1.6 2002/11/13 14:14:51 eilers
- * Added sorted for Contacts..
- *
- * Revision 1.5 2002/11/01 15:10:42 eilers
- * Added regExp-search in database for all fields in a contact.
- *
- * Revision 1.4 2002/10/16 10:52:40 eilers
- * Added some docu to the interface and now using the cache infrastucture by zecke.. :)
- *
- * Revision 1.3 2002/10/14 16:21:54 eilers
- * Some minor interface updates
- *
- * Revision 1.2 2002/10/07 17:34:24 eilers
- * added OBackendFactory for advanced backend access
- *
- * Revision 1.1 2002/09/27 17:11:44 eilers
- * Added API for accessing the Contact-Database ! It is compiling, but
- * please do not expect that anything is working !
- * I will debug that stuff in the next time ..
- * Please read README_COMPILE for compiling !
- *
- *
*/
-#include "ocontactaccessbackend_xml.h"
+#include <opie2/ocontactaccessbackend_xml.h>
#include <qasciidict.h>
#include <qdatetime.h>
#include <qfile.h>
#include <qfileinfo.h>
#include <qregexp.h>
@@ -112,21 +41,22 @@
#include <qmap.h>
#include <qdatetime.h>
#include <qpe/global.h>
#include <opie/xmltree.h>
-#include "ocontactaccessbackend.h"
-#include "ocontactaccess.h"
+#include <opie2/ocontactaccessbackend.h>
+#include <opie2/ocontactaccess.h>
#include <stdlib.h>
#include <errno.h>
using namespace Opie;
+namespace Opie {
OContactAccessBackend_XML::OContactAccessBackend_XML ( const QString& appname, const QString& filename ):
m_changed( false )
{
// Just m_contactlist should call delete if an entry
// is removed.
m_contactList.setAutoDelete( true );
@@ -815,6 +745,7 @@ void OContactAccessBackend_XML::removeJournal()
{
QFile f ( m_journalName );
if ( f.exists() )
f.remove();
}
+}
diff --git a/libopie2/opiepim/backend/ocontactaccessbackend_xml.h b/libopie2/opiepim/backend/ocontactaccessbackend_xml.h
index a0cae4d..f439c4c 100644
--- a/libopie2/opiepim/backend/ocontactaccessbackend_xml.h
+++ b/libopie2/opiepim/backend/ocontactaccessbackend_xml.h
@@ -1,102 +1,48 @@
/*
+ This file is part of the Opie Project
+ Copyright (C) Stefan Eilers (Eilers.Stefan@epost.de)
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+/*
* XML Backend for the OPIE-Contact Database.
- *
- * Copyright (c) 2002 by Stefan Eilers (Eilers.Stefan@epost.de)
- *
- * =====================================================================
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- * =====================================================================
- * ToDo: XML-Backend: Automatic reload if something was changed...
- * File Locking to protect against concurrent access
- *
- *
- * =====================================================================
- * Version: $Id$
- * =====================================================================
- * History:
- * $Log$
- * Revision 1.15 2003/09/22 14:31:16 eilers
- * Added first experimental incarnation of sql-backend for addressbook.
- * Some modifications to be able to compile the todo sql-backend.
- * A lot of changes fill follow...
- *
- * Revision 1.14 2003/04/13 18:07:10 zecke
- * More API doc
- * QString -> const QString&
- * QString = 0l -> QString::null
- *
- * Revision 1.13 2003/03/21 10:33:09 eilers
- * Merged speed optimized xml backend for contacts to main.
- * Added QDateTime to querybyexample. For instance, it is now possible to get
- * all Birthdays/Anniversaries between two dates. This should be used
- * to show all birthdays in the datebook..
- * This change is sourcecode backward compatible but you have to upgrade
- * the binaries for today-addressbook.
- *
- * Revision 1.12.2.2 2003/02/11 12:17:28 eilers
- * Speed optimization. Removed the sequential search loops.
- *
- * Revision 1.12.2.1 2003/02/09 15:05:01 eilers
- * Nothing happened.. Just some cleanup before I will start..
- *
- * Revision 1.12 2003/01/03 16:58:03 eilers
- * Reenable debug output
- *
- * Revision 1.11 2003/01/03 12:31:28 eilers
- * Bugfix for calculating data diffs..
- *
- * Revision 1.10 2003/01/02 14:27:12 eilers
- * Improved query by example: Search by date is possible.. First step
- * for a today plugin for birthdays..
- *
- * Revision 1.9 2002/12/08 12:48:57 eilers
- * Moved journal-enum from ocontact into i the xml-backend..
- *
- * Revision 1.8 2002/11/14 17:04:24 eilers
- * Sorting will now work if fullname is identical on some entries
- *
- * Revision 1.7 2002/11/13 15:02:46 eilers
- * Small Bug in sorted fixed
- *
- * Revision 1.6 2002/11/13 14:14:51 eilers
- * Added sorted for Contacts..
- *
- * Revision 1.5 2002/11/01 15:10:42 eilers
- * Added regExp-search in database for all fields in a contact.
- *
- * Revision 1.4 2002/10/16 10:52:40 eilers
- * Added some docu to the interface and now using the cache infrastucture by zecke.. :)
- *
- * Revision 1.3 2002/10/14 16:21:54 eilers
- * Some minor interface updates
- *
- * Revision 1.2 2002/10/07 17:34:24 eilers
- * added OBackendFactory for advanced backend access
- *
- * Revision 1.1 2002/09/27 17:11:44 eilers
- * Added API for accessing the Contact-Database ! It is compiling, but
- * please do not expect that anything is working !
- * I will debug that stuff in the next time ..
- * Please read README_COMPILE for compiling !
- *
- *
*/
#ifndef _OContactAccessBackend_XML_
#define _OContactAccessBackend_XML_
-#include "ocontactaccessbackend.h"
-#include "ocontactaccess.h"
+#include <opie2/ocontactaccessbackend.h>
+#include <opie2/ocontactaccess.h>
#include <qlist.h>
#include <qdict.h>
+namespace Opie {
/* the default xml implementation */
/**
* This class is the XML implementation of a Contact backend
* it does implement everything available for OContact.
* @see OPimAccessBackend for more information of available methods
*/
@@ -154,7 +100,9 @@ class OContactAccessBackend_XML : public OContactAccessBackend {
QList<OContact> m_contactList;
QDateTime m_readtime;
QDict<OContact> m_uidToContact;
};
+}
+
#endif
diff --git a/libopie2/opiepim/backend/odatebookaccessbackend.cpp b/libopie2/opiepim/backend/odatebookaccessbackend.cpp
index f0c5d65..9bf4bf0 100644
--- a/libopie2/opiepim/backend/odatebookaccessbackend.cpp
+++ b/libopie2/opiepim/backend/odatebookaccessbackend.cpp
@@ -1,11 +1,41 @@
+/*
+ This file is part of the Opie Project
+ Copyright (C) Stefan Eilers (Eilers.Stefan@epost.de)
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
#include <qtl.h>
-#include "orecur.h"
+#include <opie2/orecur.h>
-#include "odatebookaccessbackend.h"
+#include <opie2/odatebookaccessbackend.h>
+
+using namespace Opie;
namespace {
/* a small helper to get all NonRepeating events for a range of time */
void events( OEffectiveEvent::ValueList& tmpList, const OEvent::ValueList& events,
const QDate& from, const QDate& to ) {
QDateTime dtStart, dtEnd;
@@ -116,12 +146,14 @@ namespace {
}
}
}
}
}
+namespace Opie {
+
ODateBookAccessBackend::ODateBookAccessBackend()
: OPimAccessBackend<OEvent>()
{
}
ODateBookAccessBackend::~ODateBookAccessBackend() {
@@ -177,6 +209,8 @@ OEffectiveEvent::ValueList ODateBookAccessBackend::effectiveNonRepeatingEvents(
if ( QABS(dt.secsTo(dtTmp) ) < 60 )
tmpList.append( (*it) );
}
return tmpList;
}
+
+}
diff --git a/libopie2/opiepim/backend/odatebookaccessbackend.h b/libopie2/opiepim/backend/odatebookaccessbackend.h
index 3472ab3..6853670 100644
--- a/libopie2/opiepim/backend/odatebookaccessbackend.h
+++ b/libopie2/opiepim/backend/odatebookaccessbackend.h
@@ -1,14 +1,43 @@
+/*
+ This file is part of the Opie Project
+ Copyright (C) Stefan Eilers (Eilers.Stefan@epost.de)
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
#ifndef OPIE_DATE_BOOK_ACCESS_BACKEND_H
#define OPIE_DATE_BOOK_ACCESS_BACKEND_H
#include <qarray.h>
-#include "opimaccessbackend.h"
-#include "oevent.h"
+#include <opie2/opimaccessbackend.h>
+#include <opie2/oevent.h>
+namespace Opie {
/**
* This class is the interface to the storage of Events.
* @see OPimAccessBackend
*
*/
class ODateBookAccessBackend : public OPimAccessBackend<OEvent> {
@@ -84,7 +113,9 @@ public:
private:
class Private;
Private *d;
};
+}
+
#endif
diff --git a/libopie2/opiepim/backend/odatebookaccessbackend_sql.cpp b/libopie2/opiepim/backend/odatebookaccessbackend_sql.cpp
index 756f405..e79696c 100644
--- a/libopie2/opiepim/backend/odatebookaccessbackend_sql.cpp
+++ b/libopie2/opiepim/backend/odatebookaccessbackend_sql.cpp
@@ -1,41 +1,37 @@
/*
+ This file is part of the Opie Project
+ Copyright (C) Stefan Eilers (Eilers.Stefan@epost.de)
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+/*
* SQL Backend for the OPIE-Calender Database.
*
- * Copyright (c) 2003 by Stefan Eilers (Eilers.Stefan@epost.de)
- *
- * =====================================================================
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- * =====================================================================
- * =====================================================================
- * Version: $Id$
- * =====================================================================
- * History:
- * $Log$
- * Revision 1.3 2003/12/22 11:41:39 eilers
- * Fixing stupid bug, found by sourcode review..
- *
- * Revision 1.2 2003/12/22 10:19:26 eilers
- * Finishing implementation of sql-backend for datebook. But I have to
- * port the PIM datebook application to use it, before I could debug the
- * whole stuff.
- * Thus, PIM-Database backend is finished, but highly experimental. And some
- * parts are still generic. For instance, the "queryByExample()" methods are
- * not (or not fully) implemented. Todo: custom-entries not stored.
- * The big show stopper: matchRegExp() (needed by OpieSearch) needs regular
- * expression search in the database, which is not supported by sqlite !
- * Therefore we need either an extended sqlite or a workaround which would
- * be very slow and memory consuming..
- *
- * Revision 1.1 2003/12/08 15:18:12 eilers
- * Committing unfinished sql implementation before merging to libopie2 starts..
- *
- *
*/
#include <stdio.h>
#include <stdlib.h>
#include <qarray.h>
@@ -44,15 +40,16 @@
#include <qpe/global.h>
#include <opie2/osqldriver.h>
#include <opie2/osqlmanager.h>
#include <opie2/osqlquery.h>
-#include "orecur.h"
-#include "odatebookaccessbackend_sql.h"
+#include <opie2/orecur.h>
+#include <opie2/odatebookaccessbackend_sql.h>
+namespace Opie {
ODateBookAccessBackend_SQL::ODateBookAccessBackend_SQL( const QString& ,
const QString& fileName )
: ODateBookAccessBackend(), m_driver( NULL )
{
@@ -362,6 +359,8 @@ QArray<int> ODateBookAccessBackend_SQL::extractUids( OSQLResult& res ) const
}
qWarning("extractUids ready: count2 = %d needs %d ms", i, t.elapsed() );
return ints;
}
+
+}
diff --git a/libopie2/opiepim/backend/odatebookaccessbackend_sql.h b/libopie2/opiepim/backend/odatebookaccessbackend_sql.h
index f39e154..89939ef 100644
--- a/libopie2/opiepim/backend/odatebookaccessbackend_sql.h
+++ b/libopie2/opiepim/backend/odatebookaccessbackend_sql.h
@@ -1,16 +1,45 @@
+/*
+ This file is part of the Opie Project
+ Copyright (C) Stefan Eilers (Eilers.Stefan@epost.de)
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
#ifndef OPIE_DATE_BOOK_ACCESS_BACKEND_SQL__H
#define OPIE_DATE_BOOK_ACCESS_BACKEND_SQL__H
#include <qmap.h>
#include <opie2/osqlresult.h>
-#include "odatebookaccessbackend.h"
+#include <opie2/odatebookaccessbackend.h>
class OSQLDriver;
+namespace Opie {
/**
* This is the default SQL implementation for DateBoook SQL storage
* It fully implements the interface
* @see ODateBookAccessBackend
* @see OPimAccessBackend
*/
@@ -56,7 +85,9 @@ private:
void initFields();
void update();
QArray<int> extractUids( OSQLResult& res ) const;
};
+}
+
#endif
diff --git a/libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp b/libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp
index 929d004..0ebda98 100644
--- a/libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp
+++ b/libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp
@@ -1,6 +1,34 @@
+/*
+ This file is part of the Opie Project
+ Copyright (C) Stefan Eilers (Eilers.Stefan@epost.de)
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
@@ -14,16 +42,18 @@
#include <qfile.h>
#include <qtopia/global.h>
#include <qtopia/stringutil.h>
#include <qtopia/timeconversion.h>
-#include "opimnotifymanager.h"
-#include "orecur.h"
-#include "otimezone.h"
-#include "odatebookaccessbackend_xml.h"
+#include <opie2/opimnotifymanager.h>
+#include <opie2/orecur.h>
+#include <opie2/otimezone.h>
+#include <opie2/odatebookaccessbackend_xml.h>
+
+using namespace Opie;
namespace {
// FROM TT again
char *strstrlen(const char *haystack, int hLen, const char* needle, int nLen)
{
char needleChar;
@@ -163,12 +193,13 @@ namespace {
return false;
}
return true;
}
}
+namespace Opie {
ODateBookAccessBackend_XML::ODateBookAccessBackend_XML( const QString& ,
const QString& fileName )
: ODateBookAccessBackend() {
m_name = fileName.isEmpty() ? Global::applicationFileName( "datebook", "datebook.xml" ) : fileName;
m_changed = false;
}
@@ -607,6 +638,8 @@ QArray<int> ODateBookAccessBackend_XML::matchRegexp( const QRegExp &r ) const
// Shrink to fit..
m_currentQuery.resize(arraycounter);
return m_currentQuery;
}
+
+}
diff --git a/libopie2/opiepim/backend/odatebookaccessbackend_xml.h b/libopie2/opiepim/backend/odatebookaccessbackend_xml.h
index a5cc0fc..29f5f4f 100644
--- a/libopie2/opiepim/backend/odatebookaccessbackend_xml.h
+++ b/libopie2/opiepim/backend/odatebookaccessbackend_xml.h
@@ -1,13 +1,42 @@
+/*
+ This file is part of the Opie Project
+ Copyright (C) Stefan Eilers (Eilers.Stefan@epost.de)
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
#ifndef OPIE_DATE_BOOK_ACCESS_BACKEND_XML__H
#define OPIE_DATE_BOOK_ACCESS_BACKEND_XML__H
#include <qmap.h>
-#include "odatebookaccessbackend.h"
+#include <opie2/odatebookaccessbackend.h>
+namespace Opie {
/**
* This is the default XML implementation for DateBoook XML storage
* It fully implements the interface
* @see ODateBookAccessBackend
* @see OPimAccessBackend
*/
@@ -49,7 +78,9 @@ private:
struct Data;
Data* data;
class Private;
Private *d;
};
+}
+
#endif
diff --git a/libopie2/opiepim/backend/opimaccessbackend.h b/libopie2/opiepim/backend/opimaccessbackend.h
index fd264fc..505358e 100644
--- a/libopie2/opiepim/backend/opimaccessbackend.h
+++ b/libopie2/opiepim/backend/opimaccessbackend.h
@@ -1,16 +1,45 @@
+/*
+ This file is part of the Opie Project
+ Copyright (C) The Main Author <main-author@whereever.org>
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
#ifndef OPIE_PIM_ACCESS_BACKEND
#define OPIE_PIM_ACCESS_BACKEND
#include <qarray.h>
#include <qdatetime.h>
-#include <opie/otemplatebase.h>
-#include <opie/opimrecord.h>
+#include <opie2/otemplatebase.h>
+#include <opie2/opimrecord.h>
+namespace Opie {
class OPimAccessBackendPrivate;
/**
* OPimAccessBackend is the base class
* for all private backends
* it operates on OPimRecord as the base class
* and it's responsible for fast manipulating
@@ -154,7 +183,10 @@ uint OPimAccessBackend<T>::readAhead()const {
return m_read;
}
template <class T>
int OPimAccessBackend<T>::access()const {
return m_acc;
}
+
+}
+
#endif
diff --git a/libopie2/opiepim/backend/otodoaccessbackend.cpp b/libopie2/opiepim/backend/otodoaccessbackend.cpp
index baaeecc..d27f5ef 100644
--- a/libopie2/opiepim/backend/otodoaccessbackend.cpp
+++ b/libopie2/opiepim/backend/otodoaccessbackend.cpp
@@ -1,10 +1,41 @@
+/*
+ This file is part of the Opie Project
+ Copyright (C) The Main Author <main-author@whereever.org>
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
-#include "otodoaccessbackend.h"
+#include <opie2/otodoaccessbackend.h>
+namespace Opie {
OTodoAccessBackend::OTodoAccessBackend()
: OPimAccessBackend<OTodo>()
{
}
OTodoAccessBackend::~OTodoAccessBackend() {
}
+
+}
diff --git a/libopie2/opiepim/backend/otodoaccessbackend.h b/libopie2/opiepim/backend/otodoaccessbackend.h
index 6be95bc..54b52cc 100644
--- a/libopie2/opiepim/backend/otodoaccessbackend.h
+++ b/libopie2/opiepim/backend/otodoaccessbackend.h
@@ -1,14 +1,43 @@
+/*
+ This file is part of the Opie Project
+ Copyright (C) The Main Author <main-author@whereever.org>
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
#ifndef OPIE_TODO_ACCESS_BACKEND_H
#define OPIE_TODO_ACCESS_BACKEND_H
#include <qbitarray.h>
-#include "otodo.h"
-#include "opimaccessbackend.h"
+#include <opie2/otodo.h>
+#include <opie2/opimaccessbackend.h>
+namespace Opie {
class OTodoAccessBackend : public OPimAccessBackend<OTodo> {
public:
OTodoAccessBackend();
~OTodoAccessBackend();
virtual QArray<int> effectiveToDos( const QDate& start,
const QDate& end,
@@ -22,7 +51,9 @@ public:
private:
class Private;
Private *d;
};
+}
+
#endif
diff --git a/libopie2/opiepim/backend/otodoaccesssql.cpp b/libopie2/opiepim/backend/otodoaccesssql.cpp
index 3764c7e..944f82a 100644
--- a/libopie2/opiepim/backend/otodoaccesssql.cpp
+++ b/libopie2/opiepim/backend/otodoaccesssql.cpp
@@ -1,21 +1,50 @@
+/*
+ This file is part of the Opie Project
+ Copyright (C) Stefan Eilers (Eilers.Stefan@epost.de)
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
#include <qdatetime.h>
#include <qpe/global.h>
#include <opie2/osqldriver.h>
#include <opie2/osqlresult.h>
#include <opie2/osqlmanager.h>
#include <opie2/osqlquery.h>
-#include "otodoaccesssql.h"
-#include "opimstate.h"
-#include "opimnotifymanager.h"
-#include "orecur.h"
+#include <opie2/otodoaccesssql.h>
+#include <opie2/opimstate.h>
+#include <opie2/opimnotifymanager.h>
+#include <opie2/orecur.h>
+using namespace Opie;
/*
* first some query
* CREATE query
* LOAD query
* INSERT
* REMOVE
@@ -295,12 +324,14 @@ namespace {
.arg(m_end. year() ).arg(m_end. month() ).arg(m_end.day() );
return str;
}
};
+
+namespace Opie {
OTodoAccessBackendSQL::OTodoAccessBackendSQL( const QString& file )
: OTodoAccessBackend(), m_dict(15), m_driver(NULL), m_dirty(true)
{
QString fi = file;
if ( fi.isEmpty() )
fi = Global::applicationFileName( "todolist", "todolist.db" );
@@ -688,6 +719,8 @@ QBitArray OTodoAccessBackendSQL::sup() const{
}
void OTodoAccessBackendSQL::removeAllCompleted(){
#warning OTodoAccessBackendSQL::removeAllCompleted() not implemented !!
}
+
+}
diff --git a/libopie2/opiepim/backend/otodoaccesssql.h b/libopie2/opiepim/backend/otodoaccesssql.h
index 1c55567..1a6f614 100644
--- a/libopie2/opiepim/backend/otodoaccesssql.h
+++ b/libopie2/opiepim/backend/otodoaccesssql.h
@@ -1,16 +1,47 @@
+/*
+ This file is part of the Opie Project
+ Copyright (C) Stefan Eilers (Eilers.Stefan@epost.de)
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
#ifndef OPIE_PIM_ACCESS_SQL_H
#define OPIE_PIM_ACCESS_SQL_H
#include <qasciidict.h>
-#include "otodoaccessbackend.h"
+#include <opie2/otodoaccessbackend.h>
class OSQLDriver;
class OSQLResult;
class OSQLResultItem;
+
+namespace Opie {
+
class OTodoAccessBackendSQL : public OTodoAccessBackend {
public:
OTodoAccessBackendSQL( const QString& file );
~OTodoAccessBackendSQL();
bool load();
@@ -49,8 +80,9 @@ private:
QAsciiDict<int> m_dict;
OSQLDriver* m_driver;
QArray<int> m_uids;
bool m_dirty : 1;
};
+}
#endif
diff --git a/libopie2/opiepim/backend/otodoaccessvcal.cpp b/libopie2/opiepim/backend/otodoaccessvcal.cpp
index 6415952..e364ee2 100644
--- a/libopie2/opiepim/backend/otodoaccessvcal.cpp
+++ b/libopie2/opiepim/backend/otodoaccessvcal.cpp
@@ -1,13 +1,43 @@
+/*
+ This file is part of the Opie Project
+ Copyright (C) Stefan Eilers (Eilers.Stefan@epost.de)
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
#include <qfile.h>
#include <qtopia/private/vobject_p.h>
#include <qtopia/timeconversion.h>
#include <qtopia/private/qfiledirect_p.h>
-#include "otodoaccessvcal.h"
+#include <opie2/otodoaccessvcal.h>
+
+using namespace Opie;
namespace {
static OTodo eventByVObj( VObject *obj ){
OTodo event;
VObject *ob;
QCString name;
@@ -104,12 +134,13 @@ namespace {
event.description().local8Bit() );
#endif
return task;
};
}
+namespace Opie {
OTodoAccessVCal::OTodoAccessVCal( const QString& path )
: m_dirty(false), m_file( path )
{
}
OTodoAccessVCal::~OTodoAccessVCal() {
}
@@ -244,6 +275,8 @@ QBitArray OTodoAccessVCal::sup() {
ar[OTodo::Progress] = false;
ar[OTodo::Alarms ] = false;
ar[OTodo::Recurrence] = false;
return ar;
}
+
+}
diff --git a/libopie2/opiepim/backend/otodoaccessvcal.h b/libopie2/opiepim/backend/otodoaccessvcal.h
index 2b17147..f9323fb 100644
--- a/libopie2/opiepim/backend/otodoaccessvcal.h
+++ b/libopie2/opiepim/backend/otodoaccessvcal.h
@@ -1,10 +1,40 @@
+/*
+ This file is part of the Opie Project
+ Copyright (C) Stefan Eilers (Eilers.Stefan@epost.de)
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
#ifndef OPIE_OTODO_ACCESS_VCAL_H
#define OPIE_OTODO_ACCESS_VCAL_H
-#include "otodoaccessbackend.h"
+#include <opie2/otodoaccessbackend.h>
+
+namespace Opie {
class OTodoAccessVCal : public OTodoAccessBackend {
public:
OTodoAccessVCal(const QString& );
~OTodoAccessVCal();
@@ -34,7 +64,9 @@ private:
static QBitArray sup();
bool m_dirty : 1;
QString m_file;
QMap<int, OTodo> m_map;
};
+}
+
#endif
diff --git a/libopie2/opiepim/backend/otodoaccessxml.cpp b/libopie2/opiepim/backend/otodoaccessxml.cpp
index 4a5cb33..2d50ecd 100644
--- a/libopie2/opiepim/backend/otodoaccessxml.cpp
+++ b/libopie2/opiepim/backend/otodoaccessxml.cpp
@@ -1,6 +1,34 @@
+/*
+ This file is part of the Opie Project
+ Copyright (C) Stefan Eilers (Eilers.Stefan@epost.de)
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
#include <errno.h>
#include <fcntl.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/types.h>
@@ -12,18 +40,20 @@
#include <qvector.h>
#include <qpe/global.h>
#include <qpe/stringutil.h>
#include <qpe/timeconversion.h>
-#include "oconversion.h"
-#include "opimstate.h"
-#include "otimezone.h"
-#include "opimnotifymanager.h"
-#include "orecur.h"
-#include "otodoaccessxml.h"
+#include <opie2/oconversion.h>
+#include <opie2/opimstate.h>
+#include <opie2/otimezone.h>
+#include <opie2/opimnotifymanager.h>
+#include <opie2/orecur.h>
+#include <opie2/otodoaccessxml.h>
+
+using namespace Opie;
namespace {
time_t rp_end;
ORecur* rec;
ORecur *recur() {
if (!rec ) rec = new ORecur;
@@ -63,12 +93,13 @@ char *strstrlen(const char *haystack, int hLen, const char* needle, int nLen)
hsearch--;
}
return ((char *)hsearch);
}
}
+namespace Opie {
OTodoAccessXML::OTodoAccessXML( const QString& appName,
const QString& fileName )
: OTodoAccessBackend(), m_app( appName ), m_opened( false ), m_changed( false )
{
if (!fileName.isEmpty() )
@@ -871,6 +902,8 @@ QArray<int> OTodoAccessXML::matchRegexp( const QRegExp &r ) const
}
// Shrink to fit..
m_currentQuery.resize(arraycounter);
return m_currentQuery;
}
+
+}
diff --git a/libopie2/opiepim/backend/otodoaccessxml.h b/libopie2/opiepim/backend/otodoaccessxml.h
index e4850a1..d634398 100644
--- a/libopie2/opiepim/backend/otodoaccessxml.h
+++ b/libopie2/opiepim/backend/otodoaccessxml.h
@@ -1,17 +1,44 @@
+/*
+ This file is part of the Opie Project
+ Copyright (C) Stefan Eilers (Eilers.Stefan@epost.de)
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
#ifndef OPIE_TODO_ACCESS_XML_H
#define OPIE_TODO_ACCESS_XML_H
#include <qasciidict.h>
#include <qmap.h>
-#include "otodoaccessbackend.h"
+#include <opie2/otodoaccessbackend.h>
namespace Opie {
class XMLElement;
-};
class OTodoAccessXML : public OTodoAccessBackend {
public:
/**
* fileName if Empty we will use the default path
*/
@@ -54,7 +81,9 @@ private:
class OTodoAccessXMLPrivate;
OTodoAccessXMLPrivate* d;
int m_year, m_month, m_day;
};
+};
+
#endif
diff --git a/libopie2/opiepim/core/core.pro b/libopie2/opiepim/core/core.pro
new file mode 100644
index 0000000..dae37f1
--- a/dev/null
+++ b/libopie2/opiepim/core/core.pro
@@ -0,0 +1,21 @@
+HEADERS += core/oconversion.h \
+ core/opimcache.h \
+ core/opimmaintainer.h \
+ core/opimresolver.h \
+ core/opimstate.h \
+ core/opimxref.h \
+ core/opimxrefmanager.h \
+ core/opimxrefpartner.h \
+ core/orecur.h \
+ core/otemplatebase.h \
+ core/otimezone.h \
+
+SOURCES += core/oconversion.cpp \
+ core/opimmaintainer.cpp \
+ core/opimresolver.cpp \
+ core/opimstate.cpp \
+ core/opimxref.cpp \
+ core/opimxrefmanager.cpp \
+ core/opimxrefpartner.cpp \
+ core/orecur.cpp \
+ core/otimezone.cpp \
diff --git a/libopie2/opiepim/core/ocontactaccess.cpp b/libopie2/opiepim/core/ocontactaccess.cpp
index 2e3ec1f..f67a40c 100644
--- a/libopie2/opiepim/core/ocontactaccess.cpp
+++ b/libopie2/opiepim/core/ocontactaccess.cpp
@@ -1,58 +1,39 @@
/*
- * Class to manage the Contacts.
- *
- * Copyright (c) 2002 by Stefan Eilers (Eilers.Stefan@epost.de)
- *
- * =====================================================================
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- * =====================================================================
- * Info: This class could just work with a change in the header-file
- * of the Contact class ! Therefore our libopie only compiles
- * with our version of libqpe
+ This file is part of the Opie Project
+ Copyright (C) The Main Author <main-author@whereever.org>
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+/*
* =====================================================================
* ToDo: XML-Backend: Automatic reload if something was changed...
*
*
- * =====================================================================
- * Version: $Id$
- * =====================================================================
- * History:
- * $Log$
- * Revision 1.8 2003/05/08 13:55:09 tille
- * search stuff
- * and match, toRichText & toShortText in oevent
- *
- * Revision 1.7 2002/11/13 14:14:51 eilers
- * Added sorted for Contacts..
- *
- * Revision 1.6 2002/11/01 15:10:42 eilers
- * Added regExp-search in database for all fields in a contact.
- *
- * Revision 1.5 2002/10/16 10:52:40 eilers
- * Added some docu to the interface and now using the cache infrastucture by zecke.. :)
- *
- * Revision 1.4 2002/10/14 16:21:54 eilers
- * Some minor interface updates
- *
- * Revision 1.3 2002/10/07 17:34:24 eilers
- * added OBackendFactory for advanced backend access
- *
- * Revision 1.2 2002/10/02 16:18:11 eilers
- * debugged and seems to work almost perfectly ..
- *
- * Revision 1.1 2002/09/27 17:11:44 eilers
- * Added API for accessing the Contact-Database ! It is compiling, but
- * please do not expect that anything is working !
- * I will debug that stuff in the next time ..
- * Please read README_COMPILE for compiling !
- *
- *
*/
#include "ocontactaccess.h"
#include "obackendfactory.h"
#include <qasciidict.h>
@@ -67,14 +48,15 @@
#include <errno.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
-#include "ocontactaccessbackend_xml.h"
+#include <opie2/ocontactaccessbackend_xml.h>
+namespace Opie {
OContactAccess::OContactAccess ( const QString appname, const QString ,
OContactAccessBackend* end, bool autosync ):
OPimAccessTemplate<OContact>( end )
{
/* take care of the backend. If there is no one defined, we
@@ -163,6 +145,8 @@ void OContactAccess::copMessage( const QCString &msg, const QByteArray & )
} else if ( msg == "reload()" ) {
qWarning ("OContactAccess: Received reload()");
reload ();
emit signalChanged ( this );
}
}
+
+}
diff --git a/libopie2/opiepim/core/ocontactaccess.h b/libopie2/opiepim/core/ocontactaccess.h
index bd6da40..505c87b 100644
--- a/libopie2/opiepim/core/ocontactaccess.h
+++ b/libopie2/opiepim/core/ocontactaccess.h
@@ -1,92 +1,54 @@
/*
- * Class to manage the Contacts.
- *
- * Copyright (c) 2002 by Stefan Eilers (Eilers.Stefan@epost.de)
- * Copyright (c) 2002 by Holger Freyther (zecke@handhelds.org)
- *
- * =====================================================================
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation;
- * either version 2 of the License, or (at your option) any later
- * version.
+ This file is part of the Opie Project
+ Copyright (C) The Main Author <main-author@whereever.org>
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+/*
* =====================================================================
* ToDo: Define enum for query settings
* =====================================================================
- * Version: $Id$
- * =====================================================================
- * History:
- * $Log$
- * Revision 1.10 2003/12/22 10:19:26 eilers
- * Finishing implementation of sql-backend for datebook. But I have to
- * port the PIM datebook application to use it, before I could debug the
- * whole stuff.
- * Thus, PIM-Database backend is finished, but highly experimental. And some
- * parts are still generic. For instance, the "queryByExample()" methods are
- * not (or not fully) implemented. Todo: custom-entries not stored.
- * The big show stopper: matchRegExp() (needed by OpieSearch) needs regular
- * expression search in the database, which is not supported by sqlite !
- * Therefore we need either an extended sqlite or a workaround which would
- * be very slow and memory consuming..
- *
- * Revision 1.9 2003/08/01 12:30:16 eilers
- * Merging changes from BRANCH_1_0 to HEAD
- *
- * Revision 1.8.2.1 2003/06/30 14:34:19 eilers
- * Patches from Zecke:
- * Fixing and cleaning up extraMap handling
- * Adding d_ptr for binary compatibility in the future
- *
- * Revision 1.8 2003/05/08 13:55:09 tille
- * search stuff
- * and match, toRichText & toShortText in oevent
- *
- * Revision 1.7 2003/04/13 18:07:10 zecke
- * More API doc
- * QString -> const QString&
- * QString = 0l -> QString::null
- *
- * Revision 1.6 2003/01/02 14:27:12 eilers
- * Improved query by example: Search by date is possible.. First step
- * for a today plugin for birthdays..
- *
- * Revision 1.5 2002/11/13 14:14:51 eilers
- * Added sorted for Contacts..
- *
- * Revision 1.4 2002/11/01 15:10:42 eilers
- * Added regExp-search in database for all fields in a contact.
- *
- * Revision 1.3 2002/10/16 10:52:40 eilers
- * Added some docu to the interface and now using the cache infrastucture by zecke.. :)
- *
- * Revision 1.2 2002/10/14 16:21:54 eilers
- * Some minor interface updates
- *
- * Revision 1.1 2002/09/27 17:11:44 eilers
- * Added API for accessing the Contact-Database ! It is compiling, but
- * please do not expect that anything is working !
- * I will debug that stuff in the next time ..
- * Please read README_COMPILE for compiling !
- *
- * =====================================================================
*/
#ifndef _OCONTACTACCESS_H
#define _OCONTACTACCESS_H
#include <qobject.h>
#include <qpe/qcopenvelope_qws.h>
#include <qvaluelist.h>
#include <qfileinfo.h>
-#include "ocontact.h"
-#include "ocontactaccessbackend.h"
-#include "opimaccesstemplate.h"
+#include <opie2/ocontact.h>
+#include <opie2/ocontactaccessbackend.h>
+#include <opie2/opimaccesstemplate.h>
+namespace Opie {
/**
* Class to access the contacts database.
* This is just a frontend for the real database handling which is
* done by the backend.
* This class is used to access the Contacts on a system. This class as any OPIE PIM
* class is backend independent.
@@ -187,7 +149,10 @@ class OContactAccess: public QObject, public OPimAccessTemplate<OContact>
private:
class Private;
Private *d;
};
+
+}
+
#endif
diff --git a/libopie2/opiepim/core/oconversion.cpp b/libopie2/opiepim/core/oconversion.cpp
index 0d15414..b7eebef 100644
--- a/libopie2/opiepim/core/oconversion.cpp
+++ b/libopie2/opiepim/core/oconversion.cpp
@@ -1,23 +1,41 @@
-/**********************************************************************
-** Copyright (C) 2003 by Stefan Eilers (eilers.stefan@epost.de)
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU Lesser General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-**********************************************************************/
-
-#include "oconversion.h"
+/*
+ This file is part of the Opie Project
+ Copyright (C) The Main Author <main-author@whereever.org>
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <opie2/oconversion.h>
#include <qpe/timeconversion.h>
+namespace Opie {
+
QString OConversion::dateToString( const QDate &d )
{
if ( d.isNull() || !d.isValid() )
return QString::null;
// ISO format in year, month, day (YYYYMMDD); e.g. 20021231
@@ -108,6 +126,7 @@ QDateTime OConversion::dateTimeFromString( const QString& str) {
QDate date( year, month, day );
QTime time( hour, min, sec );
QDateTime dt( date, time );
return dt;
}
+} \ No newline at end of file
diff --git a/libopie2/opiepim/core/oconversion.h b/libopie2/opiepim/core/oconversion.h
index 4c0a497..3c4fdf3 100644
--- a/libopie2/opiepim/core/oconversion.h
+++ b/libopie2/opiepim/core/oconversion.h
@@ -1,32 +1,44 @@
-/**********************************************************************
-** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
-** Copyright (C) 2002-2003 by Stefan Eilers (eilers.stefan@epost.de)
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**********************************************************************/
+/*
+ This file is part of the Opie Project
+ Copyright (C) The Main Author <main-author@whereever.org>
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
#ifndef __oconversion_h__
#define __oconversion_h__
/* #include <time.h> */
/* #include <sys/types.h> */
#include <qdatetime.h>
-/* FIXME namespace? -zecke */
+namespace Opie {
+
class OConversion
{
public:
static QString dateToString( const QDate &d );
static QDate dateFromString( const QString &datestr );
@@ -41,8 +53,10 @@ public:
private:
class Private;
Private* d;
};
+}
+
#endif // __oconversion_h__
diff --git a/libopie2/opiepim/core/odatebookaccess.cpp b/libopie2/opiepim/core/odatebookaccess.cpp
index d95fed6..8c527f6 100644
--- a/libopie2/opiepim/core/odatebookaccess.cpp
+++ b/libopie2/opiepim/core/odatebookaccess.cpp
@@ -1,9 +1,38 @@
-#include "obackendfactory.h"
-#include "odatebookaccess.h"
+/*
+ This file is part of the Opie Project
+ Copyright (C) Stefan Eilers (Eilers.Stefan@epost.de)
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+#include <opie2/obackendfactory.h>
+#include <opie2/odatebookaccess.h>
+namespace Opie {
/**
* Simple constructor
* It takes a ODateBookAccessBackend as parent. If it is 0 the default implementation
* will be used!
* @param back The backend to be used or 0 for the default backend
* @param ac What kind of access is intended
@@ -76,6 +105,8 @@ OEffectiveEvent::ValueList ODateBookAccess::effectiveNonRepeatingEvents( const Q
/**
* @return all non repeating events at a given datetime
*/
OEffectiveEvent::ValueList ODateBookAccess::effectiveNonRepeatingEvents( const QDateTime& start ) const {
return m_backEnd->effectiveNonRepeatingEvents( start );
}
+
+}
diff --git a/libopie2/opiepim/core/odatebookaccess.h b/libopie2/opiepim/core/odatebookaccess.h
index 62196da..38dc754 100644
--- a/libopie2/opiepim/core/odatebookaccess.h
+++ b/libopie2/opiepim/core/odatebookaccess.h
@@ -1,14 +1,43 @@
+/*
+ This file is part of the Opie Project
+ Copyright (C) Stefan Eilers (Eilers.Stefan@epost.de)
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
#ifndef OPIE_DATE_BOOK_ACCESS_H
#define OPIE_DATE_BOOK_ACCESS_H
#include "odatebookaccessbackend.h"
#include "opimaccesstemplate.h"
-#include "oevent.h"
+#include <opie2/oevent.h>
+namespace Opie {
/**
* This is the object orientated datebook database. It'll use OBackendFactory
* to query for a backend.
* All access to the datebook should be done via this class.
* Make sure to load and save the datebook this is not part of
* destructing and creating the object
@@ -38,7 +67,9 @@ public:
private:
ODateBookAccessBackend* m_backEnd;
class Private;
Private* d;
};
+}
+
#endif
diff --git a/libopie2/opiepim/core/opimaccesstemplate.h b/libopie2/opiepim/core/opimaccesstemplate.h
index ecbeb68..5826cbc 100644
--- a/libopie2/opiepim/core/opimaccesstemplate.h
+++ b/libopie2/opiepim/core/opimaccesstemplate.h
@@ -1,17 +1,47 @@
+/*
+ This file is part of the Opie Project
+ Copyright (C) The Main Author <main-author@whereever.org>
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
#ifndef OPIE_PIM_ACCESS_TEMPLATE_H
#define OPIE_PIM_ACCESS_TEMPLATE_H
#include <qarray.h>
-#include <opie/opimrecord.h>
-#include <opie/opimaccessbackend.h>
-#include <opie/orecordlist.h>
+#include <opie2/opimrecord.h>
+#include <opie2/opimaccessbackend.h>
+#include <opie2/orecordlist.h>
-#include "opimcache.h"
-#include "otemplatebase.h"
+#include <opie2/opimcache.h>
+#include <opie2/otemplatebase.h>
+
+namespace Opie {
class OPimAccessTemplatePrivate;
/**
* Thats the frontend to our OPIE PIM
* Library. Either you want to use it's
* interface or you want to implement
@@ -296,7 +326,10 @@ void OPimAccessTemplate<T>::setSaneCacheSize( int size ) {
m_cache.setSize( size );
}
template <class T>
void OPimAccessTemplate<T>::setReadAhead( uint count ) {
m_backEnd->setReadAhead( count );
}
+
+}
+
#endif
diff --git a/libopie2/opiepim/core/opimcache.h b/libopie2/opiepim/core/opimcache.h
index 7f7cff5..e70a910 100644
--- a/libopie2/opiepim/core/opimcache.h
+++ b/libopie2/opiepim/core/opimcache.h
@@ -1,13 +1,42 @@
+/*
+ This file is part of the Opie Project
+ Copyright (C) The Main Author <main-author@whereever.org>
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
#ifndef OPIE_PIM_CACHE_H
#define OPIE_PIM_CACHE_H
#include <qintcache.h>
-#include "opimrecord.h"
+#include <opie2/opimrecord.h>
+namespace Opie {
class OPimCacheItemPrivate;
template <class T = OPimRecord>
class OPimCacheItem {
public:
OPimCacheItem( const T& t = T() );
@@ -125,7 +154,9 @@ void OPimCache<T>::replace( const T& t) {
Item *it = m_cache.find( t.uid() );
if ( it ) {
it->setRecord( t );
}
}
+}
+
#endif
diff --git a/libopie2/opiepim/core/opimmaintainer.cpp b/libopie2/opiepim/core/opimmaintainer.cpp
index 92cb25a..b2eff12 100644
--- a/libopie2/opiepim/core/opimmaintainer.cpp
+++ b/libopie2/opiepim/core/opimmaintainer.cpp
@@ -1,8 +1,38 @@
-#include "opimmaintainer.h"
+/*
+ This file is part of the Opie Project
+ Copyright (C) The Main Author <main-author@whereever.org>
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+#include <opie2/opimmaintainer.h>
+
+namespace Opie {
OPimMaintainer::OPimMaintainer( int mode, int uid )
: m_mode(mode), m_uid(uid )
{}
OPimMaintainer::~OPimMaintainer() {
}
OPimMaintainer::OPimMaintainer( const OPimMaintainer& main ) {
@@ -32,6 +62,8 @@ int OPimMaintainer::uid()const {
void OPimMaintainer::setMode( int mo) {
m_mode = mo;
}
void OPimMaintainer::setUid( int uid ) {
m_uid = uid;
}
+
+}
diff --git a/libopie2/opiepim/core/opimmaintainer.h b/libopie2/opiepim/core/opimmaintainer.h
index 793d066..46bc9d2 100644
--- a/libopie2/opiepim/core/opimmaintainer.h
+++ b/libopie2/opiepim/core/opimmaintainer.h
@@ -1,11 +1,40 @@
+/*
+ This file is part of the Opie Project
+ Copyright (C) The Main Author <main-author@whereever.org>
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
#ifndef OPIE_PIM_MAINTAINER_H
#define OPIE_PIM_MAINTAINER_H
#include <qstring.h>
+namespace Opie {
/**
* Who maintains what?
*/
class OPimMaintainer {
public:
enum Mode { Undefined = -1,
@@ -34,7 +63,9 @@ private:
int m_uid;
class Private;
Private *d;
};
+}
+
#endif
diff --git a/libopie2/opiepim/core/opimnotify.cpp b/libopie2/opiepim/core/opimnotify.cpp
index af5514b..c61f9da 100644
--- a/libopie2/opiepim/core/opimnotify.cpp
+++ b/libopie2/opiepim/core/opimnotify.cpp
@@ -1,9 +1,39 @@
+/*
+ This file is part of the Opie Project
+ Copyright (C) The Main Author <main-author@whereever.org>
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
#include <qshared.h>
-#include "opimnotify.h"
+#include <opie2/opimnotify.h>
+
+namespace Opie {
struct OPimNotify::Data : public QShared {
Data() : QShared(),dur(-1),parent(0) {
}
QDateTime start;
@@ -222,6 +252,7 @@ void OPimReminder::copyIntern() {
if ( data->count != 1 ) {
Data* da = new Data;
da->record = data->record;
data = da;
}
}
+}
diff --git a/libopie2/opiepim/core/opimnotify.h b/libopie2/opiepim/core/opimnotify.h
index 58417db..fed3970 100644
--- a/libopie2/opiepim/core/opimnotify.h
+++ b/libopie2/opiepim/core/opimnotify.h
@@ -1,12 +1,42 @@
+/*
+ This file is part of the Opie Project
+ Copyright (C) The Main Author <main-author@whereever.org>
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
#ifndef OPIE_PIM_NOTIFY_H
#define OPIE_PIM_NOTIFY_H
#include <qdatetime.h>
#include <qvaluelist.h>
+
+namespace Opie {
/**
* This is the base class of Notifiers. Possible
* notifiers would be Alarms, Reminders
* What they share is that they have
* A DateTime, Type, Duration
* This is what this base class takes care of
@@ -138,7 +168,9 @@ private:
struct Data;
Data* data;
class Private;
Private *d;
};
+}
+
#endif
diff --git a/libopie2/opiepim/core/opimnotifymanager.cpp b/libopie2/opiepim/core/opimnotifymanager.cpp
index d6f0ead..1771fad 100644
--- a/libopie2/opiepim/core/opimnotifymanager.cpp
+++ b/libopie2/opiepim/core/opimnotifymanager.cpp
@@ -1,12 +1,42 @@
-#include "opimnotifymanager.h"
-
-#include "oconversion.h"
+/*
+ This file is part of the Opie Project
+ Copyright (C) The Main Author <main-author@whereever.org>
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+#include <opie2/opimnotifymanager.h>
+
+#include <opie2/oconversion.h>
#include <qstringlist.h>
+namespace Opie {
+
OPimNotifyManager::OPimNotifyManager( const Reminders& rem, const Alarms& al)
: m_rem( rem ), m_al( al )
{}
OPimNotifyManager::~OPimNotifyManager() {
}
/* use static_cast and type instead of dynamic... */
@@ -157,6 +187,7 @@ void OPimNotifyManager::remindersFromString( const QString& str )
for (QStringList::Iterator it = rems.begin(); it != rems.end(); ++it ) {
OPimReminder rem( (*it).toInt() );
add( rem );
}
}
+}
diff --git a/libopie2/opiepim/core/opimnotifymanager.h b/libopie2/opiepim/core/opimnotifymanager.h
index f3c22f9..0272e5d 100644
--- a/libopie2/opiepim/core/opimnotifymanager.h
+++ b/libopie2/opiepim/core/opimnotifymanager.h
@@ -1,13 +1,42 @@
+/*
+ This file is part of the Opie Project
+ Copyright (C) The Main Author <main-author@whereever.org>
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
#ifndef OPIE_PIM_NOTIFY_MANAGER_H
#define OPIE_PIM_NOTIFY_MANAGER_H
#include <qvaluelist.h>
-#include <opie/opimnotify.h>
+#include <opie2/opimnotify.h>
+namespace Opie {
/**
* The notify manager keeps track of the Notifiers....
*/
class OPimNotifyManager {
public:
typedef QValueList<OPimReminder> Reminders;
@@ -85,7 +114,9 @@ private:
class Private;
Private *d;
};
+}
+
#endif
diff --git a/libopie2/opiepim/core/opimrecord.cpp b/libopie2/opiepim/core/opimrecord.cpp
index 2365748..72bb372 100644
--- a/libopie2/opiepim/core/opimrecord.cpp
+++ b/libopie2/opiepim/core/opimrecord.cpp
@@ -1,13 +1,42 @@
+/*
+ This file is part of the Opie Project
+ Copyright (C) The Main Author <main-author@whereever.org>
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
#include <qarray.h>
#include <qpe/categories.h>
#include <qpe/categoryselect.h>
-#include "opimrecord.h"
+#include <opie2/opimrecord.h>
+namespace Opie {
Qtopia::UidGen OPimRecord::m_uidGen( Qtopia::UidGen::Qtopia );
OPimRecord::OPimRecord( int uid )
: Qtopia::Record() {
@@ -177,6 +206,8 @@ int OPimRecord::lastHitField()const{
QMap<QString, QString> OPimRecord::toExtraMap()const {
return customMap;
}
void OPimRecord::setExtraMap( const QMap<QString, QString>& map) {
customMap = map;
}
+
+}
diff --git a/libopie2/opiepim/core/opimrecord.h b/libopie2/opiepim/core/opimrecord.h
index 3d774e2..63a3a98 100644
--- a/libopie2/opiepim/core/opimrecord.h
+++ b/libopie2/opiepim/core/opimrecord.h
@@ -1,6 +1,34 @@
+/*
+ This file is part of the Opie Project
+ Copyright (C) The Main Author <main-author@whereever.org>
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
#ifndef OPIE_PIM_RECORD_H
#define OPIE_PIM_RECORD_H
#include <qdatastream.h>
#include <qmap.h>
#include <qstring.h>
@@ -10,14 +38,15 @@
* we need to get customMap which is private...
*/
#define private protected
#include <qpe/palmtoprecord.h>
#undef private
-#include <opie/opimxrefmanager.h>
+#include <opie2/opimxrefmanager.h>
+namespace Opie {
/**
* This is the base class for
* all PIM Records
*
*/
class OPimRecord : public Qtopia::Record {
@@ -150,9 +179,9 @@ private:
private:
void flush( const OPimXRefPartner&, QDataStream& stream )const;
OPimXRefPartner partner( QDataStream& );
};
-
+}
#endif
diff --git a/libopie2/opiepim/core/opimresolver.cpp b/libopie2/opiepim/core/opimresolver.cpp
index 4ebbd6e..eceabcb 100644
--- a/libopie2/opiepim/core/opimresolver.cpp
+++ b/libopie2/opiepim/core/opimresolver.cpp
@@ -1,15 +1,45 @@
+/*
+ This file is part of the Opie Project
+ Copyright (C) The Main Author <main-author@whereever.org>
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
#include <qcopchannel_qws.h>
#include <qpe/qcopenvelope_qws.h>
-#include "otodoaccess.h"
-#include "ocontactaccess.h"
+#include <opie2/otodoaccess.h>
+#include <opie2/ocontactaccess.h>
//#include "opimfactory.h"
-#include "opimresolver.h"
+#include <opie2/opimresolver.h>
+
+namespace Opie {
OPimResolver* OPimResolver::m_self = 0l;
OPimResolver::OPimResolver() {
/* the built in channels */
m_builtIns << "Todolist" << "Addressbook" << "Datebook";
@@ -193,6 +223,8 @@ OPimBase* OPimResolver::backend( int rtti ) {
// FIXME for 3rd party
if (!base )
;
return base;
}
+
+}
diff --git a/libopie2/opiepim/core/opimresolver.h b/libopie2/opiepim/core/opimresolver.h
index 1ce1619..adc7c16 100644
--- a/libopie2/opiepim/core/opimresolver.h
+++ b/libopie2/opiepim/core/opimresolver.h
@@ -1,14 +1,43 @@
+/*
+ This file is part of the Opie Project
+ Copyright (C) The Main Author <main-author@whereever.org>
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
#ifndef OPIE_PIM_RESOLVER
#define OPIE_PIM_RESOLVER
#include <qstring.h>
#include <qvaluelist.h>
-#include <opie/otemplatebase.h>
+#include <opie2/otemplatebase.h>
+namespace Opie {
/**
* OPimResolver is a MetaClass to access
* available backends read only.
* It will be used to resolve uids + app names
* to full informations
* to traverse through a list of alarms, reminders
@@ -84,7 +113,9 @@ private:
Data* data;
Private* d;
QStringList m_builtIns;
};
+}
+
#endif
diff --git a/libopie2/opiepim/core/opimstate.cpp b/libopie2/opiepim/core/opimstate.cpp
index 6fb2feb..1013a1c 100644
--- a/libopie2/opiepim/core/opimstate.cpp
+++ b/libopie2/opiepim/core/opimstate.cpp
@@ -1,10 +1,39 @@
+/*
+ This file is part of the Opie Project
+ Copyright (C) The Main Author <main-author@whereever.org>
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
#include <qshared.h>
#include "opimstate.h"
+namespace Opie {
/*
* for one int this does not make
* much sense but never the less
* we will do it for the future
*/
struct OPimState::Data : public QShared {
@@ -59,6 +88,8 @@ void OPimState::copyInternally() {
data->deref();
Data* d2 = new Data;
d2->state = data->state;
data = d2;
}
}
+
+}
diff --git a/libopie2/opiepim/core/opimstate.h b/libopie2/opiepim/core/opimstate.h
index cf6af46..78e8cd0 100644
--- a/libopie2/opiepim/core/opimstate.h
+++ b/libopie2/opiepim/core/opimstate.h
@@ -1,11 +1,40 @@
+/*
+ This file is part of the Opie Project
+ Copyright (C) The Main Author <main-author@whereever.org>
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
#ifndef OPIE_PIM_STATE_H
#define OPIE_PIM_STATE_H
#include <qstring.h>
+namespace Opie {
/**
* The State of a Task
* This class encapsules the state of a todo
* and it's shared too
*/
/*
@@ -39,8 +68,8 @@ private:
Data* data;
class Private;
Private *d;
};
-
+}
#endif
diff --git a/libopie2/opiepim/core/opimxref.cpp b/libopie2/opiepim/core/opimxref.cpp
index 8eefbd8..85d3345 100644
--- a/libopie2/opiepim/core/opimxref.cpp
+++ b/libopie2/opiepim/core/opimxref.cpp
@@ -1,7 +1,37 @@
-#include "opimxref.h"
+/*
+ This file is part of the Opie Project
+ Copyright (C) The Main Author <main-author@whereever.org>
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+#include <opie2/opimxref.h>
+
+namespace Opie {
OPimXRef::OPimXRef( const OPimXRefPartner& one, const OPimXRefPartner& two )
: m_partners(2)
{
m_partners[0] = one;
m_partners[1] = two;
@@ -42,6 +72,8 @@ bool OPimXRef::containsString( const QString& string ) const{
bool OPimXRef::containsUid( int uid ) const{
if ( m_partners[One].uid() == uid ||
m_partners[Two].uid() == uid ) return true;
return false;
}
+
+}
diff --git a/libopie2/opiepim/core/opimxref.h b/libopie2/opiepim/core/opimxref.h
index 6852651..820c9c4 100644
--- a/libopie2/opiepim/core/opimxref.h
+++ b/libopie2/opiepim/core/opimxref.h
@@ -1,14 +1,44 @@
+/*
+ This file is part of the Opie Project
+ Copyright (C) The Main Author <main-author@whereever.org>
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
#ifndef OPIM_XREF_H
#define OPIM_XREF_H
#include <qarray.h>
#include <qvaluelist.h>
-#include <opie/opimxrefpartner.h>
+#include <opie2/opimxrefpartner.h>
+namespace Opie {
/**
* this is a Cross Referecne between
* two Cross Reference Partners
*/
class OPimXRef {
public:
@@ -33,7 +63,9 @@ private:
QArray<OPimXRefPartner> m_partners;
class Private;
Private *d;
};
+}
+
#endif
diff --git a/libopie2/opiepim/core/opimxrefmanager.cpp b/libopie2/opiepim/core/opimxrefmanager.cpp
index 58bfd24..bf6fed6 100644
--- a/libopie2/opiepim/core/opimxrefmanager.cpp
+++ b/libopie2/opiepim/core/opimxrefmanager.cpp
@@ -1,8 +1,37 @@
-#include "opimxrefmanager.h"
+/*
+ This file is part of the Opie Project
+ Copyright (C) The Main Author <main-author@whereever.org>
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+#include <opie2/opimxrefmanager.h>
+namespace Opie {
OPimXRefManager::OPimXRefManager() {
}
OPimXRefManager::OPimXRefManager( const OPimXRefManager& ref) {
m_list = ref.m_list;
}
@@ -66,6 +95,8 @@ OPimXRef::ValueList OPimXRefManager::list( int uid )const {
if ( (*it).containsUid( uid ) )
list.append( (*it) );
}
return list;
}
+
+}
diff --git a/libopie2/opiepim/core/opimxrefmanager.h b/libopie2/opiepim/core/opimxrefmanager.h
index c485e98..fa2d7f4 100644
--- a/libopie2/opiepim/core/opimxrefmanager.h
+++ b/libopie2/opiepim/core/opimxrefmanager.h
@@ -1,13 +1,42 @@
+/*
+ This file is part of the Opie Project
+ Copyright (C) The Main Author <main-author@whereever.org>
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
#ifndef OPIM_XREF_MANAGER_H
#define OPIM_XREF_MANAGER_H
#include <qstringlist.h>
-#include <opie/opimxref.h>
+#include <opie2/opimxref.h>
+namespace Opie {
/**
* This is a simple manager for
* OPimXRefs.
* It allows addition, removing, replacing
* clearing and 'querying' the XRef...
*/
@@ -37,7 +66,9 @@ public:
private:
OPimXRef::ValueList m_list;
class Private;
Private *d;
};
+}
+
#endif
diff --git a/libopie2/opiepim/core/opimxrefpartner.cpp b/libopie2/opiepim/core/opimxrefpartner.cpp
index 6ef3efb..f6ccc7f 100644
--- a/libopie2/opiepim/core/opimxrefpartner.cpp
+++ b/libopie2/opiepim/core/opimxrefpartner.cpp
@@ -1,7 +1,37 @@
-#include "opimxrefpartner.h"
+/*
+ This file is part of the Opie Project
+ Copyright (C) The Main Author <main-author@whereever.org>
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+#include <opie2/opimxrefpartner.h>
+
+namespace Opie {
OPimXRefPartner::OPimXRefPartner( const QString& appName,
int uid, int field )
: m_app(appName), m_uid(uid), m_field( field ) {
}
OPimXRefPartner::OPimXRefPartner( const OPimXRefPartner& ref ) {
@@ -38,6 +68,8 @@ void OPimXRefPartner::setService( const QString& appName ) {
void OPimXRefPartner::setUid( int uid ) {
m_uid = uid;
}
void OPimXRefPartner::setField( int field ) {
m_field = field;
}
+
+}
diff --git a/libopie2/opiepim/core/opimxrefpartner.h b/libopie2/opiepim/core/opimxrefpartner.h
index d76e384..6853d5b 100644
--- a/libopie2/opiepim/core/opimxrefpartner.h
+++ b/libopie2/opiepim/core/opimxrefpartner.h
@@ -1,11 +1,40 @@
+/*
+ This file is part of the Opie Project
+ Copyright (C) The Main Author <main-author@whereever.org>
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
#ifndef OPIM_XREF_PARTNER_H
#define OPIM_XREF_PARTNER_H
#include <qstring.h>
+namespace Opie {
/**
* This class represents one partner
* of a Cross Reference.
* In Opie one application
* can link one uid
* with one tableId( fieldId ) to another.
@@ -33,8 +62,9 @@ private:
int m_field;
class Private;
Private* d;
};
+}
#endif
diff --git a/libopie2/opiepim/core/orecur.cpp b/libopie2/opiepim/core/orecur.cpp
index f46f22e..033f264 100644
--- a/libopie2/opiepim/core/orecur.cpp
+++ b/libopie2/opiepim/core/orecur.cpp
@@ -1,15 +1,45 @@
+/*
+ This file is part of the Opie Project
+ Copyright (C) The Main Author <main-author@whereever.org>
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
#include <time.h>
#include <qshared.h>
#include <qtopia/timeconversion.h>
-#include "otimezone.h"
-#include "orecur.h"
+#include <opie2/otimezone.h>
+#include <opie2/orecur.h>
+namespace Opie {
struct ORecur::Data : public QShared {
Data() : QShared() {
type = ORecur::NoRepeat;
freq = -1;
days = 0;
pos = 0;
@@ -588,6 +618,8 @@ void ORecur::fromMap( const QMap<int, QString>& map )
QStringList exceptList = QStringList::split( " ", exceptStr );
...
#endif
}
+
+} \ No newline at end of file
diff --git a/libopie2/opiepim/core/orecur.h b/libopie2/opiepim/core/orecur.h
index d7ecd90..60508f5 100644
--- a/libopie2/opiepim/core/orecur.h
+++ b/libopie2/opiepim/core/orecur.h
@@ -1,20 +1,46 @@
/*
- * GPL from TT
- */
+ This file is part of the Opie Project
+ Copyright (C) The Main Author <main-author@whereever.org>
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
#ifndef OPIE_RECUR_H
#define OPIE_RECUR_H
#include <sys/types.h>
#include <qdatetime.h>
#include <qvaluelist.h>
#include <qmap.h>
+namespace Opie {
/**
* Class to handle Recurrencies..
*/
class ORecur {
public:
@@ -101,7 +127,8 @@ private:
class Data;
Data* data;
class ORecurPrivate;
ORecurPrivate *d;
};
+}
#endif
diff --git a/libopie2/opiepim/core/otemplatebase.h b/libopie2/opiepim/core/otemplatebase.h
index cadac74..17d9961 100644
--- a/libopie2/opiepim/core/otemplatebase.h
+++ b/libopie2/opiepim/core/otemplatebase.h
@@ -1,14 +1,43 @@
+/*
+ This file is part of the Opie Project
+ Copyright (C) The Main Author <main-author@whereever.org>
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
#ifndef OPIE_TEMPLATE_BASE_H
#define OPIE_TEMPLATE_BASE_H
#include <qarray.h>
-#include <opie/opimrecord.h>
+#include <opie2/opimrecord.h>
+namespace Opie {
/**
* Templates do not have a base class, This is why
* we've this class
* this is here to give us the possibility
* to have a common base class
* You may not want to use that interface internaly
@@ -92,7 +121,9 @@ OPimRecord* OTemplateBase<T>::record(int uid )const {
};
template <class T>
T* OTemplateBase<T>::rec() {
return new T;
}
+}
+
#endif
diff --git a/libopie2/opiepim/core/otimezone.cpp b/libopie2/opiepim/core/otimezone.cpp
index 34659c3..dab68af 100644
--- a/libopie2/opiepim/core/otimezone.cpp
+++ b/libopie2/opiepim/core/otimezone.cpp
@@ -1,14 +1,43 @@
+/*
+ This file is part of the Opie Project
+ Copyright (C) The Main Author <main-author@whereever.org>
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
-#include "otimezone.h"
+#include <opie2/otimezone.h>
-namespace {
+namespace Opie {
QDateTime utcTime( time_t t) {
tm* broken = ::gmtime( &t );
QDateTime ret;
ret.setDate( QDate( broken->tm_year + 1900, broken->tm_mon +1, broken->tm_mday ) );
ret.setTime( QTime( broken->tm_hour, broken->tm_min, broken->tm_sec ) );
@@ -56,12 +85,14 @@ namespace {
#warning "Need a replacement for MacOSX!!"
time_t ti = ::mktime( &broken );
#endif
return ti;
}
}
+
+namespace Opie {
OTimeZone::OTimeZone( const ZoneName& zone )
: m_name(zone) {
}
OTimeZone::~OTimeZone() {
}
@@ -108,6 +139,8 @@ OTimeZone OTimeZone::current() {
OTimeZone OTimeZone::utc() {
return OTimeZone("UTC");
}
QString OTimeZone::timeZone()const {
return m_name;
}
+
+}
diff --git a/libopie2/opiepim/core/otimezone.h b/libopie2/opiepim/core/otimezone.h
index bb08349..28ae6cb 100644
--- a/libopie2/opiepim/core/otimezone.h
+++ b/libopie2/opiepim/core/otimezone.h
@@ -1,12 +1,43 @@
+/*
+ This file is part of the Opie Project
+ Copyright (C) The Main Author <main-author@whereever.org>
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
#ifndef OPIE_TIME_ZONE_H
#define OPIE_TIME_ZONE_H
#include <time.h>
#include <qdatetime.h>
+namespace Opie
+{
/**
* A very primitive class to convert time
* from one timezone to another
* and to localtime
* and time_t
*/
@@ -63,9 +94,9 @@ class OTimeZone {
QString timeZone()const;
private:
ZoneName m_name;
class Private;
Private* d;
};
-
+};
#endif
diff --git a/libopie2/opiepim/core/otodoaccess.cpp b/libopie2/opiepim/core/otodoaccess.cpp
index 37f6fbc..2a3695d 100644
--- a/libopie2/opiepim/core/otodoaccess.cpp
+++ b/libopie2/opiepim/core/otodoaccess.cpp
@@ -1,21 +1,50 @@
+/*
+ This file is part of the Opie Project
+ Copyright (C) The Main Author <main-author@whereever.org>
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
#include <qdatetime.h>
#include <qpe/alarmserver.h>
// #include "otodoaccesssql.h"
-#include "otodoaccess.h"
-#include "obackendfactory.h"
+#include <opie2/otodoaccess.h>
+#include <opie2/obackendfactory.h>
+namespace Opie {
OTodoAccess::OTodoAccess( OTodoAccessBackend* end, enum Access )
: QObject(), OPimAccessTemplate<OTodo>( end ), m_todoBackEnd( end )
{
// if (end == 0l )
// m_todoBackEnd = new OTodoAccessBackendSQL( QString::null);
- // Zecke: Du musst hier noch für das XML-Backend einen Appnamen übergeben !
+ // Zecke: Du musst hier noch fr das XML-Backend einen Appnamen bergeben !
if (end == 0l )
m_todoBackEnd = OBackendFactory<OTodoAccessBackend>::Default ("todo", QString::null);
setBackEnd( m_todoBackEnd );
}
OTodoAccess::~OTodoAccess() {
@@ -57,6 +86,8 @@ void OTodoAccess::removeAllCompleted() {
QBitArray OTodoAccess::backendSupport( const QString& ) const{
return m_todoBackEnd->supports();
}
bool OTodoAccess::backendSupports( int attr, const QString& ar) const{
return backendSupport(ar).testBit( attr );
}
+
+}
diff --git a/libopie2/opiepim/core/otodoaccess.h b/libopie2/opiepim/core/otodoaccess.h
index 916923f..e13d277 100644
--- a/libopie2/opiepim/core/otodoaccess.h
+++ b/libopie2/opiepim/core/otodoaccess.h
@@ -1,16 +1,45 @@
+/*
+ This file is part of the Opie Project
+ Copyright (C) The Main Author <main-author@whereever.org>
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
#ifndef OPIE_TODO_ACCESS_H
#define OPIE_TODO_ACCESS_H
#include <qobject.h>
#include <qvaluelist.h>
-#include "otodo.h"
-#include "otodoaccessbackend.h"
-#include "opimaccesstemplate.h"
+#include <opie2/otodo.h>
+#include <opie2/otodoaccessbackend.h>
+#include <opie2/opimaccesstemplate.h>
+namespace Opie {
/**
* OTodoAccess
* the class to get access to
* the todolist
*/
@@ -99,7 +128,9 @@ private:
int m_cat;
OTodoAccessBackend* m_todoBackEnd;
class OTodoAccessPrivate;
OTodoAccessPrivate* d;
};
+}
+
#endif
diff --git a/libopie2/opiepim/ocontact.cpp b/libopie2/opiepim/ocontact.cpp
index fcf3b26..f1a22a7 100644
--- a/libopie2/opiepim/ocontact.cpp
+++ b/libopie2/opiepim/ocontact.cpp
@@ -1,6 +1,35 @@
+/*
+ This file is part of the Opie Project
+ Copyright (C) The Main Author <main-author@whereever.org>
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
/**********************************************************************
** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
** Copyright (C) 2002-2003 by Stefan Eilers (eilers.stefan@epost.de)
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
@@ -16,15 +45,15 @@
** not clear to you.
**
**********************************************************************/
#define QTOPIA_INTERNAL_CONTACT_MRE
-#include "ocontact.h"
-#include "opimresolver.h"
-#include "oconversion.h"
+#include <opie2/ocontact.h>
+#include <opie2/opimresolver.h>
+#include <opie2/oconversion.h>
#include <qpe/stringutil.h>
#include <qpe/timestring.h>
#include <qpe/config.h>
#include <qobject.h>
@@ -44,12 +73,13 @@
\ingroup qtopiaemb
\ingroup qtopiadesktop
*/
+namespace Opie {
/*!
Creates a new, empty contact.
*/
OContact::OContact()
: OPimRecord(), mMap(), d( 0 )
{
@@ -1202,6 +1232,7 @@ int OContact::rtti() {
}
void OContact::setUid( int i )
{
OPimRecord::setUid(i);
replace( Qtopia::AddressUid , QString::number(i));
}
+}
diff --git a/libopie2/opiepim/ocontact.h b/libopie2/opiepim/ocontact.h
index 1d46b81..34888dc 100644
--- a/libopie2/opiepim/ocontact.h
+++ b/libopie2/opiepim/ocontact.h
@@ -1,40 +1,50 @@
-/**********************************************************************
-** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
-** Copyright (C) 2002-2003 by Stefan Eilers (eilers.stefan@epost.de)
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
+/*
+ This file is part of the Opie Project
+ Copyright (C) The Main Author <main-author@whereever.org>
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
#ifndef __OCONTACT_H__
#define __OCONTACT_H__
-#include <opie/opimrecord.h>
+#include <opie2/opimrecord.h>
#include <qpe/recordfields.h>
#include <qdatetime.h>
#include <qstringlist.h>
#if defined(QPC_TEMPLATEDLL)
// MOC_SKIP_BEGIN
QPC_TEMPLATEEXTERN template class QPC_EXPORT QMap<int, QString>;
// MOC_SKIP_END
#endif
+namespace Opie {
class OContactPrivate;
/**
* OContact class represents a specialised PIM Record for contacts.
* It does store all kind of persopn related information.
*
@@ -233,8 +243,9 @@ private:
const QString &country ) const;
QMap<int, QString> mMap;
OContactPrivate *d;
};
+}
#endif
diff --git a/libopie2/opiepim/ocontactfields.cpp b/libopie2/opiepim/ocontactfields.cpp
index 0f08a5a..deaa1e5 100644
--- a/libopie2/opiepim/ocontactfields.cpp
+++ b/libopie2/opiepim/ocontactfields.cpp
@@ -1,17 +1,46 @@
+/*
+ This file is part of the Opie Project
+ Copyright (C) The Main Author <main-author@whereever.org>
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
-#include "ocontactfields.h"
+#include <opie2/ocontactfields.h>
#include <qstringlist.h>
#include <qobject.h>
// We should use our own enum in the future ..
#include <qpe/recordfields.h>
#include <qpe/config.h>
-#include <opie/ocontact.h>
+#include <opie2/ocontact.h>
+namespace Opie {
/*!
\internal
Returns a list of personal field names for a contact.
*/
QStringList OContactFields::personalfields( bool sorted, bool translated )
{
@@ -472,6 +501,8 @@ int OContactFields::getFieldOrder( int num, int defIndex ){
qDebug("returning >%i<",ret);
return ret;
}
+
+}
diff --git a/libopie2/opiepim/ocontactfields.h b/libopie2/opiepim/ocontactfields.h
index f105de7..993ce3b 100644
--- a/libopie2/opiepim/ocontactfields.h
+++ b/libopie2/opiepim/ocontactfields.h
@@ -1,18 +1,47 @@
+/*
+ This file is part of the Opie Project
+ Copyright (C) The Main Author <main-author@whereever.org>
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
#ifndef OPIE_CONTACTS_FIELDS
#define OPIE_CONTACTS_FIELDS
class QStringList;
#include <qmap.h>
#include <qstring.h>
-#include <opie/ocontact.h>
+#include <opie2/ocontact.h>
#define CONTACT_FIELD_ORDER_NAME "opie-contactfield-order"
#define DEFAULT_FIELD_ORDER "__________"
+namespace Opie {
class OContactFields{
public:
OContactFields();
~OContactFields();
/** Set the index for combo boxes.
@@ -60,8 +89,8 @@ class OContactFields{
static QMap<int, QString> idToTrFields();
static QMap<QString, int> trFieldsToId();
static QMap<int, QString> idToUntrFields();
static QMap<QString, int> untrFieldsToId();
};
-
+}
#endif
diff --git a/libopie2/opiepim/oevent.cpp b/libopie2/opiepim/oevent.cpp
index 9b31957..de5e30b 100644
--- a/libopie2/opiepim/oevent.cpp
+++ b/libopie2/opiepim/oevent.cpp
@@ -1,18 +1,48 @@
+/*
+ This file is part of the Opie Project
+ Copyright (C) Stefan Eilers (Eilers.Stefan@epost.de)
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
#include <qshared.h>
#include <qarray.h>
#include <qpe/palmtopuidgen.h>
#include <qpe/categories.h>
#include <qpe/stringutil.h>
-#include "orecur.h"
-#include "opimresolver.h"
-#include "opimnotifymanager.h"
+#include <opie2/orecur.h>
+#include <opie2/opimresolver.h>
+#include <opie2/opimnotifymanager.h>
-#include "oevent.h"
+#include <opie2/oevent.h>
+
+namespace Opie {
int OCalendarHelper::week( const QDate& date) {
// Calculates the week this date is in within that
// month. Equals the "row" is is in in the month view
int week = 1;
QDate tmp( date.year(), date.month(), 1 );
@@ -712,6 +742,8 @@ bool OEffectiveEvent::operator!=( const OEffectiveEvent &e ) const {
bool OEffectiveEvent::operator>( const OEffectiveEvent &e ) const {
return !(*this <= e );
}
bool OEffectiveEvent::operator>= ( const OEffectiveEvent &e ) const {
return !(*this < e);
}
+
+}
diff --git a/libopie2/opiepim/oevent.h b/libopie2/opiepim/oevent.h
index 9eb948f..9502efa 100644
--- a/libopie2/opiepim/oevent.h
+++ b/libopie2/opiepim/oevent.h
@@ -1,21 +1,50 @@
+/*
+ This file is part of the Opie Project
+ Copyright (C) Stefan Eilers (Eilers.Stefan@epost.de)
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
// CONTAINS GPLed code of TT
#ifndef OPIE_PIM_EVENT_H
#define OPIE_PIM_EVENT_H
#include <qstring.h>
#include <qdatetime.h>
#include <qvaluelist.h>
#include <qpe/recordfields.h>
#include <qpe/palmtopuidgen.h>
-#include "otimezone.h"
-#include "opimrecord.h"
+#include <opie2/otimezone.h>
+#include <opie2/opimrecord.h>
+namespace Opie {
struct OCalendarHelper {
/** calculate the week number of the date */
static int week( const QDate& );
/** calculate the occurence of week days since the start of the month */
static int ocurrence( const QDate& );
@@ -230,7 +259,10 @@ private:
class Private;
Private* priv;
struct Data;
Data* data;
};
+
+}
+
#endif
diff --git a/libopie2/opiepim/opiepim.pro b/libopie2/opiepim/opiepim.pro
index 3972c3f..82737f4 100644
--- a/libopie2/opiepim/opiepim.pro
+++ b/libopie2/opiepim/opiepim.pro
@@ -1,24 +1,30 @@
TEMPLATE = lib
CONFIG += qt warn_on debug
DESTDIR = $(OPIEDIR)/lib
-HEADERS =
+HEADERS = ocontact.h ocontactfields.h opimrecord.h otodo.h opimnotify.h opimnotifymanager.h oevent.h
-SOURCES =
+SOURCES = ocontact.cpp ocontactfields.cpp opimrecord.cpp otodo.cpp opimnotify.cpp \
+ opimnotifymanager.cpp oevent.cpp
INTERFACES =
TARGET = opiepim2
VERSION = 1.8.2
INCLUDEPATH += $(OPIEDIR)/include
DEPENDPATH += $(OPIEDIR)/include
+include ( core/core.pro )
+include ( core/backends/backends.pro )
+include ( ui/ui.pro )
+
MOC_DIR = moc
OBJECTS_DIR = obj
!contains( platform, x11 ) {
include ( $(OPIEDIR)/include.pro )
}
contains( platform, x11 ) {
LIBS = -L$(OPIEDIR)/lib -Wl,-rpath,$(OPIEDIR)/lib
}
+LIBS += -lopiecore2
diff --git a/libopie2/opiepim/orecordlist.h b/libopie2/opiepim/orecordlist.h
index 5211f57..8f0011b 100644
--- a/libopie2/opiepim/orecordlist.h
+++ b/libopie2/opiepim/orecordlist.h
@@ -1,14 +1,44 @@
+/*
+ This file is part of the Opie Project
+ Copyright (C) The Main Author <main-author@whereever.org>
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
#ifndef OPIE_RECORD_LIST_H
#define OPIE_RECORD_LIST_H
#include <qarray.h>
-#include "otemplatebase.h"
-#include "opimrecord.h"
+#include <opie2/otemplatebase.h>
+#include <opie2/opimrecord.h>
+
+namespace Opie {
class ORecordListIteratorPrivate;
/**
* Our List Iterator
* it behaves like STL or Qt
*
@@ -299,8 +329,8 @@ bool ORecordList<T>::remove( int uid ) {
m_ids = copy;
return ret_val;
}
-
+}
#endif
diff --git a/libopie2/opiepim/otodo.cpp b/libopie2/opiepim/otodo.cpp
index 189bf94..3eb0026 100644
--- a/libopie2/opiepim/otodo.cpp
+++ b/libopie2/opiepim/otodo.cpp
@@ -1,7 +1,34 @@
-
+/*
+ This file is part of the Opie Project
+ Copyright (C) The Main Author <main-author@whereever.org>
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
#include <qobject.h>
#include <qshared.h>
#include <qpe/palmtopuidgen.h>
@@ -9,20 +36,21 @@
#include <qpe/palmtoprecord.h>
#include <qpe/stringutil.h>
#include <qpe/categories.h>
#include <qpe/categoryselect.h>
-#include "opimstate.h"
-#include "orecur.h"
-#include "opimmaintainer.h"
-#include "opimnotifymanager.h"
-#include "opimresolver.h"
+#include <opie2/opimstate.h>
+#include <opie2/orecur.h>
+#include <opie2/opimmaintainer.h>
+#include <opie2/opimnotifymanager.h>
+#include <opie2/opimresolver.h>
-#include "otodo.h"
+#include <opie2/otodo.h>
+namespace Opie {
struct OTodo::OTodoData : public QShared {
OTodoData() : QShared() {
recur = 0;
state = 0;
maintainer = 0;
@@ -515,6 +543,8 @@ QString OTodo::recordField(int /*id*/ )const {
return QString::null;
}
int OTodo::rtti(){
return OPimResolver::TodoList;
}
+
+}
diff --git a/libopie2/opiepim/otodo.h b/libopie2/opiepim/otodo.h
index 6df98b9..61add04 100644
--- a/libopie2/opiepim/otodo.h
+++ b/libopie2/opiepim/otodo.h
@@ -1,7 +1,34 @@
-
+/*
+ This file is part of the Opie Project
+ Copyright (C) The Main Author <main-author@whereever.org>
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
#ifndef OPIE_TODO_EVENT_H
#define OPIE_TODO_EVENT_H
#include <qarray.h>
#include <qmap.h>
@@ -10,14 +37,16 @@
#include <qdatetime.h>
#include <qvaluelist.h>
#include <qpe/recordfields.h>
#include <qpe/palmtopuidgen.h>
-#include <opie/opimrecord.h>
+#include <opie2/opimrecord.h>
+
+namespace Opie {
class OPimState;
class ORecur;
class OPimMaintainer;
class OPimNotifyManager;
class OTodo : public OPimRecord {
@@ -278,8 +307,9 @@ public:
};
inline bool OTodo::operator!=(const OTodo &toDoEvent )const {
return !(*this == toDoEvent);
}
+}
#endif
diff --git a/libopie2/opiepim/ui/opimmainwindow.cpp b/libopie2/opiepim/ui/opimmainwindow.cpp
index 2739e26..10ed743 100644
--- a/libopie2/opiepim/ui/opimmainwindow.cpp
+++ b/libopie2/opiepim/ui/opimmainwindow.cpp
@@ -1,17 +1,46 @@
+/*
+ This file is part of the Opie Project
+ Copyright (C) Stefan Eilers (Eilers.Stefan@epost.de)
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
#include <qapplication.h>
#include <qdatetime.h>
#include <qcopchannel_qws.h>
#include <qpe/sound.h>
#include <qpe/qcopenvelope_qws.h>
#include <qpe/qpeapplication.h>
-#include "opimresolver.h"
+#include <opie2/opimresolver.h>
#include "opimmainwindow.h"
+namespace Opie {
OPimMainWindow::OPimMainWindow( const QString& service, QWidget* parent,
const char* name, WFlags flag )
: QMainWindow( parent, name, flag ), m_rtti(-1), m_service( service ), m_fallBack(0l) {
/*
* let's generate our QCopChannel
@@ -145,6 +174,8 @@ void OPimMainWindow::timerEvent( QTimerEvent* e) {
m_playedCount++;
Sound::soundAlarm();
}else {
killTimer( e->timerId() );
}
}
+
+}
diff --git a/libopie2/opiepim/ui/opimmainwindow.h b/libopie2/opiepim/ui/opimmainwindow.h
index 855d364..abad630 100644
--- a/libopie2/opiepim/ui/opimmainwindow.h
+++ b/libopie2/opiepim/ui/opimmainwindow.h
@@ -1,13 +1,44 @@
+/*
+ This file is part of the Opie Project
+ Copyright (C) Stefan Eilers (Eilers.Stefan@epost.de)
+ =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
+ .=l.
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
#ifndef OPIE_PIM_MAINWINDOW_H
#define OPIE_PIM_MAINWINDOW_H
#include <qmainwindow.h>
-#include <opie/opimrecord.h>
+#include <opie2/opimrecord.h>
+class QCopChannel;
+class QDateTime;
+namespace Opie {
/**
* This is a common Opie PIM MainWindow
* it takes care of the QCOP internals
* and implements some functions
* for the URL scripting schema
*/
@@ -16,14 +47,12 @@
* do not work that good :(
* (Ok how to moc a template ;) )
* We will have the mainwindow which calls a struct which
* is normally reimplemented as a template ;)
*/
-class QCopChannel;
-class QDateTime;
class OPimMainWindow : public QMainWindow {
Q_OBJECT
public:
enum TransPort { BlueTooth=0,
IrDa };
@@ -92,8 +121,9 @@ private:
* because I need signal and slots -zecke
*/
virtual OPimRecord* record( int rtti, const QByteArray& ) ;
int service();
};
+}
#endif
diff --git a/libopie2/opiepim/ui/ui.pro b/libopie2/opiepim/ui/ui.pro
new file mode 100644
index 0000000..db19bca
--- a/dev/null
+++ b/libopie2/opiepim/ui/ui.pro
@@ -0,0 +1,3 @@
+HEADERS += ui/opimmainwindow.h
+
+SOURCES += ui/opimmainwindow.cpp