aboutsummaryrefslogtreecommitdiff
path: root/libqmenumodel/src/qdbusobject.h
diff options
context:
space:
mode:
Diffstat (limited to 'libqmenumodel/src/qdbusobject.h')
-rw-r--r--libqmenumodel/src/qdbusobject.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/libqmenumodel/src/qdbusobject.h b/libqmenumodel/src/qdbusobject.h
index 324d3fd..747a7fc 100644
--- a/libqmenumodel/src/qdbusobject.h
+++ b/libqmenumodel/src/qdbusobject.h
@@ -21,6 +21,7 @@
#define QDBUSOBJECT_H
#include <QString>
+#include <QEvent>
#include "dbus-enums.h"
@@ -32,7 +33,7 @@ typedef struct _GDBusConnection GDBusConnection;
class QDBusObject
{
public:
- QDBusObject();
+ QDBusObject(QObject* listener);
~QDBusObject();
DBusEnums::BusType busType() const;
@@ -59,7 +60,10 @@ protected:
virtual void objectPathChanged(const QString &objectPath) = 0;
virtual void statusChanged(DBusEnums::ConnectionStatus status) = 0;
+ virtual bool event(QEvent* e);
+
private:
+ QObject* m_listener;
guint m_watchId;
DBusEnums::BusType m_busType;
QString m_busName;
@@ -73,4 +77,15 @@ private:
static void onServiceVanished(GDBusConnection *connection, const gchar *name, gpointer data);
};
+class DbusObjectServiceEvent : public QEvent
+{
+public:
+ static const QEvent::Type eventType;
+ DbusObjectServiceEvent(GDBusConnection* connection, bool visible);
+ ~DbusObjectServiceEvent();
+
+ GDBusConnection* connection;
+ bool visible;
+};
+
#endif