summaryrefslogtreecommitdiff
path: root/libdbus-qeventloop
diff options
context:
space:
mode:
authorWolf Bergenheim <ext-wolf.2.bergenheim@nokia.com>2010-02-09 12:18:44 +0200
committerWolf Bergenheim <ext-wolf.2.bergenheim@nokia.com>2010-02-09 12:18:44 +0200
commit910493fac3e328cef329ade5e8c1a71e136ca246 (patch)
tree1515ef7af8544692f70da623e15cc19b36faf588 /libdbus-qeventloop
parent381719b9a0adb8553a041633aed943f5ef48a1ff (diff)
parentae63c568711c128c64b1a94ef50e0af2ca91086b (diff)
Merge commit 'origin/master'
Diffstat (limited to 'libdbus-qeventloop')
-rw-r--r--libdbus-qeventloop/dbusconnectioneventloop.cpp2
-rw-r--r--libdbus-qeventloop/dbusconnectioneventloop.h27
2 files changed, 26 insertions, 3 deletions
diff --git a/libdbus-qeventloop/dbusconnectioneventloop.cpp b/libdbus-qeventloop/dbusconnectioneventloop.cpp
index 9d7a255..2c040b2 100644
--- a/libdbus-qeventloop/dbusconnectioneventloop.cpp
+++ b/libdbus-qeventloop/dbusconnectioneventloop.cpp
@@ -241,7 +241,7 @@ void DBUSConnectionEventLoop::wakeupMain(void *data)
}
// The initialization point
-bool DBUSConnectionEventLoop::initConnection(DBusConnection* conn)
+bool DBUSConnectionEventLoop::addConnection(DBusConnection* conn)
{
bool rc;
diff --git a/libdbus-qeventloop/dbusconnectioneventloop.h b/libdbus-qeventloop/dbusconnectioneventloop.h
index 6f8d8e7..993c5c1 100644
--- a/libdbus-qeventloop/dbusconnectioneventloop.h
+++ b/libdbus-qeventloop/dbusconnectioneventloop.h
@@ -41,6 +41,11 @@
class QSocketNotifier;
class QTimerEvent;
+/**
+* This class is handling dbus notifications with QT events. QEventLoop must
+* be handled in order to handle dbus events.
+* Usage: DBUSConnectionEventLoop myLoop; myLoop.addConnection(bus);
+*/
class DBUSConnectionEventLoop : public QObject
{
Q_OBJECT
@@ -52,8 +57,15 @@ public:
virtual ~DBUSConnectionEventLoop();
public:
- bool initConnection(DBusConnection* conn);
-
+ /**
+ * Add new dbus connection into handler.
+ * \return true if everything went well.
+ */
+ bool addConnection(DBusConnection* conn);
+
+ /**
+ * Helper class for dbus watcher
+ */
class Watcher
{
public:
@@ -68,8 +80,19 @@ public:
typedef QHash<int, DBusTimeout*> Timeouts;
typedef QList<DBusConnection*> Connections;
+ /**
+ * DBusWatcher objects
+ */
Watchers watchers;
+
+ /**
+ * DBusTimeout objects
+ */
Timeouts timeouts;
+
+ /**
+ * DBusConnection objects
+ */
Connections connections;
public slots: