Media channels

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

## Synopsis

    #include <telepathy-glib/channel.h>

    TpProxyPendingCall* tp_cli_channel_type_streamed_media_call_list_streams
                                                            (TpChannel *proxy,
                                                             gint timeout_ms,
                                                             tp_cli_channel_type_streamed_media_callback_for_list_streams callback,
                                                             gpointer user_data,
                                                             GDestroyNotify destroy,
                                                             GObject *weak_object);
    TpProxyPendingCall* tp_cli_channel_type_streamed_media_call_remove_streams
                                                            (TpChannel *proxy,
                                                             gint timeout_ms,
                                                             const GArray *in_streams,
                                                             tp_cli_channel_type_streamed_media_callback_for_remove_streams callback,
                                                             gpointer user_data,
                                                             GDestroyNotify destroy,
                                                             GObject *weak_object);
    TpProxyPendingCall* tp_cli_channel_type_streamed_media_call_request_stream_direction
                                                            (TpChannel *proxy,
                                                             gint timeout_ms,
                                                             guint in_stream_id,
                                                             guint in_stream_direction,
                                                             tp_cli_channel_type_streamed_media_callback_for_request_stream_direction callback,
                                                             gpointer user_data,
                                                             GDestroyNotify destroy,
                                                             GObject *weak_object);
    TpProxyPendingCall* tp_cli_channel_type_streamed_media_call_request_streams
                                                            (TpChannel *proxy,
                                                             gint timeout_ms,
                                                             guint in_contact_handle,
                                                             const GArray *in_types,
                                                             tp_cli_channel_type_streamed_media_callback_for_request_streams callback,
                                                             gpointer user_data,
                                                             GDestroyNotify destroy,
                                                             GObject *weak_object);
    void                (*tp_cli_channel_type_streamed_media_callback_for_list_streams)
                                                            (TpChannel *proxy,
                                                             const GPtrArray *out0,
                                                             const GError *error,
                                                             gpointer user_data,
                                                             GObject *weak_object);
    void                (*tp_cli_channel_type_streamed_media_callback_for_remove_streams)
                                                            (TpChannel *proxy,
                                                             const GError *error,
                                                             gpointer user_data,
                                                             GObject *weak_object);
    void                (*tp_cli_channel_type_streamed_media_callback_for_request_stream_direction)
                                                            (TpChannel *proxy,
                                                             const GError *error,
                                                             gpointer user_data,
                                                             GObject *weak_object);
    void                (*tp_cli_channel_type_streamed_media_callback_for_request_streams)
                                                            (TpChannel *proxy,
                                                             const GPtrArray *out0,
                                                             const GError *error,
                                                             gpointer user_data,
                                                             GObject *weak_object);
    gboolean            tp_cli_channel_type_streamed_media_run_list_streams
                                                            (TpChannel *proxy,
                                                             gint timeout_ms,
                                                             GPtrArray **out0,
                                                             GError **error,
                                                             GMainLoop **loop);
    gboolean            tp_cli_channel_type_streamed_media_run_remove_streams
                                                            (TpChannel *proxy,
                                                             gint timeout_ms,
                                                             const GArray *in_streams,
                                                             GError **error,
                                                             GMainLoop **loop);
    gboolean            tp_cli_channel_type_streamed_media_run_request_stream_direction
                                                            (TpChannel *proxy,
                                                             gint timeout_ms,
                                                             guint in_stream_id,
                                                             guint in_stream_direction,
                                                             GError **error,
                                                             GMainLoop **loop);
    gboolean            tp_cli_channel_type_streamed_media_run_request_streams
                                                            (TpChannel *proxy,
                                                             gint timeout_ms,
                                                             guint in_contact_handle,
                                                             const GArray *in_types,
                                                             GPtrArray **out0,
                                                             GError **error,
                                                             GMainLoop **loop);
    TpProxySignalConnection* tp_cli_channel_type_streamed_media_connect_to_stream_added
                                                            (TpChannel *proxy,
                                                             tp_cli_channel_type_streamed_media_signal_callback_stream_added callback,
                                                             gpointer user_data,
                                                             GDestroyNotify destroy,
                                                             GObject *weak_object,
                                                             GError **error);
    TpProxySignalConnection* tp_cli_channel_type_streamed_media_connect_to_stream_direction_changed
                                                            (TpChannel *proxy,
                                                             tp_cli_channel_type_streamed_media_signal_callback_stream_direction_changed callback,
                                                             gpointer user_data,
                                                             GDestroyNotify destroy,
                                                             GObject *weak_object,
                                                             GError **error);
    TpProxySignalConnection* tp_cli_channel_type_streamed_media_connect_to_stream_error
                                                            (TpChannel *proxy,
                                                             tp_cli_channel_type_streamed_media_signal_callback_stream_error callback,
                                                             gpointer user_data,
                                                             GDestroyNotify destroy,
                                                             GObject *weak_object,
                                                             GError **error);
    TpProxySignalConnection* tp_cli_channel_type_streamed_media_connect_to_stream_removed
                                                            (TpChannel *proxy,
                                                             tp_cli_channel_type_streamed_media_signal_callback_stream_removed callback,
                                                             gpointer user_data,
                                                             GDestroyNotify destroy,
                                                             GObject *weak_object,
                                                             GError **error);
    TpProxySignalConnection* tp_cli_channel_type_streamed_media_connect_to_stream_state_changed
                                                            (TpChannel *proxy,
                                                             tp_cli_channel_type_streamed_media_signal_callback_stream_state_changed callback,
                                                             gpointer user_data,
                                                             GDestroyNotify destroy,
                                                             GObject *weak_object,
                                                             GError **error);
    void                (*tp_cli_channel_type_streamed_media_signal_callback_stream_added)
                                                            (TpChannel *proxy,
                                                             guint arg_stream_id,
                                                             guint arg_contact_handle,
                                                             guint arg_stream_type,
                                                             gpointer user_data,
                                                             GObject *weak_object);
    void                (*tp_cli_channel_type_streamed_media_signal_callback_stream_direction_changed)
                                                            (TpChannel *proxy,
                                                             guint arg_stream_id,
                                                             guint arg_stream_direction,
                                                             guint arg_pending_flags,
                                                             gpointer user_data,
                                                             GObject *weak_object);
    void                (*tp_cli_channel_type_streamed_media_signal_callback_stream_error)
                                                            (TpChannel *proxy,
                                                             guint arg_stream_id,
                                                             guint arg_errno,
                                                             const gchar *arg_message,
                                                             gpointer user_data,
                                                             GObject *weak_object);
    void                (*tp_cli_channel_type_streamed_media_signal_callback_stream_removed)
                                                            (TpChannel *proxy,
                                                             guint arg_stream_id,
                                                             gpointer user_data,
                                                             GObject *weak_object);
    void                (*tp_cli_channel_type_streamed_media_signal_callback_stream_state_changed)
                                                            (TpChannel *proxy,
                                                             guint arg_stream_id,
                                                             guint arg_stream_state,
                                                             gpointer user_data,
                                                             GObject *weak_object);

    gboolean            tp_cli_channel_interface_dtmf_run_start_tone
                                                            (TpChannel *proxy,
                                                             gint timeout_ms,
                                                             guint in_stream_id,
                                                             guchar in_event,
                                                             GError **error,
                                                             GMainLoop **loop);
    gboolean            tp_cli_channel_interface_dtmf_run_stop_tone
                                                            (TpChannel *proxy,
                                                             gint timeout_ms,
                                                             guint in_stream_id,
                                                             GError **error,
                                                             GMainLoop **loop);
    TpProxyPendingCall* tp_cli_channel_interface_dtmf_call_start_tone
                                                            (TpChannel *proxy,
                                                             gint timeout_ms,
                                                             guint in_stream_id,
                                                             guchar in_event,
                                                             tp_cli_channel_interface_dtmf_callback_for_start_tone callback,
                                                             gpointer user_data,
                                                             GDestroyNotify destroy,
                                                             GObject *weak_object);
    TpProxyPendingCall* tp_cli_channel_interface_dtmf_call_stop_tone
                                                            (TpChannel *proxy,
                                                             gint timeout_ms,
                                                             guint in_stream_id,
                                                             tp_cli_channel_interface_dtmf_callback_for_stop_tone callback,
                                                             gpointer user_data,
                                                             GDestroyNotify destroy,
                                                             GObject *weak_object);
    void                (*tp_cli_channel_interface_dtmf_callback_for_start_tone)
                                                            (TpChannel *proxy,
                                                             const GError *error,
                                                             gpointer user_data,
                                                             GObject *weak_object);
    void                (*tp_cli_channel_interface_dtmf_callback_for_stop_tone)
                                                            (TpChannel *proxy,
                                                             const GError *error,
                                                             gpointer user_data,
                                                             GObject *weak_object);

    gboolean            tp_cli_channel_interface_media_signalling_run_get_session_handlers
                                                            (TpChannel *proxy,
                                                             gint timeout_ms,
                                                             GPtrArray **out0,
                                                             GError **error,
                                                             GMainLoop **loop);
    TpProxyPendingCall* tp_cli_channel_interface_media_signalling_call_get_session_handlers
                                                            (TpChannel *proxy,
                                                             gint timeout_ms,
                                                             tp_cli_channel_interface_media_signalling_callback_for_get_session_handlers callback,
                                                             gpointer user_data,
                                                             GDestroyNotify destroy,
                                                             GObject *weak_object);
    void                (*tp_cli_channel_interface_media_signalling_callback_for_get_session_handlers)
                                                            (TpChannel *proxy,
                                                             const GPtrArray *out0,
                                                             const GError *error,
                                                             gpointer user_data,
                                                             GObject *weak_object);
    TpProxySignalConnection* tp_cli_channel_interface_media_signalling_connect_to_new_session_handler
                                                            (TpChannel *proxy,
                                                             tp_cli_channel_interface_media_signalling_signal_callback_new_session_handler callback,
                                                             gpointer user_data,
                                                             GDestroyNotify destroy,
                                                             GObject *weak_object,
                                                             GError **error);
    void                (*tp_cli_channel_interface_media_signalling_signal_callback_new_session_handler)
                                                            (TpChannel *proxy,
                                                             const gchar *arg_session_handler,
                                                             const gchar *arg_type,
                                                             gpointer user_data,
                                                             GObject *weak_object);

## 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 interface.

## Details

### tp_cli_channel_type_streamed_media_call_list_streams ()

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

Start a ListStreams method call.

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.

`proxy` : | the TpProxy
`timeout_ms` : | the timeout in milliseconds, or -1 to use the default
`callback` : | called when the method call succeeds or fails
`user_data` : | user-supplied data passed to the callback
`destroy` : | called with the user_data as argument, after the call has succeeded, failed or been cancelled
`weak_object` : | A GObject which will be weakly referenced; if it is destroyed, this callback will automatically be disconnected
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_type_streamed_media_call_remove_streams ()

    TpProxyPendingCall* tp_cli_channel_type_streamed_media_call_remove_streams
                                                            (TpChannel *proxy,
                                                             gint timeout_ms,
                                                             const GArray *in_streams,
                                                             tp_cli_channel_type_streamed_media_callback_for_remove_streams callback,
                                                             gpointer user_data,
                                                             GDestroyNotify destroy,
                                                             GObject *weak_object);

Start a RemoveStreams method call.

Request that the given streams are removed.

`proxy` : | the TpProxy
`timeout_ms` : | the timeout in milliseconds, or -1 to use the default
`in_streams` : | Used to pass an 'in' argument: An array of stream identifiers (as defined in ListStreams)
`callback` : | called when the method call succeeds or fails
`user_data` : | user-supplied data passed to the callback
`destroy` : | called with the user_data as argument, after the call has succeeded, failed or been cancelled
`weak_object` : | A GObject which will be weakly referenced; if it is destroyed, this callback will automatically be disconnected
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_type_streamed_media_call_request_stream_direction ()

    TpProxyPendingCall* tp_cli_channel_type_streamed_media_call_request_stream_direction
                                                            (TpChannel *proxy,
                                                             gint timeout_ms,
                                                             guint in_stream_id,
                                                             guint in_stream_direction,
                                                             tp_cli_channel_type_streamed_media_callback_for_request_stream_direction callback,
                                                             gpointer user_data,
                                                             GDestroyNotify destroy,
                                                             GObject *weak_object);

