dbus-proxy.h Source File

| Home · All Classes · All Namespaces · Modules · Functions · Files

dbus-proxy.h
1
23 #ifndef _TelepathyQt_dbus_proxy_h_HEADER_GUARD_
24 #define _TelepathyQt_dbus_proxy_h_HEADER_GUARD_
25
26 #ifndef IN_TP_QT_HEADER
27 #error IN_TP_QT_HEADER
28 #endif
29
30 #include <TelepathyQt/Global>
31 #include <TelepathyQt/Object>
32 #include <TelepathyQt/ReadyObject>
33
34 class QDBusConnection;
35 class QDBusError;
36
37 namespace Tp
38 {
39
40 class TestBackdoors;
41
42 class TP_QT_EXPORT DBusProxy : public Object, public ReadyObject
43 {
44 Q_OBJECT
45 Q_DISABLE_COPY(DBusProxy)
46
47 public:
48 DBusProxy(const QDBusConnection &dbusConnection, const QString &busName,
49 const QString &objectPath, const Feature &featureCore);
50 virtual ~DBusProxy();
51
52 QDBusConnection dbusConnection() const;
53 QString busName() const;
54 QString objectPath() const;
55
56 bool isValid() const;
57 QString invalidationReason() const;
58 QString invalidationMessage() const;
59
60 Q_SIGNALS:
61 void invalidated(Tp::DBusProxy *proxy,
62 const QString &errorName, const QString &errorMessage);
63
64 protected:
65 void setBusName(const QString &busName);
66 void invalidate(const QString &reason, const QString &message);
67 void invalidate(const QDBusError &error);
68
69 private Q_SLOTS:
70 TP_QT_NO_EXPORT void emitInvalidated();
71
72 private:
73 friend class TestBackdoors;
74
75 struct Private;
76 friend struct Private;
77 Private *mPriv;
78 };
79
80 class TP_QT_EXPORT StatelessDBusProxy : public DBusProxy
81 {
82 Q_OBJECT
83 Q_DISABLE_COPY(StatelessDBusProxy)
84
85 public:
86 StatelessDBusProxy(const QDBusConnection &dbusConnection,
87 const QString &busName, const QString &objectPath, const Feature &featureCore);
88 virtual ~StatelessDBusProxy();
89
90 private:
91 struct Private;
92 friend struct Private;
93 Private *mPriv;
94 };
95
96 class TP_QT_EXPORT StatefulDBusProxy : public DBusProxy
97 {
98 Q_OBJECT
99 Q_DISABLE_COPY(StatefulDBusProxy)
100
101 public:
102 StatefulDBusProxy(const QDBusConnection &dbusConnection,
103 const QString &busName, const QString &objectPath, const Feature &featureCore);
104 virtual ~StatefulDBusProxy();
105
106 static QString uniqueNameFrom(const QDBusConnection &bus, const QString &wellKnownOrUnique);
107 static QString uniqueNameFrom(const QDBusConnection &bus, const QString &wellKnownOrUnique,
108 QString &error, QString &message);
109
110 private Q_SLOTS:
111 TP_QT_NO_EXPORT void onServiceOwnerChanged(const QString &name, const QString &oldOwner,
112 const QString &newOwner);
113
114 private:
115 struct Private;
116 friend struct Private;
117 Private *mPriv;
118 };
119
120 } // Tp
121
122 #endif
Tp::StatelessDBusProxy
The StatelessDBusProxy class is a base class representing a remote object whose API is basically stat...
Definition: dbus-proxy.h:80
Tp::DBusProxy
The DBusProxy class is a base class representing a remote object available over D-Bus.
Definition: dbus-proxy.h:42
Tp::Object
The Object class provides an object with property notification.
Definition: object.h:39
Tp::Feature
The Feature class represents a feature that can be enabled on demand.
Definition: feature.h:41
Tp::StatefulDBusProxy
The StatefulDBusProxy class is a base class representing a remote object whose API is stateful...
Definition: dbus-proxy.h:96
Tp::ReadyObject
Definition: ready-object.h:42