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

cli-properties.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 PropertiesInterfaceInterface : public Tp::AbstractInterface
00045 {
00046     Q_OBJECT
00047 
00048 public:
00055     static inline QLatin1String staticInterfaceName()
00056     {
00057         return QLatin1String("org.freedesktop.Telepathy.Properties");
00058     }
00059 
00067     PropertiesInterfaceInterface(
00068         const QString& busName,
00069         const QString& objectPath,
00070         QObject* parent = 0
00071     );
00072 
00081     PropertiesInterfaceInterface(
00082         const QDBusConnection& connection,
00083         const QString& busName,
00084         const QString& objectPath,
00085         QObject* parent = 0
00086     );
00087 
00094     PropertiesInterfaceInterface(Tp::DBusProxy *proxy);
00095 
00103     explicit PropertiesInterfaceInterface(const Tp::AbstractInterface& mainInterface);
00104 
00112     PropertiesInterfaceInterface(const Tp::AbstractInterface& mainInterface, QObject* parent);
00113 
00120     Tp::PendingVariantMap *requestAllProperties() const
00121     {
00122         return internalRequestAllProperties();
00123     }
00124 
00125 public Q_SLOTS:
00149     inline QDBusPendingReply<Tp::PropertyValueList> GetProperties(const Tp::UIntList& properties, int timeout = -1)
00150     {
00151         if (!invalidationReason().isEmpty()) {
00152             return QDBusPendingReply<Tp::PropertyValueList>(QDBusMessage::createError(
00153                 invalidationReason(),
00154                 invalidationMessage()
00155             ));
00156         }
00157 
00158         QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
00159                 this->staticInterfaceName(), QLatin1String("GetProperties"));
00160         callMessage << QVariant::fromValue(properties);
00161         return this->connection().asyncCall(callMessage, timeout);
00162     }
00163 
00180     inline QDBusPendingReply<Tp::PropertySpecList> ListProperties(int timeout = -1)
00181     {
00182         if (!invalidationReason().isEmpty()) {
00183             return QDBusPendingReply<Tp::PropertySpecList>(QDBusMessage::createError(
00184                 invalidationReason(),
00185                 invalidationMessage()
00186             ));
00187         }
00188 
00189         QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
00190                 this->staticInterfaceName(), QLatin1String("ListProperties"));
00191         return this->connection().asyncCall(callMessage, timeout);
00192     }
00193 
00216     inline QDBusPendingReply<> SetProperties(const Tp::PropertyValueList& properties, int timeout = -1)
00217     {
00218         if (!invalidationReason().isEmpty()) {
00219             return QDBusPendingReply<>(QDBusMessage::createError(
00220                 invalidationReason(),
00221                 invalidationMessage()
00222             ));
00223         }
00224 
00225         QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
00226                 this->staticInterfaceName(), QLatin1String("SetProperties"));
00227         callMessage << QVariant::fromValue(properties);
00228         return this->connection().asyncCall(callMessage, timeout);
00229     }
00230 
00231 Q_SIGNALS:
00247     void PropertiesChanged(const Tp::PropertyValueList& properties);
00248 
00264     void PropertyFlagsChanged(const Tp::PropertyFlagsChangeList& properties);
00265 
00266 protected:
00267     virtual void invalidate(Tp::DBusProxy *, const QString &, const QString &);
00268 };
00269 }
00270 }
00271 Q_DECLARE_METATYPE(Tp::Client::PropertiesInterfaceInterface*)


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