summaryrefslogtreecommitdiffabout
path: root/pluginqtopiakabc/qtopiaaddressbookplugin.cpp
authorulf69 <ulf69>2004-08-06 18:27:05 (UTC)
committer ulf69 <ulf69>2004-08-06 18:27:05 (UTC)
commit555e6179368fb2446c802041a01db4c9dad7db8f (patch) (unidiff)
tree92f270227cebb3e44420c9d73dc72500f8b7e4c8 /pluginqtopiakabc/qtopiaaddressbookplugin.cpp
parent79bb2950bd27b5e138d2fd7afe2ab37b6b036cae (diff)
downloadkdepimpi-555e6179368fb2446c802041a01db4c9dad7db8f.zip
kdepimpi-555e6179368fb2446c802041a01db4c9dad7db8f.tar.gz
kdepimpi-555e6179368fb2446c802041a01db4c9dad7db8f.tar.bz2
functionality now implemented by kabc resourceadapter
Diffstat (limited to 'pluginqtopiakabc/qtopiaaddressbookplugin.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--pluginqtopiakabc/qtopiaaddressbookplugin.cpp57
1 files changed, 0 insertions, 57 deletions
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 @@
1#include <qwidget.h>
2#include <qlayout.h>
3#include <qlistbox.h>
4#include <qpe/pim/contact.h>
5#include <select_addressee_base.h>
6#include "qtopiaaddressbookplugin.h"
7#include "qtopiaaddressee.h"
8
9QtopiaAddressBookPlugin::QtopiaAddressBookPlugin() : ref(0) {
10 qDebug("QtopiaAddressBookPlugin::QtopiaAddressBookPlugin");
11 access = new AddressBookAccess();
12}
13
14QtopiaAddressBookPlugin::~QtopiaAddressBookPlugin() {
15 qDebug("QtopiaAddressBookPlugin::~QtopiaAddressBookPlugin");
16 delete &access;
17}
18
19KABC::Addressee::List QtopiaAddressBookPlugin::getAddressees() {
20
21 qDebug("Start: QtopiaAddressBookPlugin::getAddressees");
22
23 AddressBookIterator it(*access);
24 const PimContact *contact;
25 KABC::Addressee::List result;
26
27 for (contact=it.toFirst(); it.current(); ++it) {
28 contact = it.current();
29 result.append(QtopiaAddressee(*contact));
30 }
31
32 qDebug("End: QtopiaAddressBookPlugin::getAddressees");
33
34 return result;
35}
36
37QString QtopiaAddressBookPlugin::name() {
38 return "Qtopia addressbook plugin";
39}
40
41QRESULT QtopiaAddressBookPlugin::queryInterface( const QUuid &uuid, QUnknownInterface **iface )
42{
43 *iface = 0;
44 if ( uuid == IID_QUnknown )
45 *iface = this;
46 else if ( uuid == IID_KOAddressBookInterface )
47 *iface = this;
48 if ( *iface )
49 (*iface)->addRef();
50 return QS_OK;
51}
52
53Q_EXPORT_INTERFACE()
54{
55 Q_CREATE_INSTANCE( QtopiaAddressBookPlugin )
56}
57