Media channels

Media channels — client-side wrappers for the Streamed Media channel type, and the Call State, DTMF and Media Signalling interfaces

Functions

Object Hierarchy


Includes

#include <telepathy-glib/telepathy-glib-dbus.h>

Description

This section documents the auto-generated C wrappers for the Streamed Media channel type, and the DTMF and Media Signalling interfaces which are optionally supported by channels of this type.

Streamed Media channels represent real-time audio or video streaming, including voice over IP, webcams, and telephony.

Channels of type Streamed Media may support the Media Signalling interface. If not, the connection manager is assumed to be presenting the media streams to the user automatically (for instance, in a connection manager like gnome-phone-manager or telepathy-snom that remotely controls a telephone, the phone's own speaker and microphone will probably be used directly).

If Media Signalling is supported, the Telepathy client is responsible for actually streaming the media, using the Media Signalling interface to provide signalling (connection managers might implement this interface in terms of Jingle or SDP, for instance). The Telepathy project suggests that client authors use the Farsight library for this; the glue between Media Signalling and Farsight is currently done in telepathy-stream-engine, an additional D-Bus service, but it will be provided as a library in future.

Channels of type Streamed Media may also support the DTMF and CallState interfaces.

Functions

tp_cli_channel_interface_hold1_callback_for_get_hold_state ()

void
(*tp_cli_channel_interface_hold1_callback_for_get_hold_state)
                               (TpChannel *proxy,
                                guint out_HoldState,
                                guint out_Reason,
                                const GError *error,
                                gpointer user_data,
                                GObject *weak_object);

Signature of the callback called when a GetHoldState method call succeeds or fails.

Parameters

proxy

the proxy on which the call was made

 

out_HoldState

Used to return an 'out' argument if error is NULL: The state of the channel (TpLocalHoldState)

 

out_Reason

Used to return an 'out' argument if error is NULL: The reason why the channel is in that state (TpLocalHoldStateReason)

 

error

NULL on success, or an error on failure

 

user_data

user-supplied data

 

weak_object

user-supplied object

 

tp_cli_channel_interface_hold1_call_get_hold_state ()

TpProxyPendingCall *
tp_cli_channel_interface_hold1_call_get_hold_state
                               (TpChannel *proxy,
                                gint timeout_ms,
                                tp_cli_channel_interface_hold1_callback_for_get_hold_state callback,
                                gpointer user_data,
                                GDestroyNotify destroy,
                                GObject *weak_object);

Start a GetHoldState method call.

Return whether the local user has placed the channel on hold.

Parameters

proxy

the TpProxy

 

timeout_ms

the timeout in milliseconds, or -1 to use the default

 

callback

called when the method call succeeds or fails; may be NULL to make a "fire and forget" call with no reply tracking

 

user_data

user-supplied data passed to the callback; must be NULL if callback is NULL

 

destroy

called with the user_data as argument, after the call has succeeded, failed or been cancelled; must be NULL if callback is NULL

 

weak_object

If not NULL, a GObject which will be weakly referenced; if it is destroyed, this call will automatically be cancelled. Must be NULL if callback is NULL

 

Returns

a TpProxyPendingCall representing the call in progress. It is borrowed from the object, and will become invalid when the callback is called, the call is cancelled or the TpProxy becomes invalid.


tp_cli_channel_interface_hold1_callback_for_request_hold ()

void
(*tp_cli_channel_interface_hold1_callback_for_request_hold)
                               (TpChannel *proxy,
                                const GError *error,
                                gpointer user_data,
                                GObject *weak_object);

Signature of the callback called when a RequestHold method call succeeds or fails.

Parameters

proxy

the proxy on which the call was made

 

error

NULL on success, or an error on failure

 

user_data

user-supplied data

 

weak_object

user-supplied object

 

tp_cli_channel_interface_hold1_call_request_hold ()

TpProxyPendingCall *
tp_cli_channel_interface_hold1_call_request_hold
                               (TpChannel *proxy,
                                gint timeout_ms,
                                gboolean in_Hold,
                                tp_cli_channel_interface_hold1_callback_for_request_hold callback,
                                gpointer user_data,
                                GDestroyNotify destroy,
                                GObject *weak_object);

Start a RequestHold method call.

<tp:docstring xmlns="http://www.w3.org/1999/xhtml"> <p>Request that the channel be put on hold (be instructed not to send any media streams to you) or be taken off hold.</p> <p>If the connection manager can immediately tell that the requested state change could not possibly succeed, this method SHOULD return the NotAvailable error. If the requested state is the same as the current state, this method SHOULD return successfully without doing anything.</p> <p>Otherwise, this method SHOULD immediately set the hold state to Local_Hold_State_Pending_Hold or Local_Hold_State_Pending_Unhold (as appropriate), emitting <tp:member-ref>HoldStateChanged</tp:member-ref> if this is a change, and return successfully.</p> <p>The eventual success or failure of the request is indicated by a subsequent HoldStateChanged signal, changing the hold state to Local_Hold_State_Held or Local_Hold_State_Unheld.</p> <p>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 SHOULD attempt to revert all streams to their previous hold states.</p> <p>The following state transitions SHOULD be used, where appropriate:</p> <ul> <li>Successful hold: (Unheld, any reason) → (Pending_Hold, Requested) → (Held, Requested) </li> <li>Successful unhold: (Held, any reason) → (Pending_Unhold, Requested) → (Unheld, Requested) </li> <li>Attempting to unhold fails at the first attempt to acquire a resource: (Held, any reason) → (Pending_Unhold, Requested) → (Held, Resource_Not_Available) </li> <li>Attempting to unhold acquires one resource, but fails to acquire a second, and takes time to release the first: (Held, any reason) → (Pending_Unhold, Requested) → (Pending_Hold, Resource_Not_Available) → (Held, Resource_Not_Available) </li> </ul>

Parameters

proxy

the TpProxy

 

timeout_ms

the timeout in milliseconds, or -1 to use the default

 

in_Hold

Used to pass an 'in' argument: A boolean indicating whether or not the channel should be on hold

 

callback

called when the method call succeeds or fails; may be NULL to make a "fire and forget" call with no reply tracking

 

user_data

user-supplied data passed to the callback; must be NULL if callback is NULL

 

destroy

called with the user_data as argument, after the call has succeeded, failed or been cancelled; must be NULL if callback is NULL

 

weak_object

If not NULL, a GObject which will be weakly referenced; if it is destroyed, this call will automatically be cancelled. Must be NULL if callback is NULL

 

Returns

a TpProxyPendingCall representing the call in progress. It is borrowed from the object, and will become invalid when the callback is called, the call is cancelled or the TpProxy becomes invalid.


tp_cli_channel_interface_hold1_signal_callback_hold_state_changed ()

void
(*tp_cli_channel_interface_hold1_signal_callback_hold_state_changed)
                               (TpChannel *proxy,
                                guint arg_HoldState,
                                guint arg_Reason,
                                gpointer user_data,
                                GObject *weak_object);

Represents the signature of a callback for the signal HoldStateChanged.

Parameters

proxy

The proxy on which tp_cli_channel_interface_hold1_connect_to_hold_state_changed() was called

 

arg_HoldState

The state of the channel (TpLocalHoldState)

 

arg_Reason

The reason for the state change (TpLocalHoldStateReason)

 

user_data

User-supplied data

 

weak_object

User-supplied weakly referenced object

 

tp_cli_channel_interface_hold1_connect_to_hold_state_changed ()

TpProxySignalConnection *
tp_cli_channel_interface_hold1_connect_to_hold_state_changed
                               (TpChannel *proxy,
                                tp_cli_channel_interface_hold1_signal_callback_hold_state_changed callback,
                                gpointer user_data,
                                GDestroyNotify destroy,
                                GObject *weak_object,
                                GError **error);

Connect a handler to the signal HoldStateChanged.

Emitted to indicate that the hold state has changed for this channel. This may occur as a consequence of you requesting a change with <tp:member-ref>RequestHold</tp:member-ref>, or the state changing as a result of a request from another process.

Parameters

proxy

A TpChannel or subclass

 

callback

Callback to be called when the signal is received

 

user_data

User-supplied data for the callback

 

destroy

Destructor for the user-supplied data, which will be called when this signal is disconnected, or before this function returns NULL

 

weak_object

A GObject which will be weakly referenced; if it is destroyed, this callback will automatically be disconnected

 

error

If not NULL, used to raise an error if NULL is returned

 

Returns

a TpProxySignalConnection containing all of the above, which can be used to disconnect the signal; or NULL if the proxy does not have the desired interface or has become invalid.

Types and Values

See Also

channel-group, TpChannel