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

ChannelTypeStreamedMediaInterface Class Reference
[Channel proxies]

#include <TelepathyQt4/Channel>

Inherits Tp::AbstractInterface.

List of all members.

Public Slots

Signals

Public Member Functions

Static Public Member Functions

Protected Member Functions


Detailed Description

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

Constructor & Destructor Documentation

ChannelTypeStreamedMediaInterface ( const QString &  busName,
const QString &  objectPath,
QObject *  parent = 0 
)

Creates a ChannelTypeStreamedMediaInterface associated with the given object on the session bus.

Parameters:
busName Name of the service the object is on.
objectPath Path to the object on the service.
parent Passed to the parent class constructor.

ChannelTypeStreamedMediaInterface ( const QDBusConnection &  connection,
const QString &  busName,
const QString &  objectPath,
QObject *  parent = 0 
)

Creates a ChannelTypeStreamedMediaInterface associated with the given object on the given bus.

Parameters:
connection The bus via which the object can be reached.
busName Name of the service the object is on.
objectPath Path to the object on the service.
parent Passed to the parent class constructor.

Creates a ChannelTypeStreamedMediaInterface associated with the same object as the given proxy.

Parameters:
proxy The proxy to use. It will also be the QObject::parent() for this object.

ChannelTypeStreamedMediaInterface ( const Tp::Client::ChannelInterface mainInterface  )  [explicit]

Creates a ChannelTypeStreamedMediaInterface associated with the same object as the given proxy. Additionally, the created proxy will have the same parent as the given proxy.

Parameters:
mainInterface The proxy to use.

ChannelTypeStreamedMediaInterface ( const Tp::Client::ChannelInterface mainInterface,
QObject *  parent 
)

Creates a ChannelTypeStreamedMediaInterface associated with the same object as the given proxy. However, a different parent object can be specified.

Parameters:
mainInterface The proxy to use.
parent Passed to the parent class constructor.


Member Function Documentation

static const char* staticInterfaceName (  )  [inline, static]

Returns the name of the interface "org.freedesktop.Telepathy.Channel.Type.StreamedMedia", which this class represents.

Returns:
The D-Bus interface name.

QDBusPendingReply<Tp::MediaStreamInfoList> ListStreams (  )  [inline, slot]

Begins a call to the D-Bus method "ListStreams" on the remote object.

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

QDBusPendingReply RemoveStreams ( const Tp::UIntList streams  )  [inline, slot]

Begins a call to the D-Bus method "RemoveStreams" on the remote object.

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 <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel.Interface">Group.SelfHandle</tp:dbus-ref> from the channel, using either <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel.Interface.Group">RemoveMembers</tp:dbus-ref> or <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel.Interface.Group">RemoveMembersWithReason</tp:dbus-ref>.

Parameters:
streams An array of stream identifiers (as defined in ListStreams)

QDBusPendingReply RequestStreamDirection ( uint  streamID,
uint  streamDirection 
) [inline, slot]

Begins a call to the D-Bus method "RequestStreamDirection" on the remote object.

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 <tp:member-ref>StreamRemoved</tp:member-ref> 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 <tp:member-ref>StreamDirectionChanged</tp:member-ref> 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)

QDBusPendingReply<Tp::MediaStreamInfoList> RequestStreams ( uint  contactHandle,
const Tp::UIntList types 
) [inline, slot]

Begins a call to the D-Bus method "RequestStreams" on the remote object.

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 <tp:member-ref>StreamDirectionChanged</tp:member-ref> 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 <tp:member-ref>ListStreams</tp:member-ref> 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 StreamAdded ( uint  streamID,
uint  contactHandle,
uint  streamType 
) [signal]

Represents the signal "StreamAdded" on the remote object.

Emitted when a new stream has been added to this channel. Clients SHOULD assume that the stream's <tp:type>Media_Stream_State</tp:type> is initially Disconnected.

If a connection manager needs to represent the addition of a stream whose state is already Connecting or Connected, it MUST do this by emitting StreamAdded, closely followed by <tp:member-ref>StreamStateChanged</tp:member-ref> indicating a change to the appropriate state.

<tp:rationale>

Historically, it was not clear from the StreamAdded signal what the state of the stream was. telepathy-spec 0.17.22 clarified this. </tp:rationale>

Similarly, clients SHOULD assume that the initial <tp:type>Media_Stream_Direction</tp:type> of a newly added stream is Receive, and that the initial <tp:type>Media_Stream_Pending_Send</tp:type> is Pending_Local_Send.

If a connection manager needs to represent the addition of a stream whose direction or pending-send differs from those initial values, it MUST do so by emitting StreamAdded, closely followed by <tp:member-ref>StreamDirectionChanged</tp:member-ref> indicating a change to the appropriate direction and pending-send state.

<tp:rationale>

StreamAdded doesn't itself indicate the stream's direction; this is unfortunate, but is preserved for compatibility.

This is the appropriate direction for streams added by a remote contact on existing connection managers, and does not violate user privacy by automatically sending audio or video (audio streams start off muted, video streams start off not sending). For streams added by the local user using the client receiving the signal, the true direction can also be determined from the return value of the <tp:member-ref>RequestStreams</tp:member-ref> method.

Existing clients typically operate by maintaining a separate idea of the directions that they would like the streams to have, and enforcing these intended directions by calling <tp:member-ref>RequestStreamDirection</tp:member-ref> whenever needed. </tp:rationale>

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 StreamDirectionChanged ( uint  streamID,
uint  streamDirection,
uint  pendingFlags 
) [signal]

Represents the signal "StreamDirectionChanged" on the remote object.

Emitted when the direction or pending flags of a stream are changed.

If the MEDIA_STREAM_PENDING_LOCAL_SEND flag is set, the remote user has requested that we begin sending on this stream. <tp:member-ref>RequestStreamDirection</tp:member-ref> should be called to indicate whether or not this change is acceptable.

<tp:rationale>

This allows for a MSN-style user interface, "Fred has asked you to enable your webcam. (Accept | Reject)", if desired. </tp:rationale>

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 StreamError ( uint  streamID,
uint  errorCode,
const QString &  message 
) [signal]

Represents the signal "StreamError" on the remote object.

Emitted when a stream encounters an error.

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 StreamRemoved ( uint  streamID  )  [signal]

Represents the signal "StreamRemoved" on the remote object.

Emitted when a stream has been removed from this channel.

Parameters:
streamID stream_id - the stream identifier (as defined in ListStreams)

void StreamStateChanged ( uint  streamID,
uint  streamState 
) [signal]

Represents the signal "StreamStateChanged" on the remote object.

Emitted when a member's stream's state changes.

Parameters:
streamID The stream identifier (as defined in ListStreams)
streamState The new stream state (as defined in ListStreams)

virtual void invalidate ( Tp::DBusProxy ,
const QString &  ,
const QString &   
) [protected, virtual]

Reimplemented from AbstractInterface.


Copyright © 2009 Collabora Ltd. and Nokia Corporation
Telepathy-Qt4 0.1.10