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

Public Slots | Signals | Public Member Functions | List of all members
Tp::Service::ChannelTypeStreamedMediaAdaptor Class Reference
Service-side implementation » Channel service implementation

`#include <TelepathyQt/_gen/svc-channel.h>`

Inheritance diagram for Tp::Service::ChannelTypeStreamedMediaAdaptor:
[legend]

## Public Slots

Tp::MediaStreamInfoList | ListStreams (const QDBusMessage &dbusMessage)
void | RemoveStreams (const Tp::UIntList &streams, const QDBusMessage &dbusMessage)
void | RequestStreamDirection (uint streamID, uint streamDirection, const QDBusMessage &dbusMessage)
Tp::MediaStreamInfoList | RequestStreams (uint contactHandle, const Tp::UIntList &types, const QDBusMessage &dbusMessage)

## Signals

void | StreamAdded (uint streamID, uint contactHandle, uint streamType)
void | StreamDirectionChanged (uint streamID, uint streamDirection, uint pendingFlags)
void | StreamError (uint streamID, uint errorCode, const QString &message)
void | StreamRemoved (uint streamID)
void | StreamStateChanged (uint streamID, uint streamState)

## Public Member Functions

bool | InitialAudio () const
bool | InitialVideo () const
bool | ImmutableStreams () const
Public Member Functions inherited from Tp::AbstractAdaptor
| AbstractAdaptor (const QDBusConnection &connection, QObject *adaptee, QObject *parent)
| ~AbstractAdaptor ()
QDBusConnection | dbusConnection () const
QObject * | adaptee () const
Public Member Functions inherited from QDBusAbstractAdaptor
| ~QDBusAbstractAdaptor ()
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)

## Additional Inherited Members

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)
Protected Member Functions inherited from QDBusAbstractAdaptor
| QDBusAbstractAdaptor (QObject *obj)
void | setAutoRelaySignals (bool enable)
bool | autoRelaySignals () const
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)
Static Protected Member Functions inherited from QObject
QByteArray | normalizeSignalSlot (const char *signalSlot)
Properties inherited from QObject
| objectName

## Detailed Description

Adaptor class providing a 1:1 mapping of the D-Bus interface "org.freedesktop.Telepathy.Channel.Type.StreamedMedia".

## Member Function Documentation

bool Tp::Service::ChannelTypeStreamedMediaAdaptor::InitialAudio | ( |  | ) | const

Return the value of the exported D-Bus object property `InitialAudio` of type `bool`.

Adaptees should export this property as a Qt property named 'initialAudio' with type bool.

If set to true in a channel request that will create a new channel, the connection manager should immediately attempt to establish an audio stream to the remote contact, making it unnecessary for the client to call ChannelTypeStreamedMediaInterface::RequestStreams() .

If this property, or InitialVideo, is passed to EnsureChannel (as opposed to CreateChannel), the connection manager SHOULD ignore these properties when checking whether it can return an existing channel as suitable; these properties only become significant when the connection manager has decided to create a new channel.

If true on a requested channel, this indicates that the audio stream has already been requested and the client does not need to call RequestStreams, although it MAY still do so.

If true on an unrequested (incoming) channel, this indicates that the remote contact initially requested an audio stream; this does not imply that that audio stream is still active (as indicated by ChannelTypeStreamedMediaInterface::ListStreams() ).

This property is immutable (cannot change), and therefore SHOULD appear wherever immutable properties are reported, e.g. ConnectionInterfaceRequestsInterface::NewChannels() signals.

This reduces D-Bus round trips.

Connection managers capable of signalling audio calls to contacts SHOULD include a channel class in ConnectionInterfaceRequestsInterface::RequestableChannelClasses with ChannelInterface::ChannelType = ChannelTypeStreamedMediaInterface and ChannelInterface::TargetHandleType = Contact in the fixed properties dictionary, and InitialAudio (and also InitialVideo, if applicable) in the allowed properties list. Clients wishing to discover whether a connection manager can signal audio and/or video calls SHOULD use this information.

