Home · Modules · All Classes · All Namespaces
cli-media-stream-handler.h
1 /*
2  * This file contains D-Bus client proxy classes generated by qt-client-gen.py.
3  *
4  * This file can be distributed under the same terms as the specification from
5  * which it was generated.
6  */
7 
8 #ifndef IN_TP_QT_HEADER
9 #error IN_TP_QT_HEADER
10 #endif
11 
12 #include <TelepathyQt/Types>
13 
14 #include <QtGlobal>
15 
16 #include <QString>
17 #include <QObject>
18 #include <QVariant>
19 
20 #include <QDBusPendingReply>
21 
22 #include <TelepathyQt/AbstractInterface>
23 #include <TelepathyQt/DBusProxy>
24 #include <TelepathyQt/Global>
25 
26 namespace Tp
27 {
28 class PendingVariant;
29 class PendingOperation;
30 }
31 
32 namespace Tp
33 {
34 namespace Client
35 {
36 
45 {
46  Q_OBJECT
47 
48 public:
55  static inline QLatin1String staticInterfaceName()
56  {
57  return QLatin1String("org.freedesktop.Telepathy.Media.StreamHandler");
58  }
59 
68  const QString& busName,
69  const QString& objectPath,
70  QObject* parent = 0
71  );
72 
82  const QDBusConnection& connection,
83  const QString& busName,
84  const QString& objectPath,
85  QObject* parent = 0
86  );
87 
95 
112  {
113  return internalRequestProperty(QLatin1String("STUNServers"));
114  }
115 
128  {
129  return internalRequestProperty(QLatin1String("CreatedLocally"));
130  }
131 
174  {
175  return internalRequestProperty(QLatin1String("NATTraversal"));
176  }
177 
259  {
260  return internalRequestProperty(QLatin1String("RelayInfo"));
261  }
262 
270  {
271  return internalRequestAllProperties();
272  }
273 
274 public Q_SLOTS:
285  inline QDBusPendingReply<> CodecChoice(uint codecID, int timeout = -1)
286  {
287  if (!invalidationReason().isEmpty()) {
288  return QDBusPendingReply<>(QDBusMessage::createError(
289  invalidationReason(),
290  invalidationMessage()
291  ));
292  }
293 
294  QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
295  this->staticInterfaceName(), QLatin1String("CodecChoice"));
296  callMessage << QVariant::fromValue(codecID);
297  return this->connection().asyncCall(callMessage, timeout);
298  }
299 
320  inline QDBusPendingReply<> Error(uint errorCode, const QString& message, int timeout = -1)
321  {
322  if (!invalidationReason().isEmpty()) {
323  return QDBusPendingReply<>(QDBusMessage::createError(
324  invalidationReason(),
325  invalidationMessage()
326  ));
327  }
328 
329  QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
330  this->staticInterfaceName(), QLatin1String("Error"));
331  callMessage << QVariant::fromValue(errorCode) << QVariant::fromValue(message);
332  return this->connection().asyncCall(callMessage, timeout);
333  }
334 
346  inline QDBusPendingReply<> NativeCandidatesPrepared(int timeout = -1)
347  {
348  if (!invalidationReason().isEmpty()) {
349  return QDBusPendingReply<>(QDBusMessage::createError(
350  invalidationReason(),
351  invalidationMessage()
352  ));
353  }
354 
355  QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
356  this->staticInterfaceName(), QLatin1String("NativeCandidatesPrepared"));
357  return this->connection().asyncCall(callMessage, timeout);
358  }
359 
371  inline QDBusPendingReply<> NewActiveCandidatePair(const QString& nativeCandidateID, const QString& remoteCandidateID, int timeout = -1)
372  {
373  if (!invalidationReason().isEmpty()) {
374  return QDBusPendingReply<>(QDBusMessage::createError(
375  invalidationReason(),
376  invalidationMessage()
377  ));
378  }
379 
380  QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
381  this->staticInterfaceName(), QLatin1String("NewActiveCandidatePair"));
382  callMessage << QVariant::fromValue(nativeCandidateID) << QVariant::fromValue(remoteCandidateID);
383  return this->connection().asyncCall(callMessage, timeout);
384  }
385 
413  inline QDBusPendingReply<> NewActiveTransportPair(const QString& nativeCandidateID, const Tp::MediaStreamHandlerTransport& nativeTransport, const QString& remoteCandidateID, const Tp::MediaStreamHandlerTransport& remoteTransport, int timeout = -1)
414  {
415  if (!invalidationReason().isEmpty()) {
416  return QDBusPendingReply<>(QDBusMessage::createError(
417  invalidationReason(),
418  invalidationMessage()
419  ));
420  }
421 
422  QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
423  this->staticInterfaceName(), QLatin1String("NewActiveTransportPair"));
424  callMessage << QVariant::fromValue(nativeCandidateID) << QVariant::fromValue(nativeTransport) << QVariant::fromValue(remoteCandidateID) << QVariant::fromValue(remoteTransport);
425  return this->connection().asyncCall(callMessage, timeout);
426  }
427 
462  inline QDBusPendingReply<> NewNativeCandidate(const QString& candidateID, const Tp::MediaStreamHandlerTransportList& transports, int timeout = -1)
463  {
464  if (!invalidationReason().isEmpty()) {
465  return QDBusPendingReply<>(QDBusMessage::createError(
466  invalidationReason(),
467  invalidationMessage()
468  ));
469  }
470 
471  QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
472  this->staticInterfaceName(), QLatin1String("NewNativeCandidate"));
473  callMessage << QVariant::fromValue(candidateID) << QVariant::fromValue(transports);
474  return this->connection().asyncCall(callMessage, timeout);
475  }
476 
492  inline QDBusPendingReply<> Ready(const Tp::MediaStreamHandlerCodecList& codecs, int timeout = -1)
493  {
494  if (!invalidationReason().isEmpty()) {
495  return QDBusPendingReply<>(QDBusMessage::createError(
496  invalidationReason(),
497  invalidationMessage()
498  ));
499  }
500 
501  QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
502  this->staticInterfaceName(), QLatin1String("Ready"));
503  callMessage << QVariant::fromValue(codecs);
504  return this->connection().asyncCall(callMessage, timeout);
505  }
506 
536  inline QDBusPendingReply<> SetLocalCodecs(const Tp::MediaStreamHandlerCodecList& codecs, int timeout = -1)
537  {
538  if (!invalidationReason().isEmpty()) {
539  return QDBusPendingReply<>(QDBusMessage::createError(
540  invalidationReason(),
541  invalidationMessage()
542  ));
543  }
544 
545  QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
546  this->staticInterfaceName(), QLatin1String("SetLocalCodecs"));
547  callMessage << QVariant::fromValue(codecs);
548  return this->connection().asyncCall(callMessage, timeout);
549  }
550 
562  inline QDBusPendingReply<> StreamState(uint state, int timeout = -1)
563  {
564  if (!invalidationReason().isEmpty()) {
565  return QDBusPendingReply<>(QDBusMessage::createError(
566  invalidationReason(),
567  invalidationMessage()
568  ));
569  }
570 
571  QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
572  this->staticInterfaceName(), QLatin1String("StreamState"));
573  callMessage << QVariant::fromValue(state);
574  return this->connection().asyncCall(callMessage, timeout);
575  }
576 
595  inline QDBusPendingReply<> SupportedCodecs(const Tp::MediaStreamHandlerCodecList& codecs, int timeout = -1)
596  {
597  if (!invalidationReason().isEmpty()) {
598  return QDBusPendingReply<>(QDBusMessage::createError(
599  invalidationReason(),
600  invalidationMessage()
601  ));
602  }
603 
604  QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
605  this->staticInterfaceName(), QLatin1String("SupportedCodecs"));
606  callMessage << QVariant::fromValue(codecs);
607  return this->connection().asyncCall(callMessage, timeout);
608  }
609 
628  inline QDBusPendingReply<> CodecsUpdated(const Tp::MediaStreamHandlerCodecList& codecs, int timeout = -1)
629  {
630  if (!invalidationReason().isEmpty()) {
631  return QDBusPendingReply<>(QDBusMessage::createError(
632  invalidationReason(),
633  invalidationMessage()
634  ));
635  }
636 
637  QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
638  this->staticInterfaceName(), QLatin1String("CodecsUpdated"));
639  callMessage << QVariant::fromValue(codecs);
640  return this->connection().asyncCall(callMessage, timeout);
641  }
642 
658  inline QDBusPendingReply<> HoldState(bool held, int timeout = -1)
659  {
660  if (!invalidationReason().isEmpty()) {
661  return QDBusPendingReply<>(QDBusMessage::createError(
662  invalidationReason(),
663  invalidationMessage()
664  ));
665  }
666 
667  QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
668  this->staticInterfaceName(), QLatin1String("HoldState"));
669  callMessage << QVariant::fromValue(held);
670  return this->connection().asyncCall(callMessage, timeout);
671  }
672 
685  inline QDBusPendingReply<> UnholdFailure(int timeout = -1)
686  {
687  if (!invalidationReason().isEmpty()) {
688  return QDBusPendingReply<>(QDBusMessage::createError(
689  invalidationReason(),
690  invalidationMessage()
691  ));
692  }
693 
694  QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
695  this->staticInterfaceName(), QLatin1String("UnholdFailure"));
696  return this->connection().asyncCall(callMessage, timeout);
697  }
698 
715  inline QDBusPendingReply<> SupportedFeedbackMessages(const Tp::RTCPFeedbackMessageMap& messages, int timeout = -1)
716  {
717  if (!invalidationReason().isEmpty()) {
718  return QDBusPendingReply<>(QDBusMessage::createError(
719  invalidationReason(),
720  invalidationMessage()
721  ));
722  }
723 
724  QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
725  this->staticInterfaceName(), QLatin1String("SupportedFeedbackMessages"));
726  callMessage << QVariant::fromValue(messages);
727  return this->connection().asyncCall(callMessage, timeout);
728  }
729 
747  inline QDBusPendingReply<> SupportedHeaderExtensions(const Tp::RTPHeaderExtensionsList& headerExtensions, int timeout = -1)
748  {
749  if (!invalidationReason().isEmpty()) {
750  return QDBusPendingReply<>(QDBusMessage::createError(
751  invalidationReason(),
752  invalidationMessage()
753  ));
754  }
755 
756  QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
757  this->staticInterfaceName(), QLatin1String("SupportedHeaderExtensions"));
758  callMessage << QVariant::fromValue(headerExtensions);
759  return this->connection().asyncCall(callMessage, timeout);
760  }
761 
762 Q_SIGNALS:
778  void AddRemoteCandidate(const QString& candidateID, const Tp::MediaStreamHandlerTransportList& transports);
779 
786  void Close();
787 
799  void RemoveRemoteCandidate(const QString& candidateID);
800 
808  void SetActiveCandidatePair(const QString& nativeCandidateID, const QString& remoteCandidateID);
809 
821  void SetRemoteCandidateList(const Tp::MediaStreamHandlerCandidateList& remoteCandidates);
822 
835  void SetRemoteCodecs(const Tp::MediaStreamHandlerCodecList& codecs);
836 
846  void SetStreamPlaying(bool playing);
847 
854  void SetStreamSending(bool sending);
855 
866  void StartTelephonyEvent(uchar event);
867 
887  void StartNamedTelephonyEvent(uchar event, uint codecID);
888 
901  void StartSoundTelephonyEvent(uchar event);
902 
909  void StopTelephonyEvent();
910 
944  void SetStreamHeld(bool held);
945 
959  void SetRemoteFeedbackMessages(const Tp::RTCPFeedbackMessageMap& messages);
960 
974  void SetRemoteHeaderExtensions(const Tp::RTPHeaderExtensionsList& headerExtensions);
975 
976 protected:
977  virtual void invalidate(Tp::DBusProxy *, const QString &, const QString &);
978 };
979 }
980 }
981 Q_DECLARE_METATYPE(Tp::Client::MediaStreamHandlerInterface*)
Tp::PendingVariant * requestPropertyNATTraversal() const
Definition: cli-media-stream-handler.h:173
QList< MediaStreamHandlerCandidate > MediaStreamHandlerCandidateList
Definition: build/TelepathyQt/_gen/types.h:3714
Definition: build/TelepathyQt/_gen/types.h:1978
QDBusPendingReply SupportedCodecs(const Tp::MediaStreamHandlerCodecList &codecs, int timeout=-1)
Definition: cli-media-stream-handler.h:595
Tp::PendingVariant * requestPropertyCreatedLocally() const
Definition: cli-media-stream-handler.h:127
QDBusPendingReply NewNativeCandidate(const QString &candidateID, const Tp::MediaStreamHandlerTransportList &transports, int timeout=-1)
Definition: cli-media-stream-handler.h:462
QDBusPendingReply SetLocalCodecs(const Tp::MediaStreamHandlerCodecList &codecs, int timeout=-1)
Definition: cli-media-stream-handler.h:536
QDBusPendingReply NewActiveTransportPair(const QString &nativeCandidateID, const Tp::MediaStreamHandlerTransport &nativeTransport, const QString &remoteCandidateID, const Tp::MediaStreamHandlerTransport &remoteTransport, int timeout=-1)
Definition: cli-media-stream-handler.h:413
QDBusPendingReply HoldState(bool held, int timeout=-1)
Definition: cli-media-stream-handler.h:658
QList< MediaStreamHandlerCodec > MediaStreamHandlerCodecList
Definition: build/TelepathyQt/_gen/types.h:3767
static QLatin1String staticInterfaceName()
Definition: cli-media-stream-handler.h:55
The AbstractInterface class is the base class for all client side D-Bus interfaces,...
Definition: abstract-interface.h:42
The PendingVariant class is a generic subclass of PendingOperation representing a pending D-Bus metho...
Definition: pending-variant.h:38
QDBusPendingReply UnholdFailure(int timeout=-1)
Definition: cli-media-stream-handler.h:685
QDBusPendingReply NewActiveCandidatePair(const QString &nativeCandidateID, const QString &remoteCandidateID, int timeout=-1)
Definition: cli-media-stream-handler.h:371
Tp::PendingVariant * requestPropertyRelayInfo() const
Definition: cli-media-stream-handler.h:258
QDBusPendingReply SupportedFeedbackMessages(const Tp::RTCPFeedbackMessageMap &messages, int timeout=-1)
Definition: cli-media-stream-handler.h:715
QDBusPendingReply Ready(const Tp::MediaStreamHandlerCodecList &codecs, int timeout=-1)
Definition: cli-media-stream-handler.h:492
QDBusPendingReply StreamState(uint state, int timeout=-1)
Definition: cli-media-stream-handler.h:562
QDBusPendingReply Error(uint errorCode, const QString &message, int timeout=-1)
Definition: cli-media-stream-handler.h:320
Tp::PendingVariantMap * requestAllProperties() const
Definition: cli-media-stream-handler.h:269
QDBusPendingReply CodecChoice(uint codecID, int timeout=-1)
Definition: cli-media-stream-handler.h:285
Tp::PendingVariant * requestPropertySTUNServers() const
Definition: cli-media-stream-handler.h:111
QDBusPendingReply SupportedHeaderExtensions(const Tp::RTPHeaderExtensionsList &headerExtensions, int timeout=-1)
Definition: cli-media-stream-handler.h:747
QDBusPendingReply NativeCandidatesPrepared(int timeout=-1)
Definition: cli-media-stream-handler.h:346
QList< MediaStreamHandlerTransport > MediaStreamHandlerTransportList
Definition: build/TelepathyQt/_gen/types.h:2006
Definition: cli-media-stream-handler.h:44
Definition: build/TelepathyQt/_gen/types.h:3996
QDBusPendingReply CodecsUpdated(const Tp::MediaStreamHandlerCodecList &codecs, int timeout=-1)
Definition: cli-media-stream-handler.h:628
The PendingVariantMap class is a generic subclass of PendingOperation representing a pending D-Bus me...
Definition: pending-variant-map.h:38
Definition: abstract-adaptor.cpp:31
QList< RTPHeaderExtension > RTPHeaderExtensionsList
Definition: build/TelepathyQt/_gen/types.h:2549
The DBusProxy class is a base class representing a remote object available over D-Bus.
Definition: dbus-proxy.h:42