summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/backend/obackendfactory.h
Side-by-side diff
Diffstat (limited to 'libopie2/opiepim/backend/obackendfactory.h') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opiepim/backend/obackendfactory.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/libopie2/opiepim/backend/obackendfactory.h b/libopie2/opiepim/backend/obackendfactory.h
index 599fbf2..f11f029 100644
--- a/libopie2/opiepim/backend/obackendfactory.h
+++ b/libopie2/opiepim/backend/obackendfactory.h
@@ -13,12 +13,18 @@
* ToDo: Use plugins
* =====================================================================
* Version: $Id$
* =====================================================================
* History:
* $Log$
+ * 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
*
*
* =====================================================================
*/
@@ -28,14 +34,16 @@
#include <qstring.h>
#include <qasciidict.h>
#include <qpe/config.h>
#include "otodoaccessxml.h"
#include "ocontactaccessbackend_xml.h"
-#include "otodoaccesssql.h"
+#ifdef __USE_SQL
+#include "otodoaccesssql.h"
+#endif
template<class T>
class OBackendFactory
{
public:
OBackendFactory() {};
@@ -61,14 +69,19 @@ class OBackendFactory
qWarning ("TODO is: %d", TODO);
qWarning ("CONTACT is: %d", CONTACT);
switch ( *dict.take( backendName ) ){
case TODO:
+#ifdef __USE_SQL
if ( backend == "sql" )
return (T*) new OTodoAccessBackendSQL("");
+#else
+ if ( backend == "sql" )
+ qWarning ("OBackendFactory:: sql Backend not implemented! Using XML instead!");
+#endif
return (T*) new OTodoAccessXML( appName );
case CONTACT:
if ( backend == "sql" )
qWarning ("OBackendFactory:: sql Backend not implemented! Using XML instead!");