Start a RequestStreamDirection method call.

<tp:docstring xmlns="http://www.w3.org/1999/xhtml"> <p>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.</p> <p>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 -&gt; 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.</p>

`proxy` : | the TpProxy
`timeout_ms` : | the timeout in milliseconds, or -1 to use the default
`in_stream_id` : | Used to pass an 'in' argument: The stream identifier (as defined in ListStreams)
`in_stream_direction` : | Used to pass an 'in' argument: The desired stream direction (a value of MediaStreamDirection)
`callback` : | called when the method call succeeds or fails
`user_data` : | user-supplied data passed to the callback
`destroy` : | called with the user_data as argument, after the call has succeeded, failed or been cancelled
`weak_object` : | A GObject which will be weakly referenced; if it is destroyed, this callback will automatically be disconnected
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_type_streamed_media_call_request_streams ()

    TpProxyPendingCall* tp_cli_channel_type_streamed_media_call_request_streams
                                                            (TpChannel *proxy,
                                                             gint timeout_ms,
                                                             guint in_contact_handle,
                                                             const GArray *in_types,
                                                             tp_cli_channel_type_streamed_media_callback_for_request_streams callback,
                                                             gpointer user_data,
                                                             GDestroyNotify destroy,
                                                             GObject *weak_object);

Start a RequestStreams method call.

