summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/backend
Side-by-side diff
Diffstat (limited to 'libopie2/opiepim/backend') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opiepim/backend/obackendfactory.h26
-rw-r--r--libopie2/opiepim/backend/ocontactaccessbackend.h30
-rw-r--r--libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp7
-rw-r--r--libopie2/opiepim/backend/ocontactaccessbackend_vcard.h12
-rw-r--r--libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp7
-rw-r--r--libopie2/opiepim/backend/ocontactaccessbackend_xml.h12
-rw-r--r--libopie2/opiepim/backend/odatebookaccessbackend.h45
-rw-r--r--libopie2/opiepim/backend/odatebookaccessbackend_xml.h6
8 files changed, 134 insertions, 11 deletions
diff --git a/libopie2/opiepim/backend/obackendfactory.h b/libopie2/opiepim/backend/obackendfactory.h
index 3a73210..ad6cf5a 100644
--- a/libopie2/opiepim/backend/obackendfactory.h
+++ b/libopie2/opiepim/backend/obackendfactory.h
@@ -18,2 +18,7 @@
* $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/02/21 23:31:52 zecke
@@ -65,3 +70,17 @@
-
+/**
+ * This class is our factory. It will give us the default implementations
+ * of at least Todolist, Contacts and Datebook. In the future this class will
+ * allow users to switch the backend with ( XML->SQLite ) without the need
+ * to recompile.#
+ * This class as the whole PIM Api is making use of templates
+ *
+ * <pre>
+ * OTodoAccessBackend* backend = OBackEndFactory<OTodoAccessBackend>::Default("todo", QString::null );
+ * backend->load();
+ * </pre>
+ *
+ * @author Stefan Eilers
+ * @version 0.1
+ */
template<class T>
@@ -78,2 +97,7 @@ class OBackendFactory
+ /**
+ * Returns a backend implementation for backendName
+ * @param backendName the type of the backend
+ * @param appName will be passed on to the backend
+ */
static T* Default( const QString backendName, const QString& appName ){
diff --git a/libopie2/opiepim/backend/ocontactaccessbackend.h b/libopie2/opiepim/backend/ocontactaccessbackend.h
index 821f5bf..ebeb42d 100644
--- a/libopie2/opiepim/backend/ocontactaccessbackend.h
+++ b/libopie2/opiepim/backend/ocontactaccessbackend.h
@@ -21,2 +21,7 @@
* $Log$
+ * 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
@@ -46,4 +51,14 @@
-#include "qregexp.h"
+#include <qregexp.h>
+/**
+ * This class represents the interface of all Contact Backends.
+ * Derivates of this class will be used to access the contacts.
+ * As implementation currently XML and vCard exist. This class needs to be implemented
+ * if you want to provide your own storage.
+ * In all queries a list of uids is passed on instead of loading the actual record!
+ *
+ * @see OContactAccessBackend_VCard
+ * @see OContactAccessBackend_XML
+ */
class OContactAccessBackend: public OPimAccessBackend<OContact> {
@@ -54,3 +69,4 @@ class OContactAccessBackend: public OPimAccessBackend<OContact> {
- /** Return if database was changed externally.
+ /**
+ * Return if database was changed externally.
* This may just make sense on file based databases like a XML-File.
@@ -70,3 +86,4 @@ class OContactAccessBackend: public OPimAccessBackend<OContact> {
- /** Return all possible settings.
+ /**
+ * Return all possible settings.
* @return All settings provided by the current backend
@@ -76,3 +93,4 @@ class OContactAccessBackend: public OPimAccessBackend<OContact> {
- /** Check whether settings are correct.
+ /**
+ * Check whether settings are correct.
* @return <i>true</i> if the given settings are correct and possible.
@@ -81,2 +99,6 @@ class OContactAccessBackend: public OPimAccessBackend<OContact> {
+ /**
+ * FIXME!!!
+ * Returns a sorted list of records either ascendinf or descending for a giving criteria and category
+ */
virtual QArray<int> sorted( bool ascending, int sortOrder, int sortFilter, int cat ) = 0;
diff --git a/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp b/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp
index f24523f..270bef3 100644
--- a/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp
+++ b/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp
@@ -19,2 +19,7 @@
* $Log$
+ * 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
@@ -78,3 +83,3 @@
-OContactAccessBackend_VCard::OContactAccessBackend_VCard ( QString , QString filename ):
+OContactAccessBackend_VCard::OContactAccessBackend_VCard ( const QString& , const QString& filename ):
m_dirty( false ),
diff --git a/libopie2/opiepim/backend/ocontactaccessbackend_vcard.h b/libopie2/opiepim/backend/ocontactaccessbackend_vcard.h
index 93e2da3..712d769 100644
--- a/libopie2/opiepim/backend/ocontactaccessbackend_vcard.h
+++ b/libopie2/opiepim/backend/ocontactaccessbackend_vcard.h
@@ -19,2 +19,7 @@
* $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
@@ -49,5 +54,10 @@ class VObject;
+/**
+ * This is the vCard 2.1 implementation of the Contact Storage
+ * @see OContactAccessBackend_XML
+ * @see OPimAccessBackend
+ */
class OContactAccessBackend_VCard : public OContactAccessBackend {
public:
- OContactAccessBackend_VCard ( QString appname, QString filename = 0l );
+ OContactAccessBackend_VCard ( const QString& appname, const QString& filename = QString::null );
diff --git a/libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp b/libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp
index c5a7820..661cd51 100644
--- a/libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp
+++ b/libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp
@@ -19,2 +19,7 @@
* $Log$
+ * 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
@@ -109,3 +114,3 @@ using namespace Opie;
-OContactAccessBackend_XML::OContactAccessBackend_XML ( QString appname, QString filename ):
+OContactAccessBackend_XML::OContactAccessBackend_XML ( const QString& appname, const QString& filename ):
m_changed( false )
diff --git a/libopie2/opiepim/backend/ocontactaccessbackend_xml.h b/libopie2/opiepim/backend/ocontactaccessbackend_xml.h
index 4d6a7ef..7b5365b 100644
--- a/libopie2/opiepim/backend/ocontactaccessbackend_xml.h
+++ b/libopie2/opiepim/backend/ocontactaccessbackend_xml.h
@@ -19,2 +19,7 @@
* $Log$
+ * 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
@@ -86,5 +91,10 @@
/* the default xml implementation */
+/**
+ * This class is the XML implementation of a Contact backend
+ * it does implement everything available for OContact.
+ * @see OPimAccessBackend for more information of available methods
+ */
class OContactAccessBackend_XML : public OContactAccessBackend {
public:
- OContactAccessBackend_XML ( QString appname, QString filename = 0l );
+ OContactAccessBackend_XML ( const QString& appname, const QString& filename = QString::null );
diff --git a/libopie2/opiepim/backend/odatebookaccessbackend.h b/libopie2/opiepim/backend/odatebookaccessbackend.h
index eb6e8fb..86ff298 100644
--- a/libopie2/opiepim/backend/odatebookaccessbackend.h
+++ b/libopie2/opiepim/backend/odatebookaccessbackend.h
@@ -8,2 +8,7 @@
+/**
+ * This class is the interface to the storage of Events.
+ * @see OPimAccessBackend
+ *
+ */
class ODateBookAccessBackend : public OPimAccessBackend<OEvent> {
@@ -11,2 +16,6 @@ public:
typedef int UID;
+
+ /**
+ * c'tor without parameter
+ */
ODateBookAccessBackend();
@@ -14,4 +23,21 @@ public:
+ /**
+ * This method should return a list of UIDs containing
+ * all events. No filter should be applied
+ * @return list of events
+ */
virtual QArray<UID> rawEvents()const = 0;
+
+ /**
+ * This method should return a list of UIDs containing
+ * all repeating events. No filter should be applied
+ * @return list of repeating events
+ */
virtual QArray<UID> rawRepeats()const = 0;
+
+ /**
+ * This mthod should return a list of UIDs containing all non
+ * repeating events. No filter should be applied
+ * @return list of nonrepeating events
+ */
virtual QArray<UID> nonRepeats() const = 0;
@@ -19,6 +45,11 @@ public:
/**
- * these two methods are used if you do not implement
- * effectiveEvents...
+ * If you do not want to implement the effectiveEvents methods below
+ * you need to supply it with directNonRepeats.
+ * This method can return empty lists if effectiveEvents is implememted
*/
virtual OEvent::ValueList directNonRepeats() = 0;
+
+ /**
+ * Same as above but return raw repeats!
+ */
virtual OEvent::ValueList directRawRepeats() = 0;
@@ -26,3 +57,13 @@ public:
/* is implemented by default but you can reimplement it*/
+ /**
+ * Effective Events are special event occuring during a time frame. This method does calcualte
+ * EffectiveEvents bases on the directNonRepeats and directRawRepeats. You may implement this method
+ * yourself
+ */
virtual OEffectiveEvent::ValueList effecticeEvents( const QDate& from, const QDate& to );
+
+ /**
+ * this is an overloaded member function
+ * @see effecticeEvents
+ */
virtual OEffectiveEvent::ValueList effecticeEvents( const QDateTime& start );
diff --git a/libopie2/opiepim/backend/odatebookaccessbackend_xml.h b/libopie2/opiepim/backend/odatebookaccessbackend_xml.h
index 563c31f..7848f7c 100644
--- a/libopie2/opiepim/backend/odatebookaccessbackend_xml.h
+++ b/libopie2/opiepim/backend/odatebookaccessbackend_xml.h
@@ -7,2 +7,8 @@
+/**
+ * This is the default XML implementation for DateBoook XML storage
+ * It fully implements the interface
+ * @see ODateBookAccessBackend
+ * @see OPimAccessBackend
+ */
class ODateBookAccessBackend_XML : public ODateBookAccessBackend {