summaryrefslogtreecommitdiffabout
path: root/libkabcwrap/koaddresspluginloader.cpp
authorulf69 <ulf69>2004-08-06 18:30:46 (UTC)
committer ulf69 <ulf69>2004-08-06 18:30:46 (UTC)
commit8d905d7489f50210afde611138245ae2ee180f8f (patch) (side-by-side diff)
tree27ef58359afe49e2e4e35734cf8fbe679cd6ed9c /libkabcwrap/koaddresspluginloader.cpp
parent555e6179368fb2446c802041a01db4c9dad7db8f (diff)
downloadkdepimpi-8d905d7489f50210afde611138245ae2ee180f8f.zip
kdepimpi-8d905d7489f50210afde611138245ae2ee180f8f.tar.gz
kdepimpi-8d905d7489f50210afde611138245ae2ee180f8f.tar.bz2
functionality now implemented in kabc resource plugins
Diffstat (limited to 'libkabcwrap/koaddresspluginloader.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkabcwrap/koaddresspluginloader.cpp56
1 files changed, 0 insertions, 56 deletions
diff --git a/libkabcwrap/koaddresspluginloader.cpp b/libkabcwrap/koaddresspluginloader.cpp
deleted file mode 100644
index d329262..0000000
--- a/libkabcwrap/koaddresspluginloader.cpp
+++ b/dev/null
@@ -1,56 +0,0 @@
-#include <stdio.h>
-#include <qtopia/qlibrary.h>
-#include <qpe/qpeapplication.h>
-#include "koaddressbookpluginloader.h"
-#include "kabcaddressbookplugin.h"
-
-KOAddressBookInterface *KOAddressBookPluginLoader::iface = 0;
-KABC::Addressee::List KOAddressBookPluginLoader::addresseeList;
-
-KOAddressBookInterface *KOAddressBookPluginLoader::getInterface() {
-
- qDebug("Start: KOAddressBookPluginLoader::getInterface");
-
- if (!iface) {
-
- const QString & qpeDir = QPEApplication::qpeDir();
- QLibrary *lib = new QLibrary( qpeDir + "/plugins/korganizer/libopiekabc.so", QLibrary::Immediately );
- QRESULT q = lib->queryInterface( IID_QUnknown, (QUnknownInterface**)&iface );
- if ( q != QS_OK ) {
- lib = new QLibrary( qpeDir + "/plugins/korganizer/libqtopiakabc.so", QLibrary::Immediately );
- QRESULT q = lib->queryInterface( IID_QUnknown, (QUnknownInterface**)&iface );
- // we checked now for all known external interfaces. If no were found, use the default KABC interface
- if ( q != QS_OK ) {
- iface = new KABCAddressBookPlugin();
- }
- }
- }
-
- qDebug("End: KOAddressBookPluginLoader::getInterface");
- return iface;
-
-}
-
-KABC::Addressee::List KOAddressBookPluginLoader::getAddresseesFromPlugin() {
-
- qDebug("Start: KOAddressBookPluginLoader::getAddresseesFromPlugin");
- addresseeList.clear();
- if (!(addresseeList.count() > 0)) {
- qDebug("KOAddressBookPluginLoader::getAddresseesFromPlugin: no addresses loaded. Loading...");
- if (!iface) {
- qDebug("KOAddressBookPluginLoader::getAddresseesFromPlugin: no interface loaded. Loading...");
- iface = getInterface();
- }
- if (iface) {
- qDebug("KOAddressBookPluginLoader::getAddresseesFromPlugin: interface is " + iface->name());
- addresseeList = iface->getAddressees();
- } else {
- qDebug("KOAddressBookPluginLoader::getAddresseesFromPlugin: No interface found!");
- }
- }
-
-
- qDebug("End: KOAddressBookPluginLoader::getAddresseesFromPlugin");
- return addresseeList;
-
-}