Not all protocols support signalling video calls, and it would be possible (although unlikely) to have a protocol where only video, and not audio, could be signalled.

Connection managers that support the ConnectionInterfaceContactCapabilitiesInterface interface SHOULD represent the capabilities of receiving audio and/or video calls by including a channel class in a contact's capabilities with ChannelType = StreamedMedia in the fixed properties dictionary, and InitialAudio and/or InitialVideo in the allowed properties list. Clients wishing to discover whether a particular contact is likely to be able to receive audio and/or video calls SHOULD use this information.

Not all clients support video calls, and it would also be possible (although unlikely) to have a client which could only stream video, not audio.

Clients that are willing to receive audio and/or video calls SHOULD include the following among their channel classes if calling ConnectionInterfaceContactCapabilitiesInterface::UpdateCapabilities() (clients of a ChannelDispatcherInterface SHOULD instead arrange for the ChannelDispatcher to do this, by including the filters in their ClientHandlerInterface::HandlerChannelFilter properties):

- { ChannelType = StreamedMedia }
- { ChannelType = StreamedMedia, InitialAudio = true } if receiving calls with audio is supported
- { ChannelType = StreamedMedia, InitialVideo = true } if receiving calls with video is supported

Connection managers for protocols with capability discovery, like XMPP, need this information to advertise the appropriate capabilities for their protocol.

Returns
  The value of exported property `InitialAudio`.

bool Tp::Service::ChannelTypeStreamedMediaAdaptor::InitialVideo | ( |  | ) | const

Return the value of the exported D-Bus object property `InitialVideo` of type `bool`.

Adaptees should export this property as a Qt property named 'initialVideo' with type bool.

The same as InitialAudio , but for a video stream. This property is immutable (cannot change).

In particular, note that if this property is false, this does not imply that an active video stream has not been added, only that no video stream was active at the time the channel appeared.

This property is the correct way to discover whether connection managers, contacts etc. support video calls; it appears in capabilities structures in the same way as InitialAudio.

Returns
  The value of exported property `InitialVideo`.

bool Tp::Service::ChannelTypeStreamedMediaAdaptor::ImmutableStreams | ( |  | ) | const

Return the value of the exported D-Bus object property `ImmutableStreams` of type `bool`.

Adaptees should export this property as a Qt property named 'immutableStreams' with type bool.

If `True`, once streams have been requested for this channel (either by setting InitialAudio or InitialVideo when the channel is requested, or by calling RequestStreams() on a channel with no streams), a stream of a different content type cannot be added; subsequent calls to RequestStreams() that attempt to do so will fail.

If this property is missing, clients SHOULD assume that it is false, and thus that the channel's streams can be changed once the call has started.

If this property is present in the "allowed" set in all of the StreamedMedia entries in a contact's capabilities, then user interfaces MAY choose to show a separate "call" option for each class of call.

For example, once an audio-only Google Talk call has started, it is not possible to add a video stream; both audio and video must be requested at the start of the call if video is desired. User interfaces may use this pseudo-capability as a hint to display separate "Audio call" and "Video call" buttons, rather than a single "Call" button with the option to add and remove video once the call has started for contacts without this flag.

This property is immutable, and therefore SHOULD be announced in ConnectionInterfaceRequestsInterface::NewChannels() , etc.

Returns
  The value of exported property `ImmutableStreams`.

Tp::MediaStreamInfoList Tp::Service::ChannelTypeStreamedMediaAdaptor::ListStreams | ( | const QDBusMessage & | dbusMessage | ) |

slot

Begins a call to the exported D-Bus method `ListStreams` on this object.

Adaptees should export this method as a Qt slot with the following signature: void listStreams(const Tp::Service::ChannelTypeStreamedMediaAdaptor::ListStreamsContextPtr &context);

