summaryrefslogtreecommitdiff
path: root/libopie/pim/obackendfactory.h
authoreilers <eilers>2002-10-08 09:27:36 (UTC)
committer eilers <eilers>2002-10-08 09:27:36 (UTC)
commit21766cbcf4b4ca84da82a83f1b87d1366e75dd86 (patch) (unidiff)
tree864f72273936128dd3db596e9e535165bf60a7fd /libopie/pim/obackendfactory.h
parentf4559c166ae156b14a6cae518ede0496e83dad49 (diff)
downloadopie-21766cbcf4b4ca84da82a83f1b87d1366e75dd86.zip
opie-21766cbcf4b4ca84da82a83f1b87d1366e75dd86.tar.gz
opie-21766cbcf4b4ca84da82a83f1b87d1366e75dd86.tar.bz2
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..
Diffstat (limited to 'libopie/pim/obackendfactory.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/pim/obackendfactory.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/libopie/pim/obackendfactory.h b/libopie/pim/obackendfactory.h
index 599fbf2..f11f029 100644
--- a/libopie/pim/obackendfactory.h
+++ b/libopie/pim/obackendfactory.h
@@ -16,6 +16,12 @@
16 * ===================================================================== 16 * =====================================================================
17 * History: 17 * History:
18 * $Log$ 18 * $Log$
19 * Revision 1.2 2002/10/08 09:27:36 eilers
20 * Fixed libopie.pro to include the new pim-API.
21 * The SQL-Stuff is currently deactivated. Otherwise everyone who wants to
22 * compile itself would need to install libsqlite, libopiesql...
23 * Therefore, the backend currently uses XML only..
24 *
19 * Revision 1.1 2002/10/07 17:35:01 eilers 25 * Revision 1.1 2002/10/07 17:35:01 eilers
20 * added OBackendFactory for advanced backend access 26 * added OBackendFactory for advanced backend access
21 * 27 *
@@ -31,8 +37,10 @@
31 37
32#include "otodoaccessxml.h" 38#include "otodoaccessxml.h"
33#include "ocontactaccessbackend_xml.h" 39#include "ocontactaccessbackend_xml.h"
34#include "otodoaccesssql.h"
35 40
41#ifdef __USE_SQL
42#include "otodoaccesssql.h"
43#endif
36 44
37template<class T> 45template<class T>
38class OBackendFactory 46class OBackendFactory
@@ -64,9 +72,14 @@ class OBackendFactory
64 72
65 switch ( *dict.take( backendName ) ){ 73 switch ( *dict.take( backendName ) ){
66 case TODO: 74 case TODO:
75#ifdef __USE_SQL
67 if ( backend == "sql" ) 76 if ( backend == "sql" )
68 return (T*) new OTodoAccessBackendSQL(""); 77 return (T*) new OTodoAccessBackendSQL("");
69 78#else
79 if ( backend == "sql" )
80 qWarning ("OBackendFactory:: sql Backend not implemented! Using XML instead!");
81#endif
82
70 return (T*) new OTodoAccessXML( appName ); 83 return (T*) new OTodoAccessXML( appName );
71 case CONTACT: 84 case CONTACT:
72 if ( backend == "sql" ) 85 if ( backend == "sql" )