summaryrefslogtreecommitdiffstats
path: root/kopete/plugins/nowlistening/nlxmms.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-12-13 06:26:27 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-12-13 06:26:27 +0000
commit9fab5b8a216e283e563f3457315715672bc8b55a (patch)
treec1251952e4e0e28fad0bca829d49335ff15b6e98 /kopete/plugins/nowlistening/nlxmms.cpp
parentbcb704366cb5e333a626c18c308c7e0448a8e69f (diff)
downloadtdenetwork-9fab5b8a216e283e563f3457315715672bc8b55a.tar.gz
tdenetwork-9fab5b8a216e283e563f3457315715672bc8b55a.zip
Update to Trinity 3.5.11
Will need to watch for commit warnings and rebuild test git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1061808 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kopete/plugins/nowlistening/nlxmms.cpp')
-rw-r--r--kopete/plugins/nowlistening/nlxmms.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/kopete/plugins/nowlistening/nlxmms.cpp b/kopete/plugins/nowlistening/nlxmms.cpp
index f0a9f47a..a2d3637d 100644
--- a/kopete/plugins/nowlistening/nlxmms.cpp
+++ b/kopete/plugins/nowlistening/nlxmms.cpp
@@ -24,6 +24,7 @@
#ifdef HAVE_XMMS
+#include <dlfcn.h>
#include <kdebug.h>
#include <xmmsctrl.h> // need to fix Makefile.am for this?
#include "nlmediaplayer.h"
@@ -32,13 +33,21 @@
NLXmms::NLXmms() : NLMediaPlayer()
{
m_name = "Xmms";
+
+ xmmslib = dlopen("libxmms.so.1", RTLD_LAZY | RTLD_GLOBAL);
}
+NLXmms::~NLXmms()
+{
+ if (xmmslib)
+ dlclose(xmmslib);
+}
void NLXmms::update()
{
//look for running xmms
- if ( xmms_remote_get_version( 0 ) )
+ if ( xmmslib &&
+ xmms_remote_get_version( 0 ) )
{
QString newTrack;
// see if it's playing