Implementations should call MethodInvocationContext::setFinished (or setFinishedWithError accordingly) on the received context object once the method has finished processing.

Returns an array of structs representing the streams currently active within this channel. Each stream is identified by an unsigned integer which is unique for each stream within the channel.

Returns

An array of structs containing:

- the stream identifier
- the contact handle who the stream is with (or 0 if the stream represents more than a single member)
- the type of the stream
- the current stream state
- the current direction of the stream
- the current pending send flags

void Tp::Service::ChannelTypeStreamedMediaAdaptor::RemoveStreams | ( | const Tp::UIntList & | streams,
|  | const QDBusMessage & | dbusMessage
| ) |  |

slot

Begins a call to the exported D-Bus method `RemoveStreams` on this object.

Adaptees should export this method as a Qt slot with the following signature: void removeStreams(const Tp::UIntList& streams, const Tp::Service::ChannelTypeStreamedMediaAdaptor::RemoveStreamsContextPtr &context);

Implementations should call MethodInvocationContext::setFinished (or setFinishedWithError accordingly) on the received context object once the method has finished processing.

Request that the given streams are removed. If all streams are removed, the channel MAY close.

Clients SHOULD NOT attempt to terminate calls by removing all the streams; instead, clients SHOULD terminate calls by removing the ChannelInterfaceGroupInterface::SelfHandle from the channel, using either ChannelInterfaceGroupInterface::RemoveMembers() or ChannelInterfaceGroupInterface::RemoveMembersWithReason() .

Parameters

  streams

      An array of stream identifiers (as defined in ListStreams)

void Tp::Service::ChannelTypeStreamedMediaAdaptor::RequestStreamDirection | ( | uint | streamID,
|  | uint | streamDirection,
|  | const QDBusMessage & | dbusMessage
| ) |  |

slot

Begins a call to the exported D-Bus method `RequestStreamDirection` on this object.

Adaptees should export this method as a Qt slot with the following signature: void requestStreamDirection(uint streamID, uint streamDirection, const Tp::Service::ChannelTypeStreamedMediaAdaptor::RequestStreamDirectionContextPtr &context);

Implementations should call MethodInvocationContext::setFinished (or setFinishedWithError accordingly) on the received context object once the method has finished processing.

Request a change in the direction of an existing stream. In particular, this might be useful to stop sending media of a particular type, or inform the peer that you are no longer using media that is being sent to you.

Depending on the protocol, streams which are no longer sending in either direction should be removed and a StreamRemoved() signal emitted. Some direction changes can be enforced locally (for example, BIDIRECTIONAL -> RECEIVE can be achieved by merely stopping sending), others may not be possible on some protocols, and some need agreement from the remote end. In this case, the MEDIA_STREAM_PENDING_REMOTE_SEND flag will be set in the StreamDirectionChanged() signal, and the signal emitted again without the flag to indicate the resulting direction when the remote end has accepted or rejected the change.

Parameters

  streamID

      The stream identifier (as defined in ListStreams)

  streamDirection

      The desired stream direction (a value of MediaStreamDirection)

Tp::MediaStreamInfoList Tp::Service::ChannelTypeStreamedMediaAdaptor::RequestStreams | ( | uint | contactHandle,
|  | const Tp::UIntList & | types,
|  | const QDBusMessage & | dbusMessage
| ) |  |

slot

Begins a call to the exported D-Bus method `RequestStreams` on this object.

Adaptees should export this method as a Qt slot with the following signature: void requestStreams(uint contactHandle, const Tp::UIntList& types, const Tp::Service::ChannelTypeStreamedMediaAdaptor::RequestStreamsContextPtr &context);

Implementations should call MethodInvocationContext::setFinished (or setFinishedWithError accordingly) on the received context object once the method has finished processing.