<tp:docstring xmlns="http://www.w3.org/1999/xhtml"> <p>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.</p>

`proxy` : | the TpProxy
`timeout_ms` : | the timeout in milliseconds, or -1 to use the default
`in_contact_handle` : | Used to pass an 'in' argument: A contact handle with whom to establish the streams
`in_types` : | Used to pass an 'in' argument: An array of stream types (values of MediaStreamType)
`callback` : | called when the method call succeeds or fails
`user_data` : | user-supplied data passed to the callback
`destroy` : | called with the user_data as argument, after the call has succeeded, failed or been cancelled
`weak_object` : | A GObject which will be weakly referenced; if it is destroyed, this callback will automatically be disconnected
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_type_streamed_media_callback_for_list_streams ()

    void                (*tp_cli_channel_type_streamed_media_callback_for_list_streams)
                                                            (TpChannel *proxy,
                                                             const GPtrArray *out0,
                                                             const GError *error,
                                                             gpointer user_data,
                                                             GObject *weak_object);

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

`proxy` : | the proxy on which the call was made
`out0` : | Used to return an 'out' argument if `error` is `NULL`: <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> An array of structs containing: <ul> <li>the stream identifier</li> <li>the contact handle who the stream is with (or 0 if the stream represents more than a single member)</li> <li>the type of the stream</li> <li>the current stream state</li> <li>the current direction of the stream</li> <li>the current pending send flags</li> </ul>
`error` : | `NULL` on success, or an error on failure
`user_data` : | user-supplied data
`weak_object` : | user-supplied object

### tp_cli_channel_type_streamed_media_callback_for_remove_streams ()

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

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

`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_type_streamed_media_callback_for_request_stream_direction ()

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

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

`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_type_streamed_media_callback_for_request_streams ()

    void                (*tp_cli_channel_type_streamed_media_callback_for_request_streams)
                                                            (TpChannel *proxy,
                                                             const GPtrArray *out0,
                                                             const GError *error,
                                                             gpointer user_data,
                                                             GObject *weak_object);

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

`proxy` : | the proxy on which the call was made
`out0` : | Used to return an 'out' argument if `error` is `NULL`: <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> An array of structs (in the same order as the given stream types) containing: <ul> <li>the stream identifier</li> <li>the contact handle who the stream is with (or 0 if the stream represents more than a single member)</li> <li>the type of the stream</li> <li>the current stream state</li> <li>the current direction of the stream</li> <li>the current pending send flags</li> </ul>
`error` : | `NULL` on success, or an error on failure
`user_data` : | user-supplied data
`weak_object` : | user-supplied object

### tp_cli_channel_type_streamed_media_run_list_streams ()

    gboolean            tp_cli_channel_type_streamed_media_run_list_streams
                                                            (TpChannel *proxy,
                                                             gint timeout_ms,
                                                             GPtrArray **out0,
                                                             GError **error,
                                                             GMainLoop **loop);

Call the method ListStreams and run the main loop until it returns. Before calling this method, you must add a reference to any borrowed objects you need to keep, and generally ensure that everything is in a consistent state.

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.

`proxy` : | A TpChannel or subclass
`timeout_ms` : | Timeout in milliseconds, or -1 for default
`out0` : | Used to return an 'out' argument if `TRUE` is returned: <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> An array of structs containing: <ul> <li>the stream identifier</li> <li>the contact handle who the stream is with (or 0 if the stream represents more than a single member)</li> <li>the type of the stream</li> <li>the current stream state</li> <li>the current direction of the stream</li> <li>the current pending send flags</li> </ul>
`error` : | If not `NULL`, used to return errors if `FALSE` is returned
`loop` : | If not `NULL`, set before re-entering the main loop, to point to a GMainLoop which can be used to cancel this call with `g_main_loop_quit()`, causing a return of `FALSE` with `error` set to `TP_DBUS_ERROR_CANCELLED`
Returns : | TRUE on success, FALSE and sets `error` on error

