00001
00002
00003
00004
00005
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/Client/AbstractInterface>
00023 #include <TelepathyQt4/Client/DBusProxy>
00024
00025
00026 #ifndef TELEPATHY_GNUC_DEPRECATED
00027 # if defined(Q_CC_GNUC) && __GNUC__ >= 4
00028 # define TELEPATHY_GNUC_DEPRECATED __attribute__((__deprecated__))
00029 # else
00030 # define TELEPATHY_GNUC_DEPRECATED
00031 # endif
00032 #endif
00033 namespace Telepathy
00034 {
00035 namespace Client
00036 {
00037
00045 class PropertiesInterfaceInterface : public Telepathy::Client::AbstractInterface
00046 {
00047 Q_OBJECT
00048
00049 public:
00056 static inline const char *staticInterfaceName()
00057 {
00058 return "org.freedesktop.Telepathy.Properties";
00059 }
00060
00068 PropertiesInterfaceInterface(
00069 const QString& serviceName,
00070 const QString& objectPath,
00071 QObject* parent = 0
00072 );
00073
00082 PropertiesInterfaceInterface(
00083 const QDBusConnection& connection,
00084 const QString& serviceName,
00085 const QString& objectPath,
00086 QObject* parent = 0
00087 );
00088
00095 PropertiesInterfaceInterface(Telepathy::Client::DBusProxy *proxy);
00096
00104 explicit PropertiesInterfaceInterface(const Telepathy::Client::AbstractInterface& mainInterface);
00105
00113 PropertiesInterfaceInterface(const Telepathy::Client::AbstractInterface& mainInterface, QObject* parent);
00114
00115 public Q_SLOTS:
00134 inline QDBusPendingReply<Telepathy::PropertyValueList> GetProperties(const Telepathy::UIntList& properties)
00135 {
00136 if (!invalidationReason().isEmpty()) {
00137 return QDBusPendingReply<Telepathy::PropertyValueList>(QDBusMessage::createError(
00138 invalidationReason(),
00139 invalidationMessage()
00140 ));
00141 }
00142
00143
00144 QList<QVariant> argumentList;
00145 argumentList << QVariant::fromValue(properties);
00146 return asyncCallWithArgumentList(QLatin1String("GetProperties"), argumentList);
00147 }
00148
00160 inline QDBusPendingReply<Telepathy::PropertySpecList> ListProperties()
00161 {
00162 if (!invalidationReason().isEmpty()) {
00163 return QDBusPendingReply<Telepathy::PropertySpecList>(QDBusMessage::createError(
00164 invalidationReason(),
00165 invalidationMessage()
00166 ));
00167 }
00168
00169
00170 return asyncCall(QLatin1String("ListProperties"));
00171 }
00172
00190 inline QDBusPendingReply<> SetProperties(const Telepathy::PropertyValueList& properties)
00191 {
00192 if (!invalidationReason().isEmpty()) {
00193 return QDBusPendingReply<>(QDBusMessage::createError(
00194 invalidationReason(),
00195 invalidationMessage()
00196 ));
00197 }
00198
00199
00200 QList<QVariant> argumentList;
00201 argumentList << QVariant::fromValue(properties);
00202 return asyncCallWithArgumentList(QLatin1String("SetProperties"), argumentList);
00203 }
00204
00205 Q_SIGNALS:
00221 void PropertiesChanged(const Telepathy::PropertyValueList& properties);
00222
00238 void PropertyFlagsChanged(const Telepathy::PropertyFlagsChangeList& properties);
00239
00240 protected:
00241 virtual void invalidate(Telepathy::Client::DBusProxy *, const QString &, const QString &);
00242 };
00243 }
00244 }