Request that streams be established to exchange the given types of media with the given member. In general this will try and establish a bidirectional stream, but on some protocols it may not be possible to indicate to the peer that you would like to receive media, so a send-only stream will be created initially. In the cases where the stream requires remote agreement (eg you wish to receive media from them), the StreamDirectionChanged() signal will be emitted with the MEDIA_STREAM_PENDING_REMOTE_SEND flag set, and the signal emitted again with the flag cleared when the remote end has replied.

If streams of the requested types already exist, calling this method results in the creation of additional streams. Accordingly, clients wishing to have exactly one audio stream or exactly one video stream SHOULD check for the current streams using ListStreams() before calling this method.

Parameters

  contactHandle

      A contact handle with whom to establish the streams

  types

      An array of stream types (values of MediaStreamType)

Returns

An array of structs (in the same order as the given stream types) containing:

- the stream identifier
- the contact handle who the stream is with (or 0 if the stream represents more than a single member)
- the type of the stream
- the current stream state
- the current direction of the stream
- the current pending send flags

void Tp::Service::ChannelTypeStreamedMediaAdaptor::StreamAdded | ( | uint | streamID,
|  | uint | contactHandle,
|  | uint | streamType
| ) |  |

signal

Represents the exported D-Bus signal `StreamAdded` on this object.

Adaptees should export this signal as a Qt signal with the following signature: void streamAdded(uint streamID, uint contactHandle, uint streamType);

The adaptee signal will be automatically relayed as a D-Bus signal once emitted.

Parameters

  streamID

      The stream identifier (as defined in ListStreams)

  contactHandle

      The contact handle who the stream is with (or 0 if it represents
      more than a single member)

  streamType

      The stream type (a value from MediaStreamType)

void Tp::Service::ChannelTypeStreamedMediaAdaptor::StreamDirectionChanged | ( | uint | streamID,
|  | uint | streamDirection,
|  | uint | pendingFlags
| ) |  |

signal

Represents the exported D-Bus signal `StreamDirectionChanged` on this object.

Adaptees should export this signal as a Qt signal with the following signature: void streamDirectionChanged(uint streamID, uint streamDirection, uint pendingFlags);

The adaptee signal will be automatically relayed as a D-Bus signal once emitted.

Parameters

  streamID

      The stream identifier (as defined in ListStreams)

  streamDirection

      The new stream direction (as defined in ListStreams)

  pendingFlags

      The new pending send flags (as defined in ListStreams)

void Tp::Service::ChannelTypeStreamedMediaAdaptor::StreamError | ( | uint | streamID,
|  | uint | errorCode,
|  | const QString & | message
| ) |  |

signal

Represents the exported D-Bus signal `StreamError` on this object.

Adaptees should export this signal as a Qt signal with the following signature: void streamError(uint streamID, uint errorCode, const QString& message);

The adaptee signal will be automatically relayed as a D-Bus signal once emitted.

Parameters

  streamID

      The stream identifier (as defined in ListStreams)

  errorCode

      A stream error number, one of the values of MediaStreamError

  message

      A string describing the error (for debugging purposes only)

void Tp::Service::ChannelTypeStreamedMediaAdaptor::StreamRemoved | ( | uint | streamID | ) |

signal

Represents the exported D-Bus signal `StreamRemoved` on this object.

Adaptees should export this signal as a Qt signal with the following signature: void streamRemoved(uint streamID);

The adaptee signal will be automatically relayed as a D-Bus signal once emitted.

Parameters

  streamID

      stream_id - the stream identifier (as defined in ListStreams)

void Tp::Service::ChannelTypeStreamedMediaAdaptor::StreamStateChanged | ( | uint | streamID,
|  | uint | streamState
| ) |  |

signal

Represents the exported D-Bus signal `StreamStateChanged` on this object.

Adaptees should export this signal as a Qt signal with the following signature: void streamStateChanged(uint streamID, uint streamState);

The adaptee signal will be automatically relayed as a D-Bus signal once emitted.

Parameters

  streamID

      The stream identifier (as defined in ListStreams)

  streamState

      The new stream state (as defined in ListStreams)