### tp_cli_channel_type_streamed_media_run_remove_streams ()

    gboolean            tp_cli_channel_type_streamed_media_run_remove_streams
                                                            (TpChannel *proxy,
                                                             gint timeout_ms,
                                                             const GArray *in_streams,
                                                             GError **error,
                                                             GMainLoop **loop);

Call the method RemoveStreams and run the main loop until it returns. Before calling this method, you must add a reference to any borrowed objects you need to keep, and generally ensure that everything is in a consistent state.

Request that the given streams are removed.

`proxy` : | A TpChannel or subclass
`timeout_ms` : | Timeout in milliseconds, or -1 for default
`in_streams` : | Used to pass an 'in' argument: An array of stream identifiers (as defined in ListStreams)
`error` : | If not `NULL`, used to return errors if `FALSE` is returned
`loop` : | If not `NULL`, set before re-entering the main loop, to point to a GMainLoop which can be used to cancel this call with `g_main_loop_quit()`, causing a return of `FALSE` with `error` set to `TP_DBUS_ERROR_CANCELLED`
Returns : | TRUE on success, FALSE and sets `error` on error

### tp_cli_channel_type_streamed_media_run_request_stream_direction ()

    gboolean            tp_cli_channel_type_streamed_media_run_request_stream_direction
                                                            (TpChannel *proxy,
                                                             gint timeout_ms,
                                                             guint in_stream_id,
                                                             guint in_stream_direction,
                                                             GError **error,
                                                             GMainLoop **loop);

Call the method RequestStreamDirection and run the main loop until it returns. Before calling this method, you must add a reference to any borrowed objects you need to keep, and generally ensure that everything is in a consistent state.

<tp:docstring xmlns="http://www.w3.org/1999/xhtml"> <p>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.</p> <p>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 -&gt; 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.</p>

`proxy` : | A TpChannel or subclass
`timeout_ms` : | Timeout in milliseconds, or -1 for default
`in_stream_id` : | Used to pass an 'in' argument: The stream identifier (as defined in ListStreams)
`in_stream_direction` : | Used to pass an 'in' argument: The desired stream direction (a value of MediaStreamDirection)
`error` : | If not `NULL`, used to return errors if `FALSE` is returned
`loop` : | If not `NULL`, set before re-entering the main loop, to point to a GMainLoop which can be used to cancel this call with `g_main_loop_quit()`, causing a return of `FALSE` with `error` set to `TP_DBUS_ERROR_CANCELLED`
Returns : | TRUE on success, FALSE and sets `error` on error

### tp_cli_channel_type_streamed_media_run_request_streams ()

    gboolean            tp_cli_channel_type_streamed_media_run_request_streams
                                                            (TpChannel *proxy,
                                                             gint timeout_ms,
                                                             guint in_contact_handle,
                                                             const GArray *in_types,
                                                             GPtrArray **out0,
                                                             GError **error,
                                                             GMainLoop **loop);

Call the method RequestStreams and run the main loop until it returns. Before calling this method, you must add a reference to any borrowed objects you need to keep, and generally ensure that everything is in a consistent state.

<tp:docstring xmlns="http://www.w3.org/1999/xhtml"> <p>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.</p>

`proxy` : | A TpChannel or subclass
`timeout_ms` : | Timeout in milliseconds, or -1 for default
`in_contact_handle` : | Used to pass an 'in' argument: A contact handle with whom to establish the streams
`in_types` : | Used to pass an 'in' argument: An array of stream types (values of MediaStreamType)
`out0` : | Used to return an 'out' argument if `TRUE` is returned: <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> An array of structs (in the same order as the given stream types) containing: <ul> <li>the stream identifier</li> <li>the contact handle who the stream is with (or 0 if the stream represents more than a single member)</li> <li>the type of the stream</li> <li>the current stream state</li> <li>the current direction of the stream</li> <li>the current pending send flags</li> </ul>
`error` : | If not `NULL`, used to return errors if `FALSE` is returned
`loop` : | If not `NULL`, set before re-entering the main loop, to point to a GMainLoop which can be used to cancel this call with `g_main_loop_quit()`, causing a return of `FALSE` with `error` set to `TP_DBUS_ERROR_CANCELLED`
Returns : | TRUE on success, FALSE and sets `error` on error

### tp_cli_channel_type_streamed_media_connect_to_stream_added ()

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

Connect a handler to the signal StreamAdded.

Emitted when a new stream has been added to this channel.

