Home · Modules · All Classes · All Namespaces
cli-tls-certificate.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.Authentication.TLSCertificate");
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 AuthenticationTLSCertificateInterface(const Tp::AbstractInterface& mainInterface);
104 
112  AuthenticationTLSCertificateInterface(const Tp::AbstractInterface& mainInterface, QObject* parent);
113 
125  {
126  return internalRequestProperty(QLatin1String("State"));
127  }
128 
150  {
151  return internalRequestProperty(QLatin1String("Rejections"));
152  }
153 
165  {
166  return internalRequestProperty(QLatin1String("CertificateType"));
167  }
168 
185  {
186  return internalRequestProperty(QLatin1String("CertificateChainData"));
187  }
188 
196  {
197  return internalRequestAllProperties();
198  }
199 
200 public Q_SLOTS:
211  inline QDBusPendingReply<> Accept(int timeout = -1)
212  {
213  if (!invalidationReason().isEmpty()) {
214  return QDBusPendingReply<>(QDBusMessage::createError(
215  invalidationReason(),
216  invalidationMessage()
217  ));
218  }
219 
220  QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
221  this->staticInterfaceName(), QLatin1String("Accept"));
222  return this->connection().asyncCall(callMessage, timeout);
223  }
224 
242  inline QDBusPendingReply<> Reject(const Tp::TLSCertificateRejectionList& rejections, int timeout = -1)
243  {
244  if (!invalidationReason().isEmpty()) {
245  return QDBusPendingReply<>(QDBusMessage::createError(
246  invalidationReason(),
247  invalidationMessage()
248  ));
249  }
250 
251  QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
252  this->staticInterfaceName(), QLatin1String("Reject"));
253  callMessage << QVariant::fromValue(rejections);
254  return this->connection().asyncCall(callMessage, timeout);
255  }
256 
257 Q_SIGNALS:
263  void Accepted();
264 
274  void Rejected(const Tp::TLSCertificateRejectionList& rejections);
275 
276 protected:
277  virtual void invalidate(Tp::DBusProxy *, const QString &, const QString &);
278 };
279 }
280 }
Tp::PendingVariant * requestPropertyRejections() const
Definition: cli-tls-certificate.h:149
Tp::PendingVariant * requestPropertyCertificateType() const
Definition: cli-tls-certificate.h:164
Tp::PendingVariant * requestPropertyCertificateChainData() const
Definition: cli-tls-certificate.h:184
QDBusPendingReply Accept(int timeout=-1)
Definition: cli-tls-certificate.h:211
The AbstractInterface class is the base class for all client side D-Bus interfaces,...
Definition: abstract-interface.h:42
The PendingVariant class is a generic subclass of PendingOperation representing a pending D-Bus metho...
Definition: pending-variant.h:38
The PendingVariantMap class is a generic subclass of PendingOperation representing a pending D-Bus me...
Definition: pending-variant-map.h:38
Definition: cli-tls-certificate.h:44
Tp::PendingVariantMap * requestAllProperties() const
Definition: cli-tls-certificate.h:195
static QLatin1String staticInterfaceName()
Definition: cli-tls-certificate.h:55
QDBusPendingReply Reject(const Tp::TLSCertificateRejectionList &rejections, int timeout=-1)
Definition: cli-tls-certificate.h:242
QList< TLSCertificateRejection > TLSCertificateRejectionList
Definition: build/TelepathyQt/_gen/types.h:3250
Definition: abstract-adaptor.cpp:31
Tp::PendingVariant * requestPropertyState() const
Definition: cli-tls-certificate.h:124
The DBusProxy class is a base class representing a remote object available over D-Bus.
Definition: dbus-proxy.h:42