summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/core/ocontactaccess.cpp
Unidiff
Diffstat (limited to 'libopie2/opiepim/core/ocontactaccess.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/core/ocontactaccess.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/libopie2/opiepim/core/ocontactaccess.cpp b/libopie2/opiepim/core/ocontactaccess.cpp
index 8a8ff08..b5f358b 100644
--- a/libopie2/opiepim/core/ocontactaccess.cpp
+++ b/libopie2/opiepim/core/ocontactaccess.cpp
@@ -18,12 +18,15 @@
18 * 18 *
19 * ===================================================================== 19 * =====================================================================
20 * Version: $Id$ 20 * Version: $Id$
21 * ===================================================================== 21 * =====================================================================
22 * History: 22 * History:
23 * $Log$ 23 * $Log$
24 * Revision 1.3 2002/10/07 17:34:24 eilers
25 * added OBackendFactory for advanced backend access
26 *
24 * Revision 1.2 2002/10/02 16:18:11 eilers 27 * Revision 1.2 2002/10/02 16:18:11 eilers
25 * debugged and seems to work almost perfectly .. 28 * debugged and seems to work almost perfectly ..
26 * 29 *
27 * Revision 1.1 2002/09/27 17:11:44 eilers 30 * Revision 1.1 2002/09/27 17:11:44 eilers
28 * Added API for accessing the Contact-Database ! It is compiling, but 31 * Added API for accessing the Contact-Database ! It is compiling, but
29 * please do not expect that anything is working ! 32 * please do not expect that anything is working !
@@ -31,12 +34,13 @@
31 * Please read README_COMPILE for compiling ! 34 * Please read README_COMPILE for compiling !
32 * 35 *
33 * 36 *
34 */ 37 */
35 38
36#include "ocontactaccess.h" 39#include "ocontactaccess.h"
40#include "obackendfactory.h"
37 41
38#include <qasciidict.h> 42#include <qasciidict.h>
39#include <qdatetime.h> 43#include <qdatetime.h>
40#include <qfile.h> 44#include <qfile.h>
41#include <qregexp.h> 45#include <qregexp.h>
42#include <qlist.h> 46#include <qlist.h>
@@ -50,22 +54,24 @@
50#include <unistd.h> 54#include <unistd.h>
51#include <stdlib.h> 55#include <stdlib.h>
52 56
53#include "ocontactaccessbackend_xml.h" 57#include "ocontactaccessbackend_xml.h"
54 58
55 59
56OContactAccess::OContactAccess ( const QString appname, const QString filename, 60OContactAccess::OContactAccess ( const QString appname, const QString ,
57 OContactAccessBackend* end, bool autosync ): 61 OContactAccessBackend* end, bool autosync ):
58 OPimAccessTemplate<OContact>( end ), 62 OPimAccessTemplate<OContact>( end ),
59 m_changed ( false ) 63 m_changed ( false )
60{ 64{
61 /* take care of the backend. If there is no one defined, we 65 /* take care of the backend. If there is no one defined, we
62 * will use the XML-Backend as default (until we have a cute SQL-Backend..). 66 * will use the XML-Backend as default (until we have a cute SQL-Backend..).
63 */ 67 */
64 if( end == 0 ) { 68 if( end == 0 ) {
65 end = new OContactAccessBackend_XML( appname, filename ); 69 // __asm__("int3");
70 qWarning ("Using BackendFactory !");
71 end = OBackendFactory<OContactAccessBackend>::Default( "contact", appname );
66 } 72 }
67 // Set backend locally and in template 73 // Set backend locally and in template
68 m_backEnd = end; 74 m_backEnd = end;
69 OPimAccessTemplate<OContact>::setBackEnd (end); 75 OPimAccessTemplate<OContact>::setBackEnd (end);
70 76
71 77