`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.

### tp_cli_channel_type_streamed_media_connect_to_stream_direction_changed ()

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

Connect a handler to the signal StreamDirectionChanged.

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. RequestStreamDirection should be called to indicate whether or not this change is acceptable.

`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.

### tp_cli_channel_type_streamed_media_connect_to_stream_error ()

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

Connect a handler to the signal StreamError.

Emitted when a stream encounters an error.

`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.

### tp_cli_channel_type_streamed_media_connect_to_stream_removed ()

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

Connect a handler to the signal StreamRemoved.

Emitted when a stream has been removed from this channel.

`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.

### tp_cli_channel_type_streamed_media_connect_to_stream_state_changed ()

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

Connect a handler to the signal StreamStateChanged.

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

`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.

### tp_cli_channel_type_streamed_media_signal_callback_stream_added ()

    void                (*tp_cli_channel_type_streamed_media_signal_callback_stream_added)
                                                            (TpChannel *proxy,
                                                             guint arg_stream_id,
                                                             guint arg_contact_handle,
                                                             guint arg_stream_type,
                                                             gpointer user_data,
                                                             GObject *weak_object);

Represents the signature of a callback for the signal StreamAdded.

`proxy` : | The proxy on which `tp_cli_channel_type_streamed_media_connect_to_stream_added()` was called
`arg_stream_id` : | The stream identifier (as defined in ListStreams)
`arg_contact_handle` : | The contact handle who the stream is with (or 0 if it represents more than a single member)
`arg_stream_type` : | The stream type (a value from MediaStreamType)
`user_data` : | User-supplied data
`weak_object` : | User-supplied weakly referenced object

### tp_cli_channel_type_streamed_media_signal_callback_stream_direction_changed ()

    void                (*tp_cli_channel_type_streamed_media_signal_callback_stream_direction_changed)
                                                            (TpChannel *proxy,
                                                             guint arg_stream_id,
                                                             guint arg_stream_direction,
                                                             guint arg_pending_flags,
                                                             gpointer user_data,
                                                             GObject *weak_object);

Represents the signature of a callback for the signal StreamDirectionChanged.

`proxy` : | The proxy on which `tp_cli_channel_type_streamed_media_connect_to_stream_direction_changed()` was called
`arg_stream_id` : | The stream identifier (as defined in ListStreams)
`arg_stream_direction` : | The new stream direction (as defined in ListStreams)
`arg_pending_flags` : | The new pending send flags (as defined in ListStreams)
`user_data` : | User-supplied data
`weak_object` : | User-supplied weakly referenced object

### tp_cli_channel_type_streamed_media_signal_callback_stream_error ()

    void                (*tp_cli_channel_type_streamed_media_signal_callback_stream_error)
                                                            (TpChannel *proxy,
                                                             guint arg_stream_id,
                                                             guint arg_errno,
                                                             const gchar *arg_message,
                                                             gpointer user_data,
                                                             GObject *weak_object);

Represents the signature of a callback for the signal StreamError.

`proxy` : | The proxy on which `tp_cli_channel_type_streamed_media_connect_to_stream_error()` was called
`arg_stream_id` : | The stream identifier (as defined in ListStreams)
`arg_errno` : | A stream error number, one of the values of MediaStreamError
`arg_message` : | A string describing the error (for debugging purposes only)
`user_data` : | User-supplied data
`weak_object` : | User-supplied weakly referenced object

### tp_cli_channel_type_streamed_media_signal_callback_stream_removed ()

    void                (*tp_cli_channel_type_streamed_media_signal_callback_stream_removed)
                                                            (TpChannel *proxy,
                                                             guint arg_stream_id,
                                                             gpointer user_data,
                                                             GObject *weak_object);

Represents the signature of a callback for the signal StreamRemoved.

`proxy` : | The proxy on which `tp_cli_channel_type_streamed_media_connect_to_stream_removed()` was called
`arg_stream_id` : | stream_id - the stream identifier (as defined in ListStreams)
`user_data` : | User-supplied data
`weak_object` : | User-supplied weakly referenced object

### tp_cli_channel_type_streamed_media_signal_callback_stream_state_changed ()

    void                (*tp_cli_channel_type_streamed_media_signal_callback_stream_state_changed)
                                                            (TpChannel *proxy,
                                                             guint arg_stream_id,
                                                             guint arg_stream_state,
                                                             gpointer user_data,
                                                             GObject *weak_object);

Represents the signature of a callback for the signal StreamStateChanged.

`proxy` : | The proxy on which `tp_cli_channel_type_streamed_media_connect_to_stream_state_changed()` was called
`arg_stream_id` : | The stream identifier (as defined in ListStreams)
`arg_stream_state` : | The new stream state (as defined in ListStreams)
`user_data` : | User-supplied data
`weak_object` : | User-supplied weakly referenced object

### tp_cli_channel_interface_dtmf_run_start_tone ()

    gboolean            tp_cli_channel_interface_dtmf_run_start_tone
                                                            (TpChannel *proxy,
                                                             gint timeout_ms,
                                                             guint in_stream_id,
                                                             guchar in_event,
                                                             GError **error,
                                                             GMainLoop **loop);

Call the method StartTone and run the main loop until it returns. Before calling this method, you must add a reference to any borrowed objects you need to keep, and generally ensure that everything is in a consistent state.

Start sending a DTMF tone on this stream. Where possible, the tone will continue until StopTone is called. On certain protocols, it may only be possible to send events with a predetermined length. In this case, the implementation may emit a fixed-length tone, and the StopTone method call should return NotAvailable.

`proxy` : | A TpChannel or subclass
`timeout_ms` : | Timeout in milliseconds, or -1 for default
`in_stream_id` : | Used to pass an 'in' argument: A stream ID as defined in the StreamedMedia channel type.
`in_event` : | Used to pass an 'in' argument: A numeric event code from the DTMF_Event enum.
`error` : | If not `NULL`, used to return errors if `FALSE` is returned
`loop` : | If not `NULL`, set before re-entering the main loop, to point to a GMainLoop which can be used to cancel this call with `g_main_loop_quit()`, causing a return of `FALSE` with `error` set to `TP_DBUS_ERROR_CANCELLED`
Returns : | TRUE on success, FALSE and sets `error` on error

### tp_cli_channel_interface_dtmf_run_stop_tone ()

    gboolean            tp_cli_channel_interface_dtmf_run_stop_tone
                                                            (TpChannel *proxy,
                                                             gint timeout_ms,
                                                             guint in_stream_id,
                                                             GError **error,
                                                             GMainLoop **loop);

Call the method StopTone and run the main loop until it returns. Before calling this method, you must add a reference to any borrowed objects you need to keep, and generally ensure that everything is in a consistent state.

Stop sending any DTMF tone which has been started using the StartTone method. If there is no current tone, this method will do nothing.

`proxy` : | A TpChannel or subclass
`timeout_ms` : | Timeout in milliseconds, or -1 for default
`in_stream_id` : | Used to pass an 'in' argument: A stream ID as defined in the StreamedMedia channel type.
`error` : | If not `NULL`, used to return errors if `FALSE` is returned
`loop` : | If not `NULL`, set before re-entering the main loop, to point to a GMainLoop which can be used to cancel this call with `g_main_loop_quit()`, causing a return of `FALSE` with `error` set to `TP_DBUS_ERROR_CANCELLED`
Returns : | TRUE on success, FALSE and sets `error` on error

### tp_cli_channel_interface_dtmf_call_start_tone ()

    TpProxyPendingCall* tp_cli_channel_interface_dtmf_call_start_tone
                                                            (TpChannel *proxy,
                                                             gint timeout_ms,
                                                             guint in_stream_id,
                                                             guchar in_event,
                                                             tp_cli_channel_interface_dtmf_callback_for_start_tone callback,
                                                             gpointer user_data,
                                                             GDestroyNotify destroy,
                                                             GObject *weak_object);

Start a StartTone method call.

Start sending a DTMF tone on this stream. Where possible, the tone will continue until StopTone is called. On certain protocols, it may only be possible to send events with a predetermined length. In this case, the implementation may emit a fixed-length tone, and the StopTone method call should return NotAvailable.

`proxy` : | the TpProxy
`timeout_ms` : | the timeout in milliseconds, or -1 to use the default
`in_stream_id` : | Used to pass an 'in' argument: A stream ID as defined in the StreamedMedia channel type.
`in_event` : | Used to pass an 'in' argument: A numeric event code from the DTMF_Event enum.
`callback` : | called when the method call succeeds or fails
`user_data` : | user-supplied data passed to the callback
`destroy` : | called with the user_data as argument, after the call has succeeded, failed or been cancelled
`weak_object` : | A GObject which will be weakly referenced; if it is destroyed, this callback will automatically be disconnected
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_dtmf_call_stop_tone ()

    TpProxyPendingCall* tp_cli_channel_interface_dtmf_call_stop_tone
                                                            (TpChannel *proxy,
                                                             gint timeout_ms,
                                                             guint in_stream_id,
                                                             tp_cli_channel_interface_dtmf_callback_for_stop_tone callback,
                                                             gpointer user_data,
                                                             GDestroyNotify destroy,
                                                             GObject *weak_object);

Start a StopTone method call.

Stop sending any DTMF tone which has been started using the StartTone method. If there is no current tone, this method will do nothing.

`proxy` : | the TpProxy
`timeout_ms` : | the timeout in milliseconds, or -1 to use the default
`in_stream_id` : | Used to pass an 'in' argument: A stream ID as defined in the StreamedMedia channel type.
`callback` : | called when the method call succeeds or fails
`user_data` : | user-supplied data passed to the callback
`destroy` : | called with the user_data as argument, after the call has succeeded, failed or been cancelled
`weak_object` : | A GObject which will be weakly referenced; if it is destroyed, this callback will automatically be disconnected
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_dtmf_callback_for_start_tone ()

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

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

`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_dtmf_callback_for_stop_tone ()

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

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

