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

cli-channel-request.h

00001 /*
00002  * This file contains D-Bus client proxy classes generated by qt4-client-gen.py.
00003  *
00004  * This file can be distributed under the same terms as the specification from
00005  * which it was generated.
00006  */
00007 
00008 #ifndef IN_TELEPATHY_QT4_HEADER
00009 #error IN_TELEPATHY_QT4_HEADER
00010 #endif
00011 
00012 #include <TelepathyQt4/Types>
00013 
00014 #include <QtGlobal>
00015 
00016 #include <QString>
00017 #include <QObject>
00018 #include <QVariant>
00019 
00020 #include <QDBusPendingReply>
00021 
00022 #include <TelepathyQt4/AbstractInterface>
00023 #include <TelepathyQt4/DBusProxy>
00024 #include <TelepathyQt4/Global>
00025 
00026 namespace Tp
00027 {
00028 class PendingVariant;
00029 class PendingOperation;
00030 }
00031 
00032 namespace Tp
00033 {
00034 namespace Client
00035 {
00036 
00044 class TELEPATHY_QT4_EXPORT ChannelRequestInterface : public Tp::AbstractInterface
00045 {
00046     Q_OBJECT
00047 
00048 public:
00055     static inline QLatin1String staticInterfaceName()
00056     {
00057         return QLatin1String("org.freedesktop.Telepathy.ChannelRequest");
00058     }
00059 
00067     ChannelRequestInterface(
00068         const QString& busName,
00069         const QString& objectPath,
00070         QObject* parent = 0
00071     );
00072 
00081     ChannelRequestInterface(
00082         const QDBusConnection& connection,
00083         const QString& busName,
00084         const QString& objectPath,
00085         QObject* parent = 0
00086     );
00087 
00094     ChannelRequestInterface(Tp::DBusProxy *proxy);
00095 
00105     inline Tp::PendingVariant *requestPropertyAccount() const
00106     {
00107         return internalRequestProperty(QLatin1String("Account"));
00108     }
00109 
00123     inline Tp::PendingVariant *requestPropertyUserActionTime() const
00124     {
00125         return internalRequestProperty(QLatin1String("UserActionTime"));
00126     }
00127 
00144     inline Tp::PendingVariant *requestPropertyPreferredHandler() const
00145     {
00146         return internalRequestProperty(QLatin1String("PreferredHandler"));
00147     }
00148 
00167     inline Tp::PendingVariant *requestPropertyRequests() const
00168     {
00169         return internalRequestProperty(QLatin1String("Requests"));
00170     }
00171 
00182     inline Tp::PendingVariant *requestPropertyInterfaces() const
00183     {
00184         return internalRequestProperty(QLatin1String("Interfaces"));
00185     }
00186 
00193     Tp::PendingVariantMap *requestAllProperties() const
00194     {
00195         return internalRequestAllProperties();
00196     }
00197 
00198 public Q_SLOTS:
00229     inline QDBusPendingReply<> Proceed(int timeout = -1)
00230     {
00231         if (!invalidationReason().isEmpty()) {
00232             return QDBusPendingReply<>(QDBusMessage::createError(
00233                 invalidationReason(),
00234                 invalidationMessage()
00235             ));
00236         }
00237 
00238         QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
00239                 this->staticInterfaceName(), QLatin1String("Proceed"));
00240         return this->connection().asyncCall(callMessage, timeout);
00241     }
00242 
00283     inline QDBusPendingReply<> Cancel(int timeout = -1)
00284     {
00285         if (!invalidationReason().isEmpty()) {
00286             return QDBusPendingReply<>(QDBusMessage::createError(
00287                 invalidationReason(),
00288                 invalidationMessage()
00289             ));
00290         }
00291 
00292         QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
00293                 this->staticInterfaceName(), QLatin1String("Cancel"));
00294         return this->connection().asyncCall(callMessage, timeout);
00295     }
00296 
00297 Q_SIGNALS:
00316     void Failed(const QString& error, const QString& message);
00317 
00324     void Succeeded();
00325 
00326 protected:
00327     virtual void invalidate(Tp::DBusProxy *, const QString &, const QString &);
00328 };
00329 }
00330 }
00331 Q_DECLARE_METATYPE(Tp::Client::ChannelRequestInterface*)


Copyright © 2008-2010 Collabora Ltd. and Nokia Corporation
Telepathy-Qt4 0.4.1