summaryrefslogtreecommitdiff
path: root/libresourceqt/src/resource-engine.cpp
diff options
context:
space:
mode:
authorWolf Bergenheim <ext-wolf.2.bergenheim@nokia.com>2010-02-15 08:56:30 +0200
committerWolf Bergenheim <ext-wolf.2.bergenheim@nokia.com>2010-02-15 08:56:30 +0200
commit5748ff8e81efa6f2b07aac9a023dbda2ca2cdd69 (patch)
tree39794cc6a210a042a9dc5a183f8a3620009d107e /libresourceqt/src/resource-engine.cpp
parentdade38119c9fdea35eb2f71cb4e5d43fd7c53a54 (diff)
downloadlibresourceqt-5748ff8e81efa6f2b07aac9a023dbda2ca2cdd69.tar.gz
Integrated Engine and Set and DBusQEventLoop together
Diffstat (limited to 'libresourceqt/src/resource-engine.cpp')
-rw-r--r--libresourceqt/src/resource-engine.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/libresourceqt/src/resource-engine.cpp b/libresourceqt/src/resource-engine.cpp
index bc29de9..4d877e3 100644
--- a/libresourceqt/src/resource-engine.cpp
+++ b/libresourceqt/src/resource-engine.cpp
@@ -14,8 +14,8 @@ static void handleAdviceMessage(resmsg_t *msg, resset_t *rs, void *data);
ResourceEngine::ResourceEngine(ResourceSet *resourceSet)
: QObject(resourceSet), connected(false), resourceSet(resourceSet),
- libresourceConnection(NULL), libresourceSet(NULL), requestId(0),
- messageMap(), mode(0)
+ dbusEngine(NULL), libresourceConnection(NULL), libresourceSet(NULL),
+ requestId(0), messageMap(), mode(0)
{
}
@@ -27,6 +27,9 @@ bool ResourceEngine::initialize()
{
DBusError dbusError;
DBusConnection *dbusConnection;
+ dbusEngine = new DBUSConnectionEventLoop;
+ if(dbusEngine == NULL)
+ return false;
dbus_error_init(&dbusError);
dbusConnection = dbus_bus_get(DBUS_BUS_SYSTEM, &dbusError);
@@ -36,6 +39,7 @@ bool ResourceEngine::initialize()
return false;
}
dbus_error_free(&dbusError);
+ dbusEngine->addConnection(dbusConnection);
libresourceConnection = resproto_init(RESPROTO_ROLE_CLIENT, RESPROTO_TRANSPORT_DBUS,
connectionIsUp, dbusConnection);
if (libresourceConnection == NULL) {