summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/core/ocontactaccess.cpp
Side-by-side diff
Diffstat (limited to 'libopie2/opiepim/core/ocontactaccess.cpp') (more/less context) (show 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 @@
*
* =====================================================================
* Version: $Id$
* =====================================================================
* History:
* $Log$
+ * 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 !
@@ -31,12 +34,13 @@
* Please read README_COMPILE for compiling !
*
*
*/
#include "ocontactaccess.h"
+#include "obackendfactory.h"
#include <qasciidict.h>
#include <qdatetime.h>
#include <qfile.h>
#include <qregexp.h>
#include <qlist.h>
@@ -50,22 +54,24 @@
#include <unistd.h>
#include <stdlib.h>
#include "ocontactaccessbackend_xml.h"
-OContactAccess::OContactAccess ( const QString appname, const QString filename,
+OContactAccess::OContactAccess ( const QString appname, const QString ,
OContactAccessBackend* end, bool autosync ):
OPimAccessTemplate<OContact>( end ),
m_changed ( false )
{
/* take care of the backend. If there is no one defined, we
* will use the XML-Backend as default (until we have a cute SQL-Backend..).
*/
if( end == 0 ) {
- end = new OContactAccessBackend_XML( appname, filename );
+ // __asm__("int3");
+ qWarning ("Using BackendFactory !");
+ end = OBackendFactory<OContactAccessBackend>::Default( "contact", appname );
}
// Set backend locally and in template
m_backEnd = end;
OPimAccessTemplate<OContact>::setBackEnd (end);