From 555e6179368fb2446c802041a01db4c9dad7db8f Mon Sep 17 00:00:00 2001 From: ulf69 Date: Fri, 06 Aug 2004 18:27:05 +0000 Subject: functionality now implemented by kabc resourceadapter --- diff --git a/pluginqtopiakabc/pluginqtopiakabcE.pro b/pluginqtopiakabc/pluginqtopiakabcE.pro deleted file mode 100644 index 3f40f9f..0000000 --- a/pluginqtopiakabc/pluginqtopiakabcE.pro +++ b/dev/null @@ -1,23 +0,0 @@ -TEMPLATE = lib -#TEMPLATE = app -CONFIG += qt warn_on release - -TARGET = qtopiakabc -OBJECTS_DIR = obj/$(PLATFORM) -MOC_DIR = moc -DESTDIR=$(QPEDIR)/plugins/korganizer -#DESTDIR=. -INCLUDEPATH += ../libkabcwrap $(QPEDIR)/include -DEFINES += -LIBS += -lmicrokabc -LIBS += $(QTOPIALIB) -LIBS += -lqpepim -LIBS += -lqpe - -HEADERS = \ - qtopiaaddressbookplugin.h \ - qtopiaaddressee.h - -SOURCES = \ - qtopiaaddressbookplugin.cpp \ - qtopiaaddressee.cpp diff --git a/pluginqtopiakabc/qtopiaaddressbookplugin.cpp b/pluginqtopiakabc/qtopiaaddressbookplugin.cpp deleted file mode 100644 index 59d7881..0000000 --- a/pluginqtopiakabc/qtopiaaddressbookplugin.cpp +++ b/dev/null @@ -1,57 +0,0 @@ -#include -#include -#include -#include -#include -#include "qtopiaaddressbookplugin.h" -#include "qtopiaaddressee.h" - -QtopiaAddressBookPlugin::QtopiaAddressBookPlugin() : ref(0) { - qDebug("QtopiaAddressBookPlugin::QtopiaAddressBookPlugin"); - access = new AddressBookAccess(); -} - -QtopiaAddressBookPlugin::~QtopiaAddressBookPlugin() { - qDebug("QtopiaAddressBookPlugin::~QtopiaAddressBookPlugin"); - delete &access; -} - -KABC::Addressee::List QtopiaAddressBookPlugin::getAddressees() { - - qDebug("Start: QtopiaAddressBookPlugin::getAddressees"); - - AddressBookIterator it(*access); - const PimContact *contact; - KABC::Addressee::List result; - - for (contact=it.toFirst(); it.current(); ++it) { - contact = it.current(); - result.append(QtopiaAddressee(*contact)); - } - - qDebug("End: QtopiaAddressBookPlugin::getAddressees"); - - return result; -} - -QString QtopiaAddressBookPlugin::name() { - return "Qtopia addressbook plugin"; -} - -QRESULT QtopiaAddressBookPlugin::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) -{ - *iface = 0; - if ( uuid == IID_QUnknown ) - *iface = this; - else if ( uuid == IID_KOAddressBookInterface ) - *iface = this; - if ( *iface ) - (*iface)->addRef(); - return QS_OK; -} - -Q_EXPORT_INTERFACE() -{ - Q_CREATE_INSTANCE( QtopiaAddressBookPlugin ) -} - diff --git a/pluginqtopiakabc/qtopiaaddressbookplugin.h b/pluginqtopiakabc/qtopiaaddressbookplugin.h deleted file mode 100644 index d197840..0000000 --- a/pluginqtopiakabc/qtopiaaddressbookplugin.h +++ b/dev/null @@ -1,24 +0,0 @@ -#ifndef QTOPIA_ADDRESS_BOOK_PLUGIN_H -#define QTOPIA_ADDRESS_BOOK_PLUGIN_H -#include -#include -#include - - -class QtopiaAddressBookPlugin : public KOAddressBookInterface { - - public: - QtopiaAddressBookPlugin(); - virtual ~QtopiaAddressBookPlugin(); - QString name(); - KABC::Addressee::List getAddressees(); - QRESULT queryInterface( const QUuid&, QUnknownInterface** ); - Q_REFCOUNT - - protected: - ulong ref; - private: - AddressBookAccess *access; -}; -#endif - diff --git a/pluginqtopiakabc/qtopiaaddressee.cpp b/pluginqtopiakabc/qtopiaaddressee.cpp deleted file mode 100644 index 3fe85e5..0000000 --- a/pluginqtopiakabc/qtopiaaddressee.cpp +++ b/dev/null @@ -1,20 +0,0 @@ -#include "qtopiaaddressee.h" - -QtopiaAddressee::QtopiaAddressee(const PimContact & pimContact) { - setPimContact(pimContact); -} - -QtopiaAddressee::QtopiaAddressee() { - empty = true; -} - -void QtopiaAddressee::setPimContact(const PimContact &pimContact) { - id = pimContact.defaultEmail(); - fName = pimContact.lastName() + ", " + pimContact.firstName(); - rName = pimContact.fullName(); - pEmail = pimContact.defaultEmail(); - empty = false; - mails.clear(); - mails = pimContact.emailList(); -} - diff --git a/pluginqtopiakabc/qtopiaaddressee.h b/pluginqtopiakabc/qtopiaaddressee.h deleted file mode 100644 index c86d6c0..0000000 --- a/pluginqtopiakabc/qtopiaaddressee.h +++ b/dev/null @@ -1,21 +0,0 @@ -#include -#include - -#ifndef QTOPIA_ADDRESSE_H -#define QTOPIA_ADDRESSE_H - -class QtopiaAddressee : public KABC::Addressee { - - public: - - QtopiaAddressee(const PimContact & pimContact); - QtopiaAddressee(); - void setPimContact(const PimContact & pimContact); - - private: - QString id; - bool empty; -}; - -#endif - -- cgit v0.9.0.2