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 {
00028 class PendingVariant;
00029 class PendingOperation;
00030 }
00031 
00032 namespace Tp
00033 {
00034 namespace Client
00035 {
00036 
00044 class TELEPATHY_QT4_EXPORT MediaStreamHandlerInterface : public Tp::AbstractInterface
00045 {
00046     Q_OBJECT
00047 
00048 public:
00055     static inline QLatin1String staticInterfaceName()
00056     {
00057         return QLatin1String("org.freedesktop.Telepathy.Media.StreamHandler");
00058     }
00059 
00067     MediaStreamHandlerInterface(
00068         const QString& busName,
00069         const QString& objectPath,
00070         QObject* parent = 0
00071     );
00072 
00081     MediaStreamHandlerInterface(
00082         const QDBusConnection& connection,
00083         const QString& busName,
00084         const QString& objectPath,
00085         QObject* parent = 0
00086     );
00087 
00094     MediaStreamHandlerInterface(Tp::DBusProxy *proxy);
00095 
00111     inline Tp::PendingVariant *requestPropertySTUNServers() const
00112     {
00113         return internalRequestProperty(QLatin1String("STUNServers"));
00114     }
00115 
00127     inline Tp::PendingVariant *requestPropertyCreatedLocally() const
00128     {
00129         return internalRequestProperty(QLatin1String("CreatedLocally"));
00130     }
00131 
00171     inline Tp::PendingVariant *requestPropertyNATTraversal() const
00172     {
00173         return internalRequestProperty(QLatin1String("NATTraversal"));
00174     }
00175 
00254     inline Tp::PendingVariant *requestPropertyRelayInfo() const
00255     {
00256         return internalRequestProperty(QLatin1String("RelayInfo"));
00257     }
00258 
00265     Tp::PendingVariantMap *requestAllProperties() const
00266     {
00267         return internalRequestAllProperties();
00268     }
00269 
00270 public Q_SLOTS:
00281     inline QDBusPendingReply<> CodecChoice(uint codecID, int timeout = -1)
00282     {
00283         if (!invalidationReason().isEmpty()) {
00284             return QDBusPendingReply<>(QDBusMessage::createError(
00285                 invalidationReason(),
00286                 invalidationMessage()
00287             ));
00288         }
00289 
00290         QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
00291                 this->staticInterfaceName(), QLatin1String("CodecChoice"));
00292         callMessage << QVariant::fromValue(codecID);
00293         return this->connection().asyncCall(callMessage, timeout);
00294     }
00295 
00316     inline QDBusPendingReply<> Error(uint errorCode, const QString& message, int timeout = -1)
00317     {
00318         if (!invalidationReason().isEmpty()) {
00319             return QDBusPendingReply<>(QDBusMessage::createError(
00320                 invalidationReason(),
00321                 invalidationMessage()
00322             ));
00323         }
00324 
00325         QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
00326                 this->staticInterfaceName(), QLatin1String("Error"));
00327         callMessage << QVariant::fromValue(errorCode) << QVariant::fromValue(message);
00328         return this->connection().asyncCall(callMessage, timeout);
00329     }
00330 
00342     inline QDBusPendingReply<> NativeCandidatesPrepared(int timeout = -1)
00343     {
00344         if (!invalidationReason().isEmpty()) {
00345             return QDBusPendingReply<>(QDBusMessage::createError(
00346                 invalidationReason(),
00347                 invalidationMessage()
00348             ));
00349         }
00350 
00351         QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
00352                 this->staticInterfaceName(), QLatin1String("NativeCandidatesPrepared"));
00353         return this->connection().asyncCall(callMessage, timeout);
00354     }
00355 
00367     inline QDBusPendingReply<> NewActiveCandidatePair(const QString& nativeCandidateID, const QString& remoteCandidateID, int timeout = -1)
00368     {
00369         if (!invalidationReason().isEmpty()) {
00370             return QDBusPendingReply<>(QDBusMessage::createError(
00371                 invalidationReason(),
00372                 invalidationMessage()
00373             ));
00374         }
00375 
00376         QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
00377                 this->staticInterfaceName(), QLatin1String("NewActiveCandidatePair"));
00378         callMessage << QVariant::fromValue(nativeCandidateID) << QVariant::fromValue(remoteCandidateID);
00379         return this->connection().asyncCall(callMessage, timeout);
00380     }
00381 
00414     inline QDBusPendingReply<> NewNativeCandidate(const QString& candidateID, const Tp::MediaStreamHandlerTransportList& transports, int timeout = -1)
00415     {
00416         if (!invalidationReason().isEmpty()) {
00417             return QDBusPendingReply<>(QDBusMessage::createError(
00418                 invalidationReason(),
00419                 invalidationMessage()
00420             ));
00421         }
00422 
00423         QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
00424                 this->staticInterfaceName(), QLatin1String("NewNativeCandidate"));
00425         callMessage << QVariant::fromValue(candidateID) << QVariant::fromValue(transports);
00426         return this->connection().asyncCall(callMessage, timeout);
00427     }
00428 
00444     inline QDBusPendingReply<> Ready(const Tp::MediaStreamHandlerCodecList& codecs, int timeout = -1)
00445     {
00446         if (!invalidationReason().isEmpty()) {
00447             return QDBusPendingReply<>(QDBusMessage::createError(
00448                 invalidationReason(),
00449                 invalidationMessage()
00450             ));
00451         }
00452 
00453         QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
00454                 this->staticInterfaceName(), QLatin1String("Ready"));
00455         callMessage << QVariant::fromValue(codecs);
00456         return this->connection().asyncCall(callMessage, timeout);
00457     }
00458 
00486     inline QDBusPendingReply<> SetLocalCodecs(const Tp::MediaStreamHandlerCodecList& codecs, int timeout = -1)
00487     {
00488         if (!invalidationReason().isEmpty()) {
00489             return QDBusPendingReply<>(QDBusMessage::createError(
00490                 invalidationReason(),
00491                 invalidationMessage()
00492             ));
00493         }
00494 
00495         QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
00496                 this->staticInterfaceName(), QLatin1String("SetLocalCodecs"));
00497         callMessage << QVariant::fromValue(codecs);
00498         return this->connection().asyncCall(callMessage, timeout);
00499     }
00500 
00512     inline QDBusPendingReply<> StreamState(uint state, int timeout = -1)
00513     {
00514         if (!invalidationReason().isEmpty()) {
00515             return QDBusPendingReply<>(QDBusMessage::createError(
00516                 invalidationReason(),
00517                 invalidationMessage()
00518             ));
00519         }
00520 
00521         QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
00522                 this->staticInterfaceName(), QLatin1String("StreamState"));
00523         callMessage << QVariant::fromValue(state);
00524         return this->connection().asyncCall(callMessage, timeout);
00525     }
00526 
00545     inline QDBusPendingReply<> SupportedCodecs(const Tp::MediaStreamHandlerCodecList& codecs, int timeout = -1)
00546     {
00547         if (!invalidationReason().isEmpty()) {
00548             return QDBusPendingReply<>(QDBusMessage::createError(
00549                 invalidationReason(),
00550                 invalidationMessage()
00551             ));
00552         }
00553 
00554         QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
00555                 this->staticInterfaceName(), QLatin1String("SupportedCodecs"));
00556         callMessage << QVariant::fromValue(codecs);
00557         return this->connection().asyncCall(callMessage, timeout);
00558     }
00559 
00578     inline QDBusPendingReply<> CodecsUpdated(const Tp::MediaStreamHandlerCodecList& codecs, int timeout = -1)
00579     {
00580         if (!invalidationReason().isEmpty()) {
00581             return QDBusPendingReply<>(QDBusMessage::createError(
00582                 invalidationReason(),
00583                 invalidationMessage()
00584             ));
00585         }
00586 
00587         QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
00588                 this->staticInterfaceName(), QLatin1String("CodecsUpdated"));
00589         callMessage << QVariant::fromValue(codecs);
00590         return this->connection().asyncCall(callMessage, timeout);
00591     }
00592 
00608     inline QDBusPendingReply<> HoldState(bool held, int timeout = -1)
00609     {
00610         if (!invalidationReason().isEmpty()) {
00611             return QDBusPendingReply<>(QDBusMessage::createError(
00612                 invalidationReason(),
00613                 invalidationMessage()
00614             ));
00615         }
00616 
00617         QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
00618                 this->staticInterfaceName(), QLatin1String("HoldState"));
00619         callMessage << QVariant::fromValue(held);
00620         return this->connection().asyncCall(callMessage, timeout);
00621     }
00622 
00635     inline QDBusPendingReply<> UnholdFailure(int timeout = -1)
00636     {
00637         if (!invalidationReason().isEmpty()) {
00638             return QDBusPendingReply<>(QDBusMessage::createError(
00639                 invalidationReason(),
00640                 invalidationMessage()
00641             ));
00642         }
00643 
00644         QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
00645                 this->staticInterfaceName(), QLatin1String("UnholdFailure"));
00646         return this->connection().asyncCall(callMessage, timeout);
00647     }
00648 
00649 Q_SIGNALS:
00665     void AddRemoteCandidate(const QString& candidateID, const Tp::MediaStreamHandlerTransportList& transports);
00666 
00673     void Close();
00674 
00686     void RemoveRemoteCandidate(const QString& candidateID);
00687 
00695     void SetActiveCandidatePair(const QString& nativeCandidateID, const QString& remoteCandidateID);
00696 
00708     void SetRemoteCandidateList(const Tp::MediaStreamHandlerCandidateList& remoteCandidates);
00709 
00722     void SetRemoteCodecs(const Tp::MediaStreamHandlerCodecList& codecs);
00723 
00733     void SetStreamPlaying(bool playing);
00734 
00741     void SetStreamSending(bool sending);
00742 
00753     void StartTelephonyEvent(uchar event);
00754 
00761     void StopTelephonyEvent();
00762 
00794     void SetStreamHeld(bool held);
00795 
00796 protected:
00797     virtual void invalidate(Tp::DBusProxy *, const QString &, const QString &);
00798 };
00799 }
00800 }
00801 Q_DECLARE_METATYPE(Tp::Client::MediaStreamHandlerInterface*)


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