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

cli-connection-manager.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 
00053 class TELEPATHY_QT4_EXPORT ConnectionManagerInterface : public Tp::AbstractInterface
00054 {
00055     Q_OBJECT
00056 
00057 public:
00064     static inline const char *staticInterfaceName()
00065     {
00066         return "org.freedesktop.Telepathy.ConnectionManager";
00067     }
00068 
00076     ConnectionManagerInterface(
00077         const QString& busName,
00078         const QString& objectPath,
00079         QObject* parent = 0
00080     );
00081 
00090     ConnectionManagerInterface(
00091         const QDBusConnection& connection,
00092         const QString& busName,
00093         const QString& objectPath,
00094         QObject* parent = 0
00095     );
00096 
00103     ConnectionManagerInterface(Tp::DBusProxy *proxy);
00104 
00123     Q_PROPERTY(Tp::ProtocolPropertiesMap Protocols READ _deprecated_Protocols)
00124 
00125     
00134     inline TELEPATHY_QT4_DEPRECATED Tp::ProtocolPropertiesMap Protocols() const
00135     {
00136         return _deprecated_Protocols();
00137     }
00138 
00139 private:
00140     inline Tp::ProtocolPropertiesMap _deprecated_Protocols() const
00141     {
00142         return qvariant_cast<Tp::ProtocolPropertiesMap>(internalPropGet("Protocols"));
00143     }
00144 public:
00145 
00168     inline Tp::PendingVariant *requestPropertyProtocols() const
00169     {
00170         return internalRequestProperty(QLatin1String("Protocols"));
00171     }
00172 
00194     Q_PROPERTY(QStringList Interfaces READ _deprecated_Interfaces)
00195 
00196     
00205     inline TELEPATHY_QT4_DEPRECATED QStringList Interfaces() const
00206     {
00207         return _deprecated_Interfaces();
00208     }
00209 
00210 private:
00211     inline QStringList _deprecated_Interfaces() const
00212     {
00213         return qvariant_cast<QStringList>(internalPropGet("Interfaces"));
00214     }
00215 public:
00216 
00242     inline Tp::PendingVariant *requestPropertyInterfaces() const
00243     {
00244         return internalRequestProperty(QLatin1String("Interfaces"));
00245     }
00246 
00253     Tp::PendingVariantMap *requestAllProperties() const
00254     {
00255         return internalRequestAllProperties();
00256     }
00257 
00258 public Q_SLOTS:
00275     inline QDBusPendingReply<Tp::ParamSpecList> GetParameters(const QString& protocol)
00276     {
00277         if (!invalidationReason().isEmpty()) {
00278             return QDBusPendingReply<Tp::ParamSpecList>(QDBusMessage::createError(
00279                 invalidationReason(),
00280                 invalidationMessage()
00281             ));
00282         }
00283 
00284         QList<QVariant> argumentList;
00285         argumentList << QVariant::fromValue(protocol);
00286         return asyncCallWithArgumentList(QLatin1String("GetParameters"), argumentList);
00287     }
00288 
00299     inline QDBusPendingReply<QStringList> ListProtocols()
00300     {
00301         if (!invalidationReason().isEmpty()) {
00302             return QDBusPendingReply<QStringList>(QDBusMessage::createError(
00303                 invalidationReason(),
00304                 invalidationMessage()
00305             ));
00306         }
00307 
00308         return asyncCall(QLatin1String("ListProtocols"));
00309     }
00310 
00420     inline QDBusPendingReply<QString, QDBusObjectPath> RequestConnection(const QString& protocol, const QVariantMap& parameters)
00421     {
00422         if (!invalidationReason().isEmpty()) {
00423             return QDBusPendingReply<QString, QDBusObjectPath>(QDBusMessage::createError(
00424                 invalidationReason(),
00425                 invalidationMessage()
00426             ));
00427         }
00428 
00429         QList<QVariant> argumentList;
00430         argumentList << QVariant::fromValue(protocol) << QVariant::fromValue(parameters);
00431         return asyncCallWithArgumentList(QLatin1String("RequestConnection"), argumentList);
00432     }
00433 
00434 Q_SIGNALS:
00452     void NewConnection(const QString& busName, const QDBusObjectPath& objectPath, const QString& protocol);
00453 
00454 protected:
00455     virtual void invalidate(Tp::DBusProxy *, const QString &, const QString &);
00456 };
00457 
00465 class TELEPATHY_QT4_EXPORT ProtocolInterface : public Tp::AbstractInterface
00466 {
00467     Q_OBJECT
00468 
00469 public:
00476     static inline const char *staticInterfaceName()
00477     {
00478         return "org.freedesktop.Telepathy.Protocol";
00479     }
00480 
00488     ProtocolInterface(
00489         const QString& busName,
00490         const QString& objectPath,
00491         QObject* parent = 0
00492     );
00493 
00502     ProtocolInterface(
00503         const QDBusConnection& connection,
00504         const QString& busName,
00505         const QString& objectPath,
00506         QObject* parent = 0
00507     );
00508 
00515     ProtocolInterface(Tp::DBusProxy *proxy);
00516 
00524     explicit ProtocolInterface(const Tp::Client::ConnectionManagerInterface& mainInterface);
00525 
00533     ProtocolInterface(const Tp::Client::ConnectionManagerInterface& mainInterface, QObject* parent);
00534 
00552     Q_PROPERTY(QStringList Interfaces READ _deprecated_Interfaces)
00553 
00554     
00563     inline TELEPATHY_QT4_DEPRECATED QStringList Interfaces() const
00564     {
00565         return _deprecated_Interfaces();
00566     }
00567 
00568 private:
00569     inline QStringList _deprecated_Interfaces() const
00570     {
00571         return qvariant_cast<QStringList>(internalPropGet("Interfaces"));
00572     }
00573 public:
00574 
00596     inline Tp::PendingVariant *requestPropertyInterfaces() const
00597     {
00598         return internalRequestProperty(QLatin1String("Interfaces"));
00599     }
00600 
00616     Q_PROPERTY(Tp::ParamSpecList Parameters READ _deprecated_Parameters)
00617 
00618     
00627     inline TELEPATHY_QT4_DEPRECATED Tp::ParamSpecList Parameters() const
00628     {
00629         return _deprecated_Parameters();
00630     }
00631 
00632 private:
00633     inline Tp::ParamSpecList _deprecated_Parameters() const
00634     {
00635         return qvariant_cast<Tp::ParamSpecList>(internalPropGet("Parameters"));
00636     }
00637 public:
00638 
00658     inline Tp::PendingVariant *requestPropertyParameters() const
00659     {
00660         return internalRequestProperty(QLatin1String("Parameters"));
00661     }
00662 
00681     Q_PROPERTY(QStringList ConnectionInterfaces READ _deprecated_ConnectionInterfaces)
00682 
00683     
00692     inline TELEPATHY_QT4_DEPRECATED QStringList ConnectionInterfaces() const
00693     {
00694         return _deprecated_ConnectionInterfaces();
00695     }
00696 
00697 private:
00698     inline QStringList _deprecated_ConnectionInterfaces() const
00699     {
00700         return qvariant_cast<QStringList>(internalPropGet("ConnectionInterfaces"));
00701     }
00702 public:
00703 
00726     inline Tp::PendingVariant *requestPropertyConnectionInterfaces() const
00727     {
00728         return internalRequestProperty(QLatin1String("ConnectionInterfaces"));
00729     }
00730 
00792     Q_PROPERTY(Tp::RequestableChannelClassList RequestableChannelClasses READ _deprecated_RequestableChannelClasses)
00793 
00794     
00803     inline TELEPATHY_QT4_DEPRECATED Tp::RequestableChannelClassList RequestableChannelClasses() const
00804     {
00805         return _deprecated_RequestableChannelClasses();
00806     }
00807 
00808 private:
00809     inline Tp::RequestableChannelClassList _deprecated_RequestableChannelClasses() const
00810     {
00811         return qvariant_cast<Tp::RequestableChannelClassList>(internalPropGet("RequestableChannelClasses"));
00812     }
00813 public:
00814 
00880     inline Tp::PendingVariant *requestPropertyRequestableChannelClasses() const
00881     {
00882         return internalRequestProperty(QLatin1String("RequestableChannelClasses"));
00883     }
00884 
00928     Q_PROPERTY(QString VCardField READ _deprecated_VCardField)
00929 
00930     
00939     inline TELEPATHY_QT4_DEPRECATED QString VCardField() const
00940     {
00941         return _deprecated_VCardField();
00942     }
00943 
00944 private:
00945     inline QString _deprecated_VCardField() const
00946     {
00947         return qvariant_cast<QString>(internalPropGet("VCardField"));
00948     }
00949 public:
00950 
00998     inline Tp::PendingVariant *requestPropertyVCardField() const
00999     {
01000         return internalRequestProperty(QLatin1String("VCardField"));
01001     }
01002 
01035     Q_PROPERTY(QString EnglishName READ _deprecated_EnglishName)
01036 
01037     
01046     inline TELEPATHY_QT4_DEPRECATED QString EnglishName() const
01047     {
01048         return _deprecated_EnglishName();
01049     }
01050 
01051 private:
01052     inline QString _deprecated_EnglishName() const
01053     {
01054         return qvariant_cast<QString>(internalPropGet("EnglishName"));
01055     }
01056 public:
01057 
01094     inline Tp::PendingVariant *requestPropertyEnglishName() const
01095     {
01096         return internalRequestProperty(QLatin1String("EnglishName"));
01097     }
01098 
01122     Q_PROPERTY(QString Icon READ _deprecated_Icon)
01123 
01124     
01133     inline TELEPATHY_QT4_DEPRECATED QString Icon() const
01134     {
01135         return _deprecated_Icon();
01136     }
01137 
01138 private:
01139     inline QString _deprecated_Icon() const
01140     {
01141         return qvariant_cast<QString>(internalPropGet("Icon"));
01142     }
01143 public:
01144 
01172     inline Tp::PendingVariant *requestPropertyIcon() const
01173     {
01174         return internalRequestProperty(QLatin1String("Icon"));
01175     }
01176 
01183     Tp::PendingVariantMap *requestAllProperties() const
01184     {
01185         return internalRequestAllProperties();
01186     }
01187 
01188 public Q_SLOTS:
01219     inline QDBusPendingReply<QString> IdentifyAccount(const QVariantMap& parameters)
01220     {
01221         if (!invalidationReason().isEmpty()) {
01222             return QDBusPendingReply<QString>(QDBusMessage::createError(
01223                 invalidationReason(),
01224                 invalidationMessage()
01225             ));
01226         }
01227 
01228         QList<QVariant> argumentList;
01229         argumentList << QVariant::fromValue(parameters);
01230         return asyncCallWithArgumentList(QLatin1String("IdentifyAccount"), argumentList);
01231     }
01232 
01280     inline QDBusPendingReply<QString> NormalizeContact(const QString& contactID)
01281     {
01282         if (!invalidationReason().isEmpty()) {
01283             return QDBusPendingReply<QString>(QDBusMessage::createError(
01284                 invalidationReason(),
01285                 invalidationMessage()
01286             ));
01287         }
01288 
01289         QList<QVariant> argumentList;
01290         argumentList << QVariant::fromValue(contactID);
01291         return asyncCallWithArgumentList(QLatin1String("NormalizeContact"), argumentList);
01292     }
01293 
01294 protected:
01295     virtual void invalidate(Tp::DBusProxy *, const QString &, const QString &);
01296 };
01297 }
01298 }
01299 Q_DECLARE_METATYPE(Tp::Client::ConnectionManagerInterface*)
01300 Q_DECLARE_METATYPE(Tp::Client::ProtocolInterface*)


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