summaryrefslogtreecommitdiffabout
path: root/kaddressbook/xxportobject.h
Side-by-side diff
Diffstat (limited to 'kaddressbook/xxportobject.h') (more/less context) (show whitespace changes)
-rw-r--r--kaddressbook/xxportobject.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/kaddressbook/xxportobject.h b/kaddressbook/xxportobject.h
index d547855..de39b9f 100644
--- a/kaddressbook/xxportobject.h
+++ b/kaddressbook/xxportobject.h
@@ -19,49 +19,49 @@
As a special exception, permission is given to link this program
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
/*
Enhanced Version of the file for platform independent KDE tools.
Copyright (c) 2004 Ulf Schenk
$Id$
*/
#ifndef XXPORTOBJECT_H
#define XXPORTOBJECT_H
#include <qobject.h>
#include <kabc/addressbook.h>
#include <kabc/addresseelist.h>
#include <kabc/resource.h>
#include <kxmlguiclient.h>
#include <klibloader.h>
-
+class KRES::Factory;
class XXPortObject : public QObject, virtual public KXMLGUIClient
{
Q_OBJECT
public:
XXPortObject( KABC::AddressBook *ab, QWidget *parent, const char *name = 0 );
~XXPortObject();
/**
Returns the unique identifier of this xxport modul, it should
be the lowercase name of the import/export format e.g. 'vcard'
*/
virtual QString identifier() const = 0;
/**
Reimplement this method if the XXPortManager shall
pass a sorted list to @ref exportContacts().
*/
virtual bool requiresSorting() const { return false; }
/**
Returns true if the XXPortObject can be used.
@@ -125,46 +125,51 @@ class XXPortObject : public QObject, virtual public KXMLGUIClient
private:
KABC::AddressBook *mAddressBook;
QWidget *mParentWidget;
class XXPortObjectPrivate;
XXPortObjectPrivate *d;
};
class XXPortResourceObject : public XXPortObject
{
Q_OBJECT
public:
XXPortResourceObject( KABC::AddressBook *ab, QWidget *parent, const char *name = 0 );
~XXPortResourceObject();
/**
Returns true if the XXPortObject can be used.
One case it can not be used is for example if a needed lib could not be loaded.
*/
virtual bool isAvailable();
+
+ protected:
+ bool _exportContacts( const KABC::AddresseeList &list, const QString& identifier, const QString& fileName );
+ KABC::AddresseeList _importContacts( const QString& identifier, const QString& fileName ) const;
+
protected:
- KABC::Resource* mResource;
+ KRES::Factory* mFactory;
};
class XXPortFactory : public KLibFactory
{
public:
virtual XXPortObject *xxportObject( KABC::AddressBook *ab, QWidget *parent,
const char *name = 0 ) = 0;
protected:
virtual QObject* createObject( QObject*, const char*, const char*,
const QStringList & )
{
return 0;
}
};
#endif