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

cli-dbus.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 class PendingVariant;
00028 class PendingOperation;
00029 }
00030 
00031 // FIXME: (API/ABI break) Remove definition of TELEPATHY_GNUC_DEPRECATED
00032 
00033 // basically the same as GLib's G_GNUC_DEPRECATED
00034 #ifndef TELEPATHY_GNUC_DEPRECATED
00035 #   if defined(Q_CC_GNUC) && __GNUC__ >= 4
00036 #       define TELEPATHY_GNUC_DEPRECATED __attribute__((__deprecated__))
00037 #   else
00038 #       define TELEPATHY_GNUC_DEPRECATED
00039 #   endif
00040 #endif
00041 namespace Tp
00042 {
00043 namespace Client
00044 {
00045 namespace DBus
00046 {
00047 
00055 class TELEPATHY_QT4_EXPORT DBusDaemonInterface : public Tp::AbstractInterface
00056 {
00057     Q_OBJECT
00058 
00059 public:
00066     static inline const char *staticInterfaceName()
00067     {
00068         return "org.freedesktop.DBus";
00069     }
00070 
00078     DBusDaemonInterface(
00079         const QString& busName,
00080         const QString& objectPath,
00081         QObject* parent = 0
00082     );
00083 
00092     DBusDaemonInterface(
00093         const QDBusConnection& connection,
00094         const QString& busName,
00095         const QString& objectPath,
00096         QObject* parent = 0
00097     );
00098 
00105     DBusDaemonInterface(Tp::DBusProxy *proxy);
00106 
00114     explicit DBusDaemonInterface(const Tp::AbstractInterface& mainInterface);
00115 
00123     DBusDaemonInterface(const Tp::AbstractInterface& mainInterface, QObject* parent);
00124 
00131     Tp::PendingVariantMap *requestAllProperties() const
00132     {
00133         return internalRequestAllProperties();
00134     }
00135 
00136 public Q_SLOTS:
00140     inline QDBusPendingReply<QString> Hello()
00141     {
00142         if (!invalidationReason().isEmpty()) {
00143             return QDBusPendingReply<QString>(QDBusMessage::createError(
00144                 invalidationReason(),
00145                 invalidationMessage()
00146             ));
00147         }
00148 
00149         return asyncCall(QLatin1String("Hello"));
00150     }
00151 
00155     inline QDBusPendingReply<uint> RequestName(const QString& name, uint flags)
00156     {
00157         if (!invalidationReason().isEmpty()) {
00158             return QDBusPendingReply<uint>(QDBusMessage::createError(
00159                 invalidationReason(),
00160                 invalidationMessage()
00161             ));
00162         }
00163 
00164         QList<QVariant> argumentList;
00165         argumentList << QVariant::fromValue(name) << QVariant::fromValue(flags);
00166         return asyncCallWithArgumentList(QLatin1String("RequestName"), argumentList);
00167     }
00168 
00172     inline QDBusPendingReply<uint> ReleaseName(const QString& name)
00173     {
00174         if (!invalidationReason().isEmpty()) {
00175             return QDBusPendingReply<uint>(QDBusMessage::createError(
00176                 invalidationReason(),
00177                 invalidationMessage()
00178             ));
00179         }
00180 
00181         QList<QVariant> argumentList;
00182         argumentList << QVariant::fromValue(name);
00183         return asyncCallWithArgumentList(QLatin1String("ReleaseName"), argumentList);
00184     }
00185 
00189     inline QDBusPendingReply<uint> StartServiceByName(const QString& service, uint flags)
00190     {
00191         if (!invalidationReason().isEmpty()) {
00192             return QDBusPendingReply<uint>(QDBusMessage::createError(
00193                 invalidationReason(),
00194                 invalidationMessage()
00195             ));
00196         }
00197 
00198         QList<QVariant> argumentList;
00199         argumentList << QVariant::fromValue(service) << QVariant::fromValue(flags);
00200         return asyncCallWithArgumentList(QLatin1String("StartServiceByName"), argumentList);
00201     }
00202 
00206     inline QDBusPendingReply<bool> NameHasOwner(const QString& nameToCheck)
00207     {
00208         if (!invalidationReason().isEmpty()) {
00209             return QDBusPendingReply<bool>(QDBusMessage::createError(
00210                 invalidationReason(),
00211                 invalidationMessage()
00212             ));
00213         }
00214 
00215         QList<QVariant> argumentList;
00216         argumentList << QVariant::fromValue(nameToCheck);
00217         return asyncCallWithArgumentList(QLatin1String("NameHasOwner"), argumentList);
00218     }
00219 
00223     inline QDBusPendingReply<QStringList> ListNames()
00224     {
00225         if (!invalidationReason().isEmpty()) {
00226             return QDBusPendingReply<QStringList>(QDBusMessage::createError(
00227                 invalidationReason(),
00228                 invalidationMessage()
00229             ));
00230         }
00231 
00232         return asyncCall(QLatin1String("ListNames"));
00233     }
00234 
00238     inline QDBusPendingReply<QStringList> ListActivatableNames()
00239     {
00240         if (!invalidationReason().isEmpty()) {
00241             return QDBusPendingReply<QStringList>(QDBusMessage::createError(
00242                 invalidationReason(),
00243                 invalidationMessage()
00244             ));
00245         }
00246 
00247         return asyncCall(QLatin1String("ListActivatableNames"));
00248     }
00249 
00253     inline QDBusPendingReply<> AddMatch(const QString& rule)
00254     {
00255         if (!invalidationReason().isEmpty()) {
00256             return QDBusPendingReply<>(QDBusMessage::createError(
00257                 invalidationReason(),
00258                 invalidationMessage()
00259             ));
00260         }
00261 
00262         QList<QVariant> argumentList;
00263         argumentList << QVariant::fromValue(rule);
00264         return asyncCallWithArgumentList(QLatin1String("AddMatch"), argumentList);
00265     }
00266 
00270     inline QDBusPendingReply<> RemoveMatch(const QString& rule)
00271     {
00272         if (!invalidationReason().isEmpty()) {
00273             return QDBusPendingReply<>(QDBusMessage::createError(
00274                 invalidationReason(),
00275                 invalidationMessage()
00276             ));
00277         }
00278 
00279         QList<QVariant> argumentList;
00280         argumentList << QVariant::fromValue(rule);
00281         return asyncCallWithArgumentList(QLatin1String("RemoveMatch"), argumentList);
00282     }
00283 
00287     inline QDBusPendingReply<QString> GetNameOwner(const QString& name)
00288     {
00289         if (!invalidationReason().isEmpty()) {
00290             return QDBusPendingReply<QString>(QDBusMessage::createError(
00291                 invalidationReason(),
00292                 invalidationMessage()
00293             ));
00294         }
00295 
00296         QList<QVariant> argumentList;
00297         argumentList << QVariant::fromValue(name);
00298         return asyncCallWithArgumentList(QLatin1String("GetNameOwner"), argumentList);
00299     }
00300 
00304     inline QDBusPendingReply<QStringList> ListQueuedOwners(const QString& name)
00305     {
00306         if (!invalidationReason().isEmpty()) {
00307             return QDBusPendingReply<QStringList>(QDBusMessage::createError(
00308                 invalidationReason(),
00309                 invalidationMessage()
00310             ));
00311         }
00312 
00313         QList<QVariant> argumentList;
00314         argumentList << QVariant::fromValue(name);
00315         return asyncCallWithArgumentList(QLatin1String("ListQueuedOwners"), argumentList);
00316     }
00317 
00321     inline QDBusPendingReply<uint> GetConnectionUnixUser(const QString& connectionName)
00322     {
00323         if (!invalidationReason().isEmpty()) {
00324             return QDBusPendingReply<uint>(QDBusMessage::createError(
00325                 invalidationReason(),
00326                 invalidationMessage()
00327             ));
00328         }
00329 
00330         QList<QVariant> argumentList;
00331         argumentList << QVariant::fromValue(connectionName);
00332         return asyncCallWithArgumentList(QLatin1String("GetConnectionUnixUser"), argumentList);
00333     }
00334 
00338     inline QDBusPendingReply<uint> GetConnectionUnixProcessID(const QString& connectionName)
00339     {
00340         if (!invalidationReason().isEmpty()) {
00341             return QDBusPendingReply<uint>(QDBusMessage::createError(
00342                 invalidationReason(),
00343                 invalidationMessage()
00344             ));
00345         }
00346 
00347         QList<QVariant> argumentList;
00348         argumentList << QVariant::fromValue(connectionName);
00349         return asyncCallWithArgumentList(QLatin1String("GetConnectionUnixProcessID"), argumentList);
00350     }
00351 
00355     inline QDBusPendingReply<QByteArray> GetConnectionSELinuxSecurityContext(const QString& connectionName)
00356     {
00357         if (!invalidationReason().isEmpty()) {
00358             return QDBusPendingReply<QByteArray>(QDBusMessage::createError(
00359                 invalidationReason(),
00360                 invalidationMessage()
00361             ));
00362         }
00363 
00364         QList<QVariant> argumentList;
00365         argumentList << QVariant::fromValue(connectionName);
00366         return asyncCallWithArgumentList(QLatin1String("GetConnectionSELinuxSecurityContext"), argumentList);
00367     }
00368 
00372     inline QDBusPendingReply<> ReloadConfig()
00373     {
00374         if (!invalidationReason().isEmpty()) {
00375             return QDBusPendingReply<>(QDBusMessage::createError(
00376                 invalidationReason(),
00377                 invalidationMessage()
00378             ));
00379         }
00380 
00381         return asyncCall(QLatin1String("ReloadConfig"));
00382     }
00383 
00387     inline QDBusPendingReply<QString> GetId()
00388     {
00389         if (!invalidationReason().isEmpty()) {
00390             return QDBusPendingReply<QString>(QDBusMessage::createError(
00391                 invalidationReason(),
00392                 invalidationMessage()
00393             ));
00394         }
00395 
00396         return asyncCall(QLatin1String("GetId"));
00397     }
00398 
00399 Q_SIGNALS:
00403     void NameOwnerChanged(const QString& name, const QString& oldOwner, const QString& newOwner);
00404 
00408     void NameLost(const QString& name);
00409 
00413     void NameAcquired(const QString& name);
00414 
00415 protected:
00416     virtual void invalidate(Tp::DBusProxy *, const QString &, const QString &);
00417 };
00418 
00426 class TELEPATHY_QT4_EXPORT IntrospectableInterface : public Tp::AbstractInterface
00427 {
00428     Q_OBJECT
00429 
00430 public:
00437     static inline const char *staticInterfaceName()
00438     {
00439         return "org.freedesktop.DBus.Introspectable";
00440     }
00441 
00449     IntrospectableInterface(
00450         const QString& busName,
00451         const QString& objectPath,
00452         QObject* parent = 0
00453     );
00454 
00463     IntrospectableInterface(
00464         const QDBusConnection& connection,
00465         const QString& busName,
00466         const QString& objectPath,
00467         QObject* parent = 0
00468     );
00469 
00476     IntrospectableInterface(Tp::DBusProxy *proxy);
00477 
00485     explicit IntrospectableInterface(const Tp::AbstractInterface& mainInterface);
00486 
00494     IntrospectableInterface(const Tp::AbstractInterface& mainInterface, QObject* parent);
00495 
00502     Tp::PendingVariantMap *requestAllProperties() const
00503     {
00504         return internalRequestAllProperties();
00505     }
00506 
00507 public Q_SLOTS:
00511     inline QDBusPendingReply<QString> Introspect()
00512     {
00513         if (!invalidationReason().isEmpty()) {
00514             return QDBusPendingReply<QString>(QDBusMessage::createError(
00515                 invalidationReason(),
00516                 invalidationMessage()
00517             ));
00518         }
00519 
00520         return asyncCall(QLatin1String("Introspect"));
00521     }
00522 
00523 protected:
00524     virtual void invalidate(Tp::DBusProxy *, const QString &, const QString &);
00525 };
00526 
00534 class TELEPATHY_QT4_EXPORT PeerInterface : public Tp::AbstractInterface
00535 {
00536     Q_OBJECT
00537 
00538 public:
00545     static inline const char *staticInterfaceName()
00546     {
00547         return "org.freedesktop.DBus.Peer";
00548     }
00549 
00557     PeerInterface(
00558         const QString& busName,
00559         const QString& objectPath,
00560         QObject* parent = 0
00561     );
00562 
00571     PeerInterface(
00572         const QDBusConnection& connection,
00573         const QString& busName,
00574         const QString& objectPath,
00575         QObject* parent = 0
00576     );
00577 
00584     PeerInterface(Tp::DBusProxy *proxy);
00585 
00593     explicit PeerInterface(const Tp::AbstractInterface& mainInterface);
00594 
00602     PeerInterface(const Tp::AbstractInterface& mainInterface, QObject* parent);
00603 
00610     Tp::PendingVariantMap *requestAllProperties() const
00611     {
00612         return internalRequestAllProperties();
00613     }
00614 
00615 public Q_SLOTS:
00619     inline QDBusPendingReply<> Ping()
00620     {
00621         if (!invalidationReason().isEmpty()) {
00622             return QDBusPendingReply<>(QDBusMessage::createError(
00623                 invalidationReason(),
00624                 invalidationMessage()
00625             ));
00626         }
00627 
00628         return asyncCall(QLatin1String("Ping"));
00629     }
00630 
00634     inline QDBusPendingReply<QString> GetMachineId()
00635     {
00636         if (!invalidationReason().isEmpty()) {
00637             return QDBusPendingReply<QString>(QDBusMessage::createError(
00638                 invalidationReason(),
00639                 invalidationMessage()
00640             ));
00641         }
00642 
00643         return asyncCall(QLatin1String("GetMachineId"));
00644     }
00645 
00646 protected:
00647     virtual void invalidate(Tp::DBusProxy *, const QString &, const QString &);
00648 };
00649 
00657 class TELEPATHY_QT4_EXPORT PropertiesInterface : public Tp::AbstractInterface
00658 {
00659     Q_OBJECT
00660 
00661 public:
00668     static inline const char *staticInterfaceName()
00669     {
00670         return "org.freedesktop.DBus.Properties";
00671     }
00672 
00680     PropertiesInterface(
00681         const QString& busName,
00682         const QString& objectPath,
00683         QObject* parent = 0
00684     );
00685 
00694     PropertiesInterface(
00695         const QDBusConnection& connection,
00696         const QString& busName,
00697         const QString& objectPath,
00698         QObject* parent = 0
00699     );
00700 
00707     PropertiesInterface(Tp::DBusProxy *proxy);
00708 
00716     explicit PropertiesInterface(const Tp::AbstractInterface& mainInterface);
00717 
00725     PropertiesInterface(const Tp::AbstractInterface& mainInterface, QObject* parent);
00726 
00733     Tp::PendingVariantMap *requestAllProperties() const
00734     {
00735         return internalRequestAllProperties();
00736     }
00737 
00738 public Q_SLOTS:
00742     inline QDBusPendingReply<QDBusVariant> Get(const QString& interfaceName, const QString& propertyName)
00743     {
00744         if (!invalidationReason().isEmpty()) {
00745             return QDBusPendingReply<QDBusVariant>(QDBusMessage::createError(
00746                 invalidationReason(),
00747                 invalidationMessage()
00748             ));
00749         }
00750 
00751         QList<QVariant> argumentList;
00752         argumentList << QVariant::fromValue(interfaceName) << QVariant::fromValue(propertyName);
00753         return asyncCallWithArgumentList(QLatin1String("Get"), argumentList);
00754     }
00755 
00759     inline QDBusPendingReply<> Set(const QString& interfaceName, const QString& propertyName, const QDBusVariant& value)
00760     {
00761         if (!invalidationReason().isEmpty()) {
00762             return QDBusPendingReply<>(QDBusMessage::createError(
00763                 invalidationReason(),
00764                 invalidationMessage()
00765             ));
00766         }
00767 
00768         QList<QVariant> argumentList;
00769         argumentList << QVariant::fromValue(interfaceName) << QVariant::fromValue(propertyName) << QVariant::fromValue(value);
00770         return asyncCallWithArgumentList(QLatin1String("Set"), argumentList);
00771     }
00772 
00776     inline QDBusPendingReply<QVariantMap> GetAll(const QString& interfaceName)
00777     {
00778         if (!invalidationReason().isEmpty()) {
00779             return QDBusPendingReply<QVariantMap>(QDBusMessage::createError(
00780                 invalidationReason(),
00781                 invalidationMessage()
00782             ));
00783         }
00784 
00785         QList<QVariant> argumentList;
00786         argumentList << QVariant::fromValue(interfaceName);
00787         return asyncCallWithArgumentList(QLatin1String("GetAll"), argumentList);
00788     }
00789 
00790 protected:
00791     virtual void invalidate(Tp::DBusProxy *, const QString &, const QString &);
00792 };
00793 }
00794 }
00795 }
00796 Q_DECLARE_METATYPE(Tp::Client::DBus::DBusDaemonInterface*)
00797 Q_DECLARE_METATYPE(Tp::Client::DBus::IntrospectableInterface*)
00798 Q_DECLARE_METATYPE(Tp::Client::DBus::PeerInterface*)
00799 Q_DECLARE_METATYPE(Tp::Client::DBus::PropertiesInterface*)


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