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

cli-media-session-handler.h
1 /*
2 * This file contains D-Bus client proxy classes generated by qt-client-gen.py.
3 *
4 * This file can be distributed under the same terms as the specification from
5 * which it was generated.
6 */
7
8 #ifndef IN_TP_QT_HEADER
9 #error IN_TP_QT_HEADER
10 #endif
11
12 #include <TelepathyQt/Types>
13
14 #include <QtGlobal>
15
16 #include <QString>
17 #include <QObject>
18 #include <QVariant>
19
20 #include <QDBusPendingReply>
21
22 #include <TelepathyQt/AbstractInterface>
23 #include <TelepathyQt/DBusProxy>
24 #include <TelepathyQt/Global>
25
26 namespace Tp
27 {
28 class PendingVariant;
29 class PendingOperation;
30 }
31
32 namespace Tp
33 {
34 namespace Client
35 {
36
44 class TP_QT_EXPORT MediaSessionHandlerInterface : public Tp::AbstractInterface
45 {
46 Q_OBJECT
47
48 public:
55 static inline QLatin1String staticInterfaceName()
56 {
57 return QLatin1String("org.freedesktop.Telepathy.Media.SessionHandler");
58 }
59
67 MediaSessionHandlerInterface(
68 const QString& busName,
69 const QString& objectPath,
70 QObject* parent = 0
71 );
72
81 MediaSessionHandlerInterface(
82 const QDBusConnection& connection,
83 const QString& busName,
84 const QString& objectPath,
85 QObject* parent = 0
86 );
87
94 MediaSessionHandlerInterface(Tp::DBusProxy *proxy);
95
102 Tp::PendingVariantMap *requestAllProperties() const
103 {
104 return internalRequestAllProperties();
105 }
106
107 public Q_SLOTS:
121 inline QDBusPendingReply<> Error(uint errorCode, const QString& message, int timeout = -1)
122 {
123 if (!invalidationReason().isEmpty()) {
124 return QDBusPendingReply<>(QDBusMessage::createError(
125 invalidationReason(),
126 invalidationMessage()
127 ));
128 }
129
130 QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
131 this->staticInterfaceName(), QLatin1String("Error"));
132 callMessage << QVariant::fromValue(errorCode) << QVariant::fromValue(message);
133 return this->connection().asyncCall(callMessage, timeout);
134 }
135
148 inline QDBusPendingReply<> Ready(int timeout = -1)
149 {
150 if (!invalidationReason().isEmpty()) {
151 return QDBusPendingReply<>(QDBusMessage::createError(
152 invalidationReason(),
153 invalidationMessage()
154 ));
155 }
156
157 QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
158 this->staticInterfaceName(), QLatin1String("Ready"));
159 return this->connection().asyncCall(callMessage, timeout);
160 }
161
162 Q_SIGNALS:
184 void NewStreamHandler(const QDBusObjectPath& streamHandler, uint ID, uint mediaType, uint direction);
185
186 protected:
187 virtual void invalidate(Tp::DBusProxy *, const QString &, const QString &);
188 };
189 }
190 }
191 Q_DECLARE_METATYPE(Tp::Client::MediaSessionHandlerInterface*)
QDBusConnection
QDBusObjectPath
Tp::Client::MediaSessionHandlerInterface::Error
QDBusPendingReply Error(uint errorCode, const QString &message, int timeout=-1)
Definition: cli-media-session-handler.h:121
Tp::AbstractInterface
The AbstractInterface class is the base class for all client side D-Bus interfaces, allowing access to remote methods/properties/signals.
Definition: abstract-interface.h:42
Tp::Client::MediaSessionHandlerInterface::Ready
QDBusPendingReply Ready(int timeout=-1)
Definition: cli-media-session-handler.h:148
QDBusPendingReply
QObject
Tp::Client::MediaSessionHandlerInterface::staticInterfaceName
static QLatin1String staticInterfaceName()
Definition: cli-media-session-handler.h:55
QString
Tp::Client::MediaSessionHandlerInterface
Definition: cli-media-session-handler.h:44
QVariant::fromValue
QVariant fromValue(const T &value)
QDBusMessage
QLatin1String
Tp::PendingVariantMap
The PendingVariantMap class is a generic subclass of PendingOperation representing a pending D-Bus me...
Definition: pending-variant-map.h:38
QDBusConnection::asyncCall
QDBusPendingCall asyncCall(const QDBusMessage &message, int timeout) const
QDBusMessage::createError
QDBusMessage createError(const QString &name, const QString &msg)
Tp::Client::MediaSessionHandlerInterface::requestAllProperties
Tp::PendingVariantMap * requestAllProperties() const
Definition: cli-media-session-handler.h:102
Tp::DBusProxy
The DBusProxy class is a base class representing a remote object available over D-Bus.
Definition: dbus-proxy.h:42
QDBusMessage::createMethodCall
QDBusMessage createMethodCall(const QString &service, const QString &path, const QString &interface, const QString &method)
Tp
Definition: abstract-adaptor.cpp:31