`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_media_signalling_run_get_session_handlers ()

    gboolean            tp_cli_channel_interface_media_signalling_run_get_session_handlers
                                                            (TpChannel *proxy,
                                                             gint timeout_ms,
                                                             GPtrArray **out0,
                                                             GError **error,
                                                             GMainLoop **loop);

Call the method GetSessionHandlers and run the main loop until it returns. Before calling this method, you must add a reference to any borrowed objects you need to keep, and generally ensure that everything is in a consistent state.

Returns all currently active session handlers on this channel as a list of (session_handler_path, type).

`proxy` : | A TpChannel or subclass
`timeout_ms` : | Timeout in milliseconds, or -1 for default
`out0` : | Used to return an 'out' argument if `TRUE` is returned: (Undocumented)
`error` : | If not `NULL`, used to return errors if `FALSE` is returned
`loop` : | If not `NULL`, set before re-entering the main loop, to point to a GMainLoop which can be used to cancel this call with `g_main_loop_quit()`, causing a return of `FALSE` with `error` set to `TP_DBUS_ERROR_CANCELLED`
Returns : | TRUE on success, FALSE and sets `error` on error

### tp_cli_channel_interface_media_signalling_call_get_session_handlers ()

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

Start a GetSessionHandlers method call.

Returns all currently active session handlers on this channel as a list of (session_handler_path, type).

`proxy` : | the TpProxy
`timeout_ms` : | the timeout in milliseconds, or -1 to use the default
`callback` : | called when the method call succeeds or fails
`user_data` : | user-supplied data passed to the callback
`destroy` : | called with the user_data as argument, after the call has succeeded, failed or been cancelled
`weak_object` : | A GObject which will be weakly referenced; if it is destroyed, this callback will automatically be disconnected
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_media_signalling_callback_for_get_session_handlers ()

    void                (*tp_cli_channel_interface_media_signalling_callback_for_get_session_handlers)
                                                            (TpChannel *proxy,
                                                             const GPtrArray *out0,
                                                             const GError *error,
                                                             gpointer user_data,
                                                             GObject *weak_object);

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

`proxy` : | the proxy on which the call was made
`out0` : | Used to return an 'out' argument if `error` is `NULL`: (Undocumented)
`error` : | `NULL` on success, or an error on failure
`user_data` : | user-supplied data
`weak_object` : | user-supplied object

### tp_cli_channel_interface_media_signalling_connect_to_new_session_handler ()

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

Connect a handler to the signal NewSessionHandler.

Signal that a session handler object has been created. The client should create a session object and create streams for the streams within.

`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.

### tp_cli_channel_interface_media_signalling_signal_callback_new_session_handler ()

    void                (*tp_cli_channel_interface_media_signalling_signal_callback_new_session_handler)
                                                            (TpChannel *proxy,
                                                             const gchar *arg_session_handler,
                                                             const gchar *arg_type,
                                                             gpointer user_data,
                                                             GObject *weak_object);

Represents the signature of a callback for the signal NewSessionHandler.

`proxy` : | The proxy on which `tp_cli_channel_interface_media_signalling_connect_to_new_session_handler()` was called
`arg_session_handler` : | Object path of the new MediaSessionHandler object
`arg_type` : | String indicating type of session, eg &quot;rtp&quot;
`user_data` : | User-supplied data
`weak_object` : | User-supplied weakly referenced object

## See Also

channel-group, TpChannel