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

Public Types | Signals | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
Tp::StreamedMediaChannel Class Reference
Client-side proxies » Channel proxies

The StreamedMediaChannel class represents a Telepathy channel of type StreamedMedia. More...

`#include <TelepathyQt/StreamedMediaChannel>`

Inheritance diagram for Tp::StreamedMediaChannel:
[legend]

## Public Types

enum | StateChangeReason { StateChangeReasonUnknown, StateChangeReasonUserRequested }
Public Types inherited from Tp::OptionalInterfaceFactory< Channel >
enum | InterfaceSupportedChecking

## Signals

void | streamAdded (const Tp::StreamedMediaStreamPtr &stream)
void | streamRemoved (const Tp::StreamedMediaStreamPtr &stream)
void | streamDirectionChanged (const Tp::StreamedMediaStreamPtr &stream, Tp::MediaStreamDirection direction, Tp::MediaStreamPendingSend pendingSend)
void | streamStateChanged (const Tp::StreamedMediaStreamPtr &stream, Tp::MediaStreamState state)
void | streamError (const Tp::StreamedMediaStreamPtr &stream, Tp::MediaStreamError errorCode, const QString &errorMessage)
void | localHoldStateChanged (Tp::LocalHoldState state, Tp::LocalHoldStateReason reason)
Signals inherited from Tp::Channel
void | groupFlagsChanged (Tp::ChannelGroupFlags flags, Tp::ChannelGroupFlags added, Tp::ChannelGroupFlags removed)
void | groupCanAddContactsChanged (bool canAddContacts)
void | groupCanRemoveContactsChanged (bool canRemoveContacts)
void | groupCanRescindContactsChanged (bool canRescindContacts)
void | groupMembersChanged (const Tp::Contacts &groupMembersAdded, const Tp::Contacts &groupLocalPendingMembersAdded, const Tp::Contacts &groupRemotePendingMembersAdded, const Tp::Contacts &groupMembersRemoved, const Tp::Channel::GroupMemberChangeDetails &details)
void | groupHandleOwnersChanged (const Tp::HandleOwnerMap &owners, const Tp::UIntList &added, const Tp::UIntList &removed)
void | groupSelfContactChanged ()
void | conferenceChannelMerged (const Tp::ChannelPtr &channel)
void | conferenceChannelRemoved (const Tp::ChannelPtr &channel, const Tp::Channel::GroupMemberChangeDetails &details)
Signals inherited from Tp::DBusProxy
void | invalidated (Tp::DBusProxy *proxy, const QString &errorName, const QString &errorMessage)
Signals inherited from Tp::Object
void | propertyChanged (const QString &propertyName)

## Public Member Functions

