Home · All Classes · All Namespaces · Modules · Functions · Files
cli-properties.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 
45 {
46  Q_OBJECT
47 
48 public:
55  static inline QLatin1String staticInterfaceName()
56  {
57  return QLatin1String("org.freedesktop.Telepathy.Properties");
58  }
59 
68  const QString& busName,
69  const QString& objectPath,
70  QObject* parent = 0
71  );
72 
82  const QDBusConnection& connection,
83  const QString& busName,
84  const QString& objectPath,
85  QObject* parent = 0
86  );
87 
95 
103  explicit PropertiesInterfaceInterface(const Tp::AbstractInterface& mainInterface);
104 
112  PropertiesInterfaceInterface(const Tp::AbstractInterface& mainInterface, QObject* parent);
113 
121  {
122  return internalRequestAllProperties();
123  }
124 
125 public Q_SLOTS:
151  inline QDBusPendingReply<Tp::PropertyValueList> GetProperties(const Tp::UIntList& properties, int timeout = -1)
152  {
153  if (!invalidationReason().isEmpty()) {
154  return QDBusPendingReply<Tp::PropertyValueList>(QDBusMessage::createError(
155  invalidationReason(),
156  invalidationMessage()
157  ));
158  }
159 
160  QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
161  this->staticInterfaceName(), QLatin1String("GetProperties"));
162  callMessage << QVariant::fromValue(properties);
163  return this->connection().asyncCall(callMessage, timeout);
164  }
165 
182  inline QDBusPendingReply<Tp::PropertySpecList> ListProperties(int timeout = -1)
183  {
184  if (!invalidationReason().isEmpty()) {
185  return QDBusPendingReply<Tp::PropertySpecList>(QDBusMessage::createError(
186  invalidationReason(),
187  invalidationMessage()
188  ));
189  }
190 
191  QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
192  this->staticInterfaceName(), QLatin1String("ListProperties"));
193  return this->connection().asyncCall(callMessage, timeout);
194  }
195 
220  inline QDBusPendingReply<> SetProperties(const Tp::PropertyValueList& properties, int timeout = -1)
221  {
222  if (!invalidationReason().isEmpty()) {
223  return QDBusPendingReply<>(QDBusMessage::createError(
224  invalidationReason(),
225  invalidationMessage()
226  ));
227  }
228 
229  QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
230  this->staticInterfaceName(), QLatin1String("SetProperties"));
231  callMessage << QVariant::fromValue(properties);
232  return this->connection().asyncCall(callMessage, timeout);
233  }
234 
235 Q_SIGNALS:
253  void PropertiesChanged(const Tp::PropertyValueList& properties);
254 
272  void PropertyFlagsChanged(const Tp::PropertyFlagsChangeList& properties);
273 
274 protected:
275  virtual void invalidate(Tp::DBusProxy *, const QString &, const QString &);
276 };
277 }
278 }
279 Q_DECLARE_METATYPE(Tp::Client::PropertiesInterfaceInterface*)
Tp::PendingVariantMap * requestAllProperties() const
Definition: cli-properties.h:120
The DBusProxy class is a base class representing a remote object available over D-Bus.
Definition: dbus-proxy.h:42
Definition: cli-properties.h:44
QList< PropertyValue > PropertyValueList
Definition: build/TelepathyQt/_gen/types.h:2360
QDBusPendingReply SetProperties(const Tp::PropertyValueList &properties, int timeout=-1)
Definition: cli-properties.h:220
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
Definition: build/TelepathyQt/_gen/types.h:101
QDBusPendingReply< Tp::PropertyValueList > GetProperties(const Tp::UIntList &properties, int timeout=-1)
Definition: cli-properties.h:151
static QLatin1String staticInterfaceName()
Definition: cli-properties.h:55
QDBusPendingReply< Tp::PropertySpecList > ListProperties(int timeout=-1)
Definition: cli-properties.h:182
QList< PropertyFlagsChange > PropertyFlagsChangeList
Definition: build/TelepathyQt/_gen/types.h:2293
The PendingVariantMap class is a generic subclass of PendingOperation representing a pending D-Bus me...
Definition: pending-variant-map.h:38


Copyright © 2008-2011 Collabora Ltd. and Nokia Corporation
Telepathy-Qt 0.9.6.1