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

cli-media-stream-handler.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 MediaStreamHandlerInterface : public Tp::AbstractInterface
00054 {
00055     Q_OBJECT
00056 
00057 public:
00064     static inline const char *staticInterfaceName()
00065     {
00066         return "org.freedesktop.Telepathy.Media.StreamHandler";
00067     }
00068 
00076     MediaStreamHandlerInterface(
00077         const QString& busName,
00078         const QString& objectPath,
00079         QObject* parent = 0
00080     );
00081 
00090     MediaStreamHandlerInterface(
00091         const QDBusConnection& connection,
00092         const QString& busName,
00093         const QString& objectPath,
00094         QObject* parent = 0
00095     );
00096 
00103     MediaStreamHandlerInterface(Tp::DBusProxy *proxy);
00104 
00116     Q_PROPERTY(Tp::SocketAddressIPList STUNServers READ _deprecated_STUNServers)
00117 
00118     
00127     inline TELEPATHY_QT4_DEPRECATED Tp::SocketAddressIPList STUNServers() const
00128     {
00129         return _deprecated_STUNServers();
00130     }
00131 
00132 private:
00133     inline Tp::SocketAddressIPList _deprecated_STUNServers() const
00134     {
00135         return qvariant_cast<Tp::SocketAddressIPList>(internalPropGet("STUNServers"));
00136     }
00137 public:
00138 
00154     inline Tp::PendingVariant *requestPropertySTUNServers() const
00155     {
00156         return internalRequestProperty(QLatin1String("STUNServers"));
00157     }
00158 
00166     Q_PROPERTY(bool CreatedLocally READ _deprecated_CreatedLocally)
00167 
00168     
00177     inline TELEPATHY_QT4_DEPRECATED bool CreatedLocally() const
00178     {
00179         return _deprecated_CreatedLocally();
00180     }
00181 
00182 private:
00183     inline bool _deprecated_CreatedLocally() const
00184     {
00185         return qvariant_cast<bool>(internalPropGet("CreatedLocally"));
00186     }
00187 public:
00188 
00200     inline Tp::PendingVariant *requestPropertyCreatedLocally() const
00201     {
00202         return internalRequestProperty(QLatin1String("CreatedLocally"));
00203     }
00204 
00240     Q_PROPERTY(QString NATTraversal READ _deprecated_NATTraversal)
00241 
00242     
00251     inline TELEPATHY_QT4_DEPRECATED QString NATTraversal() const
00252     {
00253         return _deprecated_NATTraversal();
00254     }
00255 
00256 private:
00257     inline QString _deprecated_NATTraversal() const
00258     {
00259         return qvariant_cast<QString>(internalPropGet("NATTraversal"));
00260     }
00261 public:
00262 
00302     inline Tp::PendingVariant *requestPropertyNATTraversal() const
00303     {
00304         return internalRequestProperty(QLatin1String("NATTraversal"));
00305     }
00306 
00381     Q_PROPERTY(Tp::StringVariantMapList RelayInfo READ _deprecated_RelayInfo)
00382 
00383     
00392     inline TELEPATHY_QT4_DEPRECATED Tp::StringVariantMapList RelayInfo() const
00393     {
00394         return _deprecated_RelayInfo();
00395     }
00396 
00397 private:
00398     inline Tp::StringVariantMapList _deprecated_RelayInfo() const
00399     {
00400         return qvariant_cast<Tp::StringVariantMapList>(internalPropGet("RelayInfo"));
00401     }
00402 public:
00403 
00482     inline Tp::PendingVariant *requestPropertyRelayInfo() const
00483     {
00484         return internalRequestProperty(QLatin1String("RelayInfo"));
00485     }
00486 
00493     Tp::PendingVariantMap *requestAllProperties() const
00494     {
00495         return internalRequestAllProperties();
00496     }
00497 
00498 public Q_SLOTS:
00504     inline QDBusPendingReply<> CodecChoice(uint codecID)
00505     {
00506         if (!invalidationReason().isEmpty()) {
00507             return QDBusPendingReply<>(QDBusMessage::createError(
00508                 invalidationReason(),
00509                 invalidationMessage()
00510             ));
00511         }
00512 
00513         QList<QVariant> argumentList;
00514         argumentList << QVariant::fromValue(codecID);
00515         return asyncCallWithArgumentList(QLatin1String("CodecChoice"), argumentList);
00516     }
00517 
00533     inline QDBusPendingReply<> Error(uint errorCode, const QString& message)
00534     {
00535         if (!invalidationReason().isEmpty()) {
00536             return QDBusPendingReply<>(QDBusMessage::createError(
00537                 invalidationReason(),
00538                 invalidationMessage()
00539             ));
00540         }
00541 
00542         QList<QVariant> argumentList;
00543         argumentList << QVariant::fromValue(errorCode) << QVariant::fromValue(message);
00544         return asyncCallWithArgumentList(QLatin1String("Error"), argumentList);
00545     }
00546 
00553     inline QDBusPendingReply<> NativeCandidatesPrepared()
00554     {
00555         if (!invalidationReason().isEmpty()) {
00556             return QDBusPendingReply<>(QDBusMessage::createError(
00557                 invalidationReason(),
00558                 invalidationMessage()
00559             ));
00560         }
00561 
00562         return asyncCall(QLatin1String("NativeCandidatesPrepared"));
00563     }
00564 
00571     inline QDBusPendingReply<> NewActiveCandidatePair(const QString& nativeCandidateID, const QString& remoteCandidateID)
00572     {
00573         if (!invalidationReason().isEmpty()) {
00574             return QDBusPendingReply<>(QDBusMessage::createError(
00575                 invalidationReason(),
00576                 invalidationMessage()
00577             ));
00578         }
00579 
00580         QList<QVariant> argumentList;
00581         argumentList << QVariant::fromValue(nativeCandidateID) << QVariant::fromValue(remoteCandidateID);
00582         return asyncCallWithArgumentList(QLatin1String("NewActiveCandidatePair"), argumentList);
00583     }
00584 
00612     inline QDBusPendingReply<> NewNativeCandidate(const QString& candidateID, const Tp::MediaStreamHandlerTransportList& transports)
00613     {
00614         if (!invalidationReason().isEmpty()) {
00615             return QDBusPendingReply<>(QDBusMessage::createError(
00616                 invalidationReason(),
00617                 invalidationMessage()
00618             ));
00619         }
00620 
00621         QList<QVariant> argumentList;
00622         argumentList << QVariant::fromValue(candidateID) << QVariant::fromValue(transports);
00623         return asyncCallWithArgumentList(QLatin1String("NewNativeCandidate"), argumentList);
00624     }
00625 
00636     inline QDBusPendingReply<> Ready(const Tp::MediaStreamHandlerCodecList& codecs)
00637     {
00638         if (!invalidationReason().isEmpty()) {
00639             return QDBusPendingReply<>(QDBusMessage::createError(
00640                 invalidationReason(),
00641                 invalidationMessage()
00642             ));
00643         }
00644 
00645         QList<QVariant> argumentList;
00646         argumentList << QVariant::fromValue(codecs);
00647         return asyncCallWithArgumentList(QLatin1String("Ready"), argumentList);
00648     }
00649 
00672     inline QDBusPendingReply<> SetLocalCodecs(const Tp::MediaStreamHandlerCodecList& codecs)
00673     {
00674         if (!invalidationReason().isEmpty()) {
00675             return QDBusPendingReply<>(QDBusMessage::createError(
00676                 invalidationReason(),
00677                 invalidationMessage()
00678             ));
00679         }
00680 
00681         QList<QVariant> argumentList;
00682         argumentList << QVariant::fromValue(codecs);
00683         return asyncCallWithArgumentList(QLatin1String("SetLocalCodecs"), argumentList);
00684     }
00685 
00692     inline QDBusPendingReply<> StreamState(uint state)
00693     {
00694         if (!invalidationReason().isEmpty()) {
00695             return QDBusPendingReply<>(QDBusMessage::createError(
00696                 invalidationReason(),
00697                 invalidationMessage()
00698             ));
00699         }
00700 
00701         QList<QVariant> argumentList;
00702         argumentList << QVariant::fromValue(state);
00703         return asyncCallWithArgumentList(QLatin1String("StreamState"), argumentList);
00704     }
00705 
00719     inline QDBusPendingReply<> SupportedCodecs(const Tp::MediaStreamHandlerCodecList& codecs)
00720     {
00721         if (!invalidationReason().isEmpty()) {
00722             return QDBusPendingReply<>(QDBusMessage::createError(
00723                 invalidationReason(),
00724                 invalidationMessage()
00725             ));
00726         }
00727 
00728         QList<QVariant> argumentList;
00729         argumentList << QVariant::fromValue(codecs);
00730         return asyncCallWithArgumentList(QLatin1String("SupportedCodecs"), argumentList);
00731     }
00732 
00746     inline QDBusPendingReply<> CodecsUpdated(const Tp::MediaStreamHandlerCodecList& codecs)
00747     {
00748         if (!invalidationReason().isEmpty()) {
00749             return QDBusPendingReply<>(QDBusMessage::createError(
00750                 invalidationReason(),
00751                 invalidationMessage()
00752             ));
00753         }
00754 
00755         QList<QVariant> argumentList;
00756         argumentList << QVariant::fromValue(codecs);
00757         return asyncCallWithArgumentList(QLatin1String("CodecsUpdated"), argumentList);
00758     }
00759 
00770     inline QDBusPendingReply<> HoldState(bool held)
00771     {
00772         if (!invalidationReason().isEmpty()) {
00773             return QDBusPendingReply<>(QDBusMessage::createError(
00774                 invalidationReason(),
00775                 invalidationMessage()
00776             ));
00777         }
00778 
00779         QList<QVariant> argumentList;
00780         argumentList << QVariant::fromValue(held);
00781         return asyncCallWithArgumentList(QLatin1String("HoldState"), argumentList);
00782     }
00783 
00791     inline QDBusPendingReply<> UnholdFailure()
00792     {
00793         if (!invalidationReason().isEmpty()) {
00794             return QDBusPendingReply<>(QDBusMessage::createError(
00795                 invalidationReason(),
00796                 invalidationMessage()
00797             ));
00798         }
00799 
00800         return asyncCall(QLatin1String("UnholdFailure"));
00801     }
00802 
00803 Q_SIGNALS:
00819     void AddRemoteCandidate(const QString& candidateID, const Tp::MediaStreamHandlerTransportList& transports);
00820 
00827     void Close();
00828 
00840     void RemoveRemoteCandidate(const QString& candidateID);
00841 
00849     void SetActiveCandidatePair(const QString& nativeCandidateID, const QString& remoteCandidateID);
00850 
00862     void SetRemoteCandidateList(const Tp::MediaStreamHandlerCandidateList& remoteCandidates);
00863 
00876     void SetRemoteCodecs(const Tp::MediaStreamHandlerCodecList& codecs);
00877 
00887     void SetStreamPlaying(bool playing);
00888 
00895     void SetStreamSending(bool sending);
00896 
00907     void StartTelephonyEvent(uchar event);
00908 
00915     void StopTelephonyEvent();
00916 
00948     void SetStreamHeld(bool held);
00949 
00950 protected:
00951     virtual void invalidate(Tp::DBusProxy *, const QString &, const QString &);
00952 };
00953 }
00954 }
00955 Q_DECLARE_METATYPE(Tp::Client::MediaStreamHandlerInterface*)


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