virtual | ~StreamedMediaChannel ()
bool | awaitingLocalAnswer () const
bool | awaitingRemoteAnswer () const
PendingOperation * | acceptCall ()
PendingOperation * | hangupCall ()
StreamedMediaStreams | streams () const
StreamedMediaStreams | streamsForType (MediaStreamType type) const
PendingStreamedMediaStreams * | requestStream (const ContactPtr &contact, MediaStreamType type)
PendingStreamedMediaStreams * | requestStreams (const ContactPtr &contact, QList< MediaStreamType > types)
PendingOperation * | removeStream (const StreamedMediaStreamPtr &stream)
PendingOperation * | removeStreams (const StreamedMediaStreams &streams)
bool | handlerStreamingRequired () const
LocalHoldState | localHoldState () const
LocalHoldStateReason | localHoldStateReason () const
PendingOperation * | requestHold (bool hold)
Public Member Functions inherited from Tp::Channel
virtual | ~Channel ()
ConnectionPtr | connection () const
QVariantMap | immutableProperties () const
QString | channelType () const
HandleType | targetHandleType () const
uint | targetHandle () const
QString | targetId () const
ContactPtr | targetContact () const
bool | isRequested () const
ContactPtr | initiatorContact () const
PendingOperation * | requestClose ()
PendingOperation * | requestLeave (const QString &message=QString(), ChannelGroupChangeReason reason=ChannelGroupChangeReasonNone)
bool | isConference () const
Contacts | conferenceInitialInviteeContacts () const
QList< ChannelPtr > | conferenceChannels () const
QList< ChannelPtr > | conferenceInitialChannels () const
QHash< uint, ChannelPtr > | conferenceOriginalChannels () const
bool | supportsConferenceMerging () const
PendingOperation * | conferenceMergeChannel (const ChannelPtr &channel)
bool | supportsConferenceSplitting () const
PendingOperation * | conferenceSplitChannel ()
ChannelGroupFlags | groupFlags () const
bool | groupCanAddContacts () const
bool | groupCanAddContactsWithMessage () const
bool | groupCanAcceptContactsWithMessage () const
PendingOperation * | groupAddContacts (const QList< ContactPtr > &contacts, const QString &message=QString())
bool | groupCanRescindContacts () const
bool | groupCanRescindContactsWithMessage () const
bool | groupCanRemoveContacts () const
bool | groupCanRemoveContactsWithMessage () const
bool | groupCanRejectContactsWithMessage () const
bool | groupCanDepartWithMessage () const
PendingOperation * | groupRemoveContacts (const QList< ContactPtr > &contacts, const QString &message=QString(), ChannelGroupChangeReason reason=ChannelGroupChangeReasonNone)
Contacts | groupContacts (bool includeSelfContact=true) const
Contacts | groupLocalPendingContacts (bool includeSelfContact=true) const
Contacts | groupRemotePendingContacts (bool includeSelfContact=true) const
GroupMemberChangeDetails | groupLocalPendingContactChangeInfo (const ContactPtr &contact) const
GroupMemberChangeDetails | groupSelfContactRemoveInfo () const
bool | groupAreHandleOwnersAvailable () const
HandleOwnerMap | groupHandleOwners () const
bool | groupIsSelfContactTracked () const
ContactPtr | groupSelfContact () const
Public Member Functions inherited from Tp::StatefulDBusProxy
| StatefulDBusProxy (const QDBusConnection &dbusConnection, const QString &busName, const QString &objectPath, const Feature &featureCore)
virtual | ~StatefulDBusProxy ()
Public Member Functions inherited from Tp::DBusProxy
| DBusProxy (const QDBusConnection &dbusConnection, const QString &busName, const QString &objectPath, const Feature &featureCore)
virtual | ~DBusProxy ()
QDBusConnection | dbusConnection () const
QString | busName () const
QString | objectPath () const
bool | isValid () const
QString | invalidationReason () const
QString | invalidationMessage () const
Public Member Functions inherited from Tp::Object
virtual | ~Object ()
Public Member Functions inherited from QObject
| QObject (QObject *parent)
virtual | ~QObject ()
virtual bool | event (QEvent *e)
virtual bool | eventFilter (QObject *watched, QEvent *event)
virtual const QMetaObject * | metaObject () const
QString | objectName () const
void | setObjectName (const QString &name)
bool | isWidgetType () const
bool | signalsBlocked () const
bool | blockSignals (bool block)
QThread * | thread () const
void | moveToThread (QThread *targetThread)
int | startTimer (int interval)
void | killTimer (int id)
T | findChild (const QString &name) const
QList< T > | findChildren (const QString &name) const
QList< T > | findChildren (const QRegExp &regExp) const
QObject * | child (const char *objName, const char *inheritsClass, bool recursiveSearch) const
const QObjectList & | children () const
void | setParent (QObject *parent)
void | installEventFilter (QObject *filterObj)
void | removeEventFilter (QObject *obj)
bool | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const
bool | disconnect (const char *signal, const QObject *receiver, const char *method)
bool | disconnect (const QObject *receiver, const char *method)
void | dumpObjectTree ()
void | dumpObjectInfo ()
bool | setProperty (const char *name, const QVariant &value)
QVariant | property (const char *name) const
QList< QByteArray > | dynamicPropertyNames () const
void | destroyed (QObject *obj)
QObject * | parent () const
bool | inherits (const char *className) const
void | deleteLater ()
| QObject (QObject *parent, const char *name)
void | insertChild (QObject *object)
void | removeChild (QObject *object)
bool | isA (const char *className) const
const char * | className () const
const char * | name () const
const char * | name (const char *defaultName) const
void | setName (const char *name)
Public Member Functions inherited from Tp::RefCounted
| RefCounted ()
virtual | ~RefCounted ()
Public Member Functions inherited from Tp::ReadyObject
| ReadyObject (RefCounted *object, const Feature &featureCore)
| ReadyObject (DBusProxy *proxy, const Feature &featureCore)
virtual | ~ReadyObject ()
virtual bool | isReady (const Features &features=Features()) const
virtual PendingReady * | becomeReady (const Features &requestedFeatures=Features())
virtual Features | requestedFeatures () const
virtual Features | actualFeatures () const
virtual Features | missingFeatures () const
Public Member Functions inherited from Tp::OptionalInterfaceFactory< Channel >
| OptionalInterfaceFactory (Channel *this_)
| ~OptionalInterfaceFactory ()
QStringList | interfaces () const
bool | hasInterface (const QString &name) const
Interface * | optionalInterface (InterfaceSupportedChecking check=CheckInterfaceSupported) const
Interface * | interface () const

## Static Public Member Functions

static StreamedMediaChannelPtr | create (const ConnectionPtr &connection, const QString &objectPath, const QVariantMap &immutableProperties)
Static Public Member Functions inherited from Tp::Channel
static ChannelPtr | create (const ConnectionPtr &connection, const QString &objectPath, const QVariantMap &immutableProperties)
Static Public Member Functions inherited from Tp::StatefulDBusProxy
static QString | uniqueNameFrom (const QDBusConnection &bus, const QString &wellKnownOrUnique)
static QString | uniqueNameFrom (const QDBusConnection &bus, const QString &wellKnownOrUnique, QString &error, QString &message)
Static Public Member Functions inherited from QObject
QString | tr (const char *sourceText, const char *disambiguation, int n)
QString | trUtf8 (const char *sourceText, const char *disambiguation, int n)
bool | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
bool | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)

## Static Public Attributes

static const Feature | FeatureCore
static const Feature | FeatureStreams
static const Feature | FeatureLocalHoldState
Static Public Attributes inherited from Tp::Channel
static const Feature | FeatureCore
static const Feature | FeatureConferenceInitialInviteeContacts

## Protected Member Functions

| StreamedMediaChannel (const ConnectionPtr &connection, const QString &objectPath, const QVariantMap &immutableProperties, const Feature &coreFeature=StreamedMediaChannel::FeatureCore)
Protected Member Functions inherited from Tp::Channel
| Channel (const ConnectionPtr &connection, const QString &objectPath, const QVariantMap &immutableProperties, const Feature &coreFeature)
Client::ChannelInterface * | baseInterface () const
bool | groupSelfHandleIsLocalPending () const
Protected Member Functions inherited from Tp::DBusProxy
void | setBusName (const QString &busName)
void | invalidate (const QString &reason, const QString &message)
void | invalidate (const QDBusError &error)
Protected Member Functions inherited from Tp::Object
| Object ()
void | notify (const char *propertyName)
Protected Member Functions inherited from QObject
QObject * | sender () const
int | senderSignalIndex () const
int | receivers (const char *signal) const
virtual void | timerEvent (QTimerEvent *event)
virtual void | childEvent (QChildEvent *event)
virtual void | customEvent (QEvent *event)
virtual void | connectNotify (const char *signal)
virtual void | disconnectNotify (const char *signal)
bool | checkConnectArgs (const char *signal, const QObject *object, const char *method)
Protected Member Functions inherited from Tp::ReadyObject
ReadinessHelper * | readinessHelper () const
Protected Member Functions inherited from Tp::OptionalInterfaceFactory< Channel >
void | setInterfaces (const QStringList &interfaces)

## Additional Inherited Members

Protected Slots inherited from Tp::Channel
PendingOperation * | groupAddSelfHandle ()
Static Protected Member Functions inherited from QObject
QByteArray | normalizeSignalSlot (const char *signalSlot)
Properties inherited from QObject
| objectName

## Detailed Description

The StreamedMediaChannel class represents a Telepathy channel of type StreamedMedia.

For more details, please refer to Telepathy specification.

See Asynchronous Object Model, Shared Pointer Usage

## Member Enumeration Documentation

## § StateChangeReason

enum Tp::StreamedMediaChannel::StateChangeReason

Enumerator
StateChangeReasonUnknown |
StateChangeReasonUserRequested |

## Constructor & Destructor Documentation

## § ~StreamedMediaChannel()

Tp::StreamedMediaChannel::~StreamedMediaChannel | ( |  | ) |

virtual

Class destructor.

## § StreamedMediaChannel()

Tp::StreamedMediaChannel::StreamedMediaChannel | ( | const ConnectionPtr & | connection,
|  | const QString & | objectPath,
|  | const QVariantMap & | immutableProperties,
|  | const Feature & | coreFeature = `StreamedMediaChannel::FeatureCore`
| ) |  |

protected

Construct a new StreamedMediaChannel object.

Parameters

  connection | Connection owning this channel, and specifying the service.
  objectPath | The channel object path.
  immutableProperties | The channel immutable properties.
  coreFeature | The core feature of the channel type, if any. The corresponding introspectable should depend on StreamedMediaChannel::FeatureCore.

## Member Function Documentation

## § create()

StreamedMediaChannelPtr Tp::StreamedMediaChannel::create | ( | const ConnectionPtr & | connection,
|  | const QString & | objectPath,
|  | const QVariantMap & | immutableProperties
| ) |  |

static

Create a new StreamedMediaChannel object.

Parameters

  connection | Connection owning this channel, and specifying the service.
  objectPath | The channel object path.
  immutableProperties | The channel immutable properties.

Returns
  A StreamedMediaChannelPtr object pointing to the newly created StreamedMediaChannel object.

## § awaitingLocalAnswer()

bool Tp::StreamedMediaChannel::awaitingLocalAnswer | ( |  | ) | const

Return whether this channel is awaiting local answer.

This method requires StreamedMediaChannel::FeatureCore to be ready.

Returns
  `true` if awaiting local answer, `false` otherwise.

See also
  awaitingRemoteAnswer(), acceptCall()

## § awaitingRemoteAnswer()

bool Tp::StreamedMediaChannel::awaitingRemoteAnswer | ( |  | ) | const

Return whether this channel is awaiting remote answer.

This method requires StreamedMediaChannel::FeatureCore to be ready.

Returns
  `true` if awaiting remote answer, `false` otherwise.

See also
  awaitingLocalAnswer()

## § acceptCall()

PendingOperation * Tp::StreamedMediaChannel::acceptCall | ( |  | ) |

Accept an incoming call.

This method requires StreamedMediaChannel::FeatureCore to be ready.

Returns
  A PendingOperation which will emit PendingOperation::finished when the call has finished.

See also
  awaitingLocalAnswer(), hangupCall()

## § hangupCall()

PendingOperation * Tp::StreamedMediaChannel::hangupCall | ( |  | ) |

Request that the call is ended.

This method requires StreamedMediaChannel::FeatureCore to be ready.

Returns
  A PendingOperation which will emit PendingOperation::finished when the call has finished.

## § streams()

StreamedMediaStreams Tp::StreamedMediaChannel::streams | ( |  | ) | const

Return a list of media streams in this channel.

This methods requires StreamedMediaChannel::FeatureStreams to be ready.

Returns
  A list of pointers to StreamedMediaStream objects.

See also
  streamAdded(), streamRemoved(), streamsForType(), requestStreams()

## § streamsForType()

StreamedMediaStreams Tp::StreamedMediaChannel::streamsForType | ( | MediaStreamType | type | ) | const

Return a list of media streams in this channel for the given type type.

This methods requires StreamedMediaChannel::FeatureStreams to be ready.

Parameters

  type | The interested type.

Returns
  A list of pointers to StreamedMediaStream objects.

See also
  streamAdded(), streamRemoved(), streams(), requestStreams()

## § requestStream()

PendingStreamedMediaStreams * Tp::StreamedMediaChannel::requestStream | ( | const ContactPtr & | contact,
|  | MediaStreamType | type
| ) |  |

Request that media streams be established to exchange the given type type of media with the given contact contact.

This methods requires StreamedMediaChannel::FeatureStreams to be ready.

Returns
  A PendingStreamedMediaStreams which will emit PendingStreamedMediaStreams::finished when the call has finished.

See also
  streamAdded(), streams(), streamsForType()

## § requestStreams()

PendingStreamedMediaStreams * Tp::StreamedMediaChannel::requestStreams | ( | const ContactPtr & | contact,
|  | QList< MediaStreamType > | types
| ) |  |

Request that media streams be established to exchange the given types types of media with the given contact contact.

This methods requires StreamedMediaChannel::FeatureStreams to be ready.

Returns
  A PendingStreamedMediaStreams which will emit PendingStreamedMediaStreams::finished when the call has finished.

See also
  streamAdded(), streams(), streamsForType()

## § removeStream()

PendingOperation * Tp::StreamedMediaChannel::removeStream | ( | const StreamedMediaStreamPtr & | stream | ) |

Remove the specified media stream from this channel.

This methods requires StreamedMediaChannel::FeatureStreams to be ready.

Parameters

  stream | Media stream to remove.

Returns
  A PendingOperation which will emit PendingOperation::finished when the call has finished.

See also
  streamRemoved(), streams(), streamsForType()

## § removeStreams()

PendingOperation * Tp::StreamedMediaChannel::removeStreams | ( | const StreamedMediaStreams & | streams | ) |

Remove the specified media streams from this channel.

This methods requires StreamedMediaChannel::FeatureStreams to be ready.

Parameters

  streams | List of media streams to remove.

Returns
  A PendingOperation which will emit PendingOperation::finished when the call has finished.

See also
  streamRemoved(), streams(), streamsForType()

## § handlerStreamingRequired()

bool Tp::StreamedMediaChannel::handlerStreamingRequired | ( |  | ) | const

Check whether media streaming by the handler is required for this channel.

For channels with the TP_QT_IFACE_CHANNEL_INTERFACE_MEDIA_SIGNALLING interface, the main handler of the channel is responsible for doing the actual streaming, for instance by calling createFarsightChannel(channel) from TelepathyQt-Farsight library and using the telepathy-farsight API on the resulting TfChannel.

This method requires StreamedMediaChannel::FeatureCore to be ready.

Returns
  `true` if required, `false` otherwise.

## § localHoldState()

LocalHoldState Tp::StreamedMediaChannel::localHoldState | ( |  | ) | const

Return the local hold state for this channel.

Whether the local user has placed this channel on hold.

This method requires StreamedMediaChannel::FeatureHoldState to be ready.

Returns
  The local hold state as LocalHoldState.

See also
  requestHold(), localHoldStateChanged()

## § localHoldStateReason()

LocalHoldStateReason Tp::StreamedMediaChannel::localHoldStateReason | ( |  | ) | const

Return the reason why localHoldState() changed to its current value.

This method requires StreamedMediaChannel::FeatureLocalHoldState to be ready.

Returns
  The local hold state reason as LocalHoldStateReason.

See also
  requestHold(), localHoldStateChanged()

## § requestHold()

PendingOperation * Tp::StreamedMediaChannel::requestHold | ( | bool | hold | ) |

Request that the channel be put on hold (be instructed not to send any media streams to you) or be taken off hold.

If the CM can immediately tell that the requested state change could not possibly succeed, the resulting PendingOperation will fail with error code TP_QT_ERROR_NOT_AVAILABLE. If the requested state is the same as the current state, the resulting PendingOperation will finish successfully.

Otherwise, the channel's local hold state will change to LocalHoldStatePendingHold or LocalHoldStatePendingUnhold (as appropriate), then the resulting PendingOperation will finish successfully.

The eventual success or failure of the request is indicated by a subsequent localHoldStateChanged() signal, changing the local hold state to LocalHoldStateHeld or LocalHoldStateUnheld.

If the channel has multiple streams, and the connection manager succeeds in changing the hold state of one stream but fails to change the hold state of another, it will attempt to revert all streams to their previous hold states.

If the channel does not support the TP_QT_IFACE_CHANNEL_INTERFACE_HOLD interface, the PendingOperation will fail with error code TP_QT_ERROR_NOT_IMPLEMENTED.

Parameters

  hold | A boolean indicating whether or not the channel should be on hold

Returns
  A PendingOperation which will emit PendingOperation::finished when the request finishes.

See also
  localHoldState(), localHoldStateReason(), localHoldStateChanged()

## § streamAdded

void Tp::StreamedMediaChannel::streamAdded | ( | const Tp::StreamedMediaStreamPtr & | stream | ) |

signal

Emitted when a media stream is added to this channel.

Parameters

  stream | The media stream that was added.

See also
  streams(), streamsForType(), streamRemoved()

## § streamRemoved

void Tp::StreamedMediaChannel::streamRemoved | ( | const Tp::StreamedMediaStreamPtr & | stream | ) |

signal

Emitted when a media stream is removed from this channel.

Parameters

  stream | The media stream that was removed.

See also
  streams(), streamsForType(), streamAdded()

## § streamDirectionChanged

void Tp::StreamedMediaChannel::streamDirectionChanged | ( | const Tp::StreamedMediaStreamPtr & | stream,
|  | Tp::MediaStreamDirection | direction,
|  | Tp::MediaStreamPendingSend | pendingSend
| ) |  |

signal

Emitted when a media stream direction changes.

Parameters

  stream | The media stream which the direction changed.
  direction | The new direction of the stream that changed.
  pendingSend | The new pending send flags of the stream that changed.

See also
  StreamedMediaStream::direction()

## § streamStateChanged

void Tp::StreamedMediaChannel::streamStateChanged | ( | const Tp::StreamedMediaStreamPtr & | stream,
|  | Tp::MediaStreamState | state
| ) |  |

signal

Emitted when a media stream state changes.

Parameters

  stream | The media stream which the state changed.
  state | The new state of the stream that changed.

See also
  StreamedMediaStream::state()

## § streamError

void Tp::StreamedMediaChannel::streamError | ( | const Tp::StreamedMediaStreamPtr & | stream,
|  | Tp::MediaStreamError | errorCode,
|  | const QString & | errorMessage
| ) |  |

signal

Emitted when an error occurs on a media stream.

Parameters

  stream | The media stream which the error occurred.
  errorCode | The error code.
  errorMessage | The error message.

## § localHoldStateChanged

void Tp::StreamedMediaChannel::localHoldStateChanged | ( | Tp::LocalHoldState | state,
|  | Tp::LocalHoldStateReason | reason
| ) |  |

signal

Emitted when the local hold state of this channel changes.

Parameters

  state | The new local hold state of this channel.
  reason | The reason why the change occurred.

See also
  localHoldState(), localHoldStateReason()

## Member Data Documentation

## § FeatureCore

const Feature Tp::StreamedMediaChannel::FeatureCore

static

Feature representing the core that needs to become ready to make the StreamedMediaChannel object usable.

This is currently the same as Channel::FeatureCore, but may change to include more.

When calling isReady(), becomeReady(), this feature is implicitly added to the requested features.

See also
  awaitingLocalAnswer(), awaitingRemoteAnswer(), acceptCall(), hangupCall(), handlerStreamingRequired()

## § FeatureStreams

const Feature Tp::StreamedMediaChannel::FeatureStreams

static

Feature used in order to access media stream specific methods.

See media stream specific methods' documentation for more details.

See also
  streams(), streamsForType(), requestStream(), requestStreams(), streamAdded() removeStream(), removeStreams(), streamRemoved(), streamDirectionChanged(), streamStateChanged(), streamError()

## § FeatureLocalHoldState

const Feature Tp::StreamedMediaChannel::FeatureLocalHoldState

static

Feature used in order to access local hold state info.

See local hold state specific methods' documentation for more details.

See also
  localHoldState(), localHoldStateReason(), requestHold(), localHoldStateChanged()