--- a/src/dbus/qdbusconnection_p.h Tue Jan 26 12:42:25 2010 +0200
+++ b/src/dbus/qdbusconnection_p.h Tue Feb 02 00:43:10 2010 +0200
@@ -67,7 +67,7 @@
#include <QtCore/qvarlengtharray.h>
#include <QtCore/qvector.h>
-#include <qdbus_symbols_p.h>
+#include "qdbus_symbols_p.h"
#include <qdbusmessage.h>
@@ -123,6 +123,7 @@
QObject* obj;
int midx;
QList<int> params;
+ QStringList argumentMatch;
QByteArray matchRule;
};
@@ -154,6 +155,7 @@
typedef QMultiHash<QString, SignalHook> SignalHookHash;
typedef QHash<QString, QDBusMetaObject* > MetaObjectHash;
typedef QHash<QByteArray, int> MatchRefCountHash;
+ typedef QHash<QString, int> WatchedServicesHash;
public:
// public methods are entry points from other objects
@@ -175,8 +177,14 @@
QDBusPendingCallPrivate *sendWithReplyAsync(const QDBusMessage &message, int timeout = -1);
int sendWithReplyAsync(const QDBusMessage &message, QObject *receiver,
const char *returnMethod, const char *errorMethod, int timeout = -1);
+ bool connectSignal(const QString &service, const QString &owner, const QString &path, const QString& interface,
+ const QString &name, const QStringList &argumentMatch, const QString &signature,
+ QObject *receiver, const char *slot);
void connectSignal(const QString &key, const SignalHook &hook);
SignalHookHash::Iterator disconnectSignal(SignalHookHash::Iterator &it);
+ bool disconnectSignal(const QString &service, const QString &path, const QString& interface,
+ const QString &name, const QStringList &argumentMatch, const QString &signature,
+ QObject *receiver, const char *slot);
void registerObject(const ObjectTreeNode *node);
void connectRelay(const QString &service, const QString ¤tOwner,
const QString &path, const QString &interface,
@@ -191,9 +199,6 @@
QDBusMetaObject *findMetaObject(const QString &service, const QString &path,
const QString &interface, QDBusError &error);
- void registerService(const QString &serviceName);
- void unregisterService(const QString &serviceName);
-
void postEventToThread(int action, QObject *target, QEvent *event);
inline void serverConnection(const QDBusConnection &connection)
@@ -230,6 +235,8 @@
void objectDestroyed(QObject *o);
void relaySignal(QObject *obj, const QMetaObject *, int signalId, const QVariantList &args);
void _q_serviceOwnerChanged(const QString &name, const QString &oldOwner, const QString &newOwner);
+ void registerService(const QString &serviceName);
+ void unregisterService(const QString &serviceName);
signals:
void serviceOwnerChanged(const QString &name, const QString &oldOwner, const QString &newOwner);
@@ -264,6 +271,7 @@
QDBusError lastError;
QStringList serviceNames;
+ WatchedServicesHash watchedServiceNames;
SignalHookHash signalHooks;
MatchRefCountHash matchRefCounts;
ObjectTreeNode rootNode;
@@ -278,6 +286,7 @@
static bool prepareHook(QDBusConnectionPrivate::SignalHook &hook, QString &key,
const QString &service, const QString &owner,
const QString &path, const QString &interface, const QString &name,
+ const QStringList &argMatch,
QObject *receiver, const char *signal, int minMIdx,
bool buildSignature);
static DBusHandlerResult messageFilter(DBusConnection *, DBusMessage *, void *);