## TpCallStream

TpCallStream — proxy object for a call stream

## Functions

void | tp_call_stream_init_known_interfaces ()
gboolean | tp_call_stream_can_request_receiving ()
TpSendingState | tp_call_stream_get_local_sending_state ()
GHashTable * | tp_call_stream_get_remote_members ()
void | tp_call_stream_request_receiving_async ()
gboolean | tp_call_stream_request_receiving_finish ()
void | tp_call_stream_set_sending_async ()
gboolean | tp_call_stream_set_sending_finish ()

## Properties

gboolean | can-request-receiving | Read
TpConnection * | connection | Read / Write / Construct Only
TpCallContent * | content | Read / Write / Construct Only
guint | local-sending-state | Read

## Signals

void | local-sending-state-changed | Run Last
void | remote-members-changed | Run Last

## Types and Values

struct | TpCallStream
struct | TpCallStreamClass
#define | TP_CALL_STREAM_FEATURE_CORE

## Object Hierarchy

        GObject
        ╰── TpProxy
            ╰── TpCallStream

## Includes

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

## Description

TpCallStream is a sub-class of TpProxy providing convenient API to represent TpCallChannel's stream.

## Functions

### tp_call_stream_init_known_interfaces ()

    void
    tp_call_stream_init_known_interfaces (void);

Ensure that the known interfaces for TpCallStream have been set up. This is done automatically when necessary, but for correct overriding of library interfaces by local extensions, you should call this function before calling `tp_proxy_or_subclass_hook_on_interface_add()` with first argument `TP_TYPE_CALL_STREAM`.

Since: 0.17.5

### tp_call_stream_can_request_receiving ()

    gboolean
    tp_call_stream_can_request_receiving (TpCallStream *self);

#### Parameters

self | a TpCallStream |

#### Returns

the value of “can-request-receiving”

Since: 0.17.5

### tp_call_stream_get_local_sending_state ()

    TpSendingState
    tp_call_stream_get_local_sending_state
                                   (TpCallStream *self);

#### Parameters

self | a TpCallStream |

#### Returns

the value of “local-sending-state”

Since: 0.17.5

### tp_call_stream_get_remote_members ()

    GHashTable *
    tp_call_stream_get_remote_members (TpCallStream *self);

Get the remote contacts to who this stream is connected, mapped to their sending state.

It is NOT guaranteed that TpContact objects have any feature prepared.

#### Parameters

self | a TpCallStream |

#### Returns

GHashTable mapping TpContact to its new TpSendingState.

[transfer none][type GLib.HashTable][element-type TelepathyGLib.Contact uint]

Since: 0.17.5

### tp_call_stream_request_receiving_async ()

    void
    tp_call_stream_request_receiving_async
                                   (TpCallStream *self,
                                    TpContact *contact,
                                    gboolean receive,
                                    GAsyncReadyCallback callback,
                                    gpointer user_data);

Request that a remote contact stops or starts sending on this stream.

The “can-request-receiving” property defines whether the protocol allows the local user to request the other side start sending on this stream.

If `receive` is `TRUE`, request that the given contact starts to send media. If `receive` is `FALSE`, request that the given contact stops sending media.

#### Parameters

self | a TpCallStream |
contact | contact from which sending is requested |
receive | the requested receiving state |
callback | a callback to call when the operation finishes |
user_data | data to pass to `callback` |

Since: 0.17.5

### tp_call_stream_request_receiving_finish ()

    gboolean
    tp_call_stream_request_receiving_finish
                                   (TpCallStream *self,
                                    GAsyncResult *result,
                                    GError **error);

Finishes `tp_call_stream_request_receiving_async()`.

#### Parameters

self | a TpCallStream |
result | a GAsyncResult |
error | a GError to fill |

Since: 0.17.5

### tp_call_stream_set_sending_async ()

    void
    tp_call_stream_set_sending_async (TpCallStream *self,
                                      gboolean send,
                                      GAsyncReadyCallback callback,
                                      gpointer user_data);

Set the stream to start or stop sending media from the local user to other contacts.

If `send` is `TRUE`, “local-sending-state” should change to `TP_SENDING_STATE_SENDING`, if it isn't already. If `send` is `FALSE`, “local-sending-state” should change to `TP_SENDING_STATE_NONE`, if it isn't already.

#### Parameters

self | a TpCallStream |
send | the requested sending state |
callback | a callback to call when the operation finishes |
user_data | data to pass to `callback` |

Since: 0.17.5

### tp_call_stream_set_sending_finish ()

    gboolean
    tp_call_stream_set_sending_finish (TpCallStream *self,
                                       GAsyncResult *result,
                                       GError **error);

Finishes `tp_call_stream_set_sending_async()`.

#### Parameters

self | a TpCallStream |
result | a GAsyncResult |
error | a GError to fill |

Since: 0.17.5

## Types and Values

### struct TpCallStream

    struct TpCallStream;

Data structure representing a TpCallStream.

Since: 0.17.5

### struct TpCallStreamClass

    struct TpCallStreamClass {
    };

The class of a TpCallStream.

Since: 0.17.5

### TP_CALL_STREAM_FEATURE_CORE

    #define             TP_CALL_STREAM_FEATURE_CORE

Expands to a call to a function that returns a quark for the "core" feature on a TpCallStream.

One can ask for a feature to be prepared using the `tp_proxy_prepare_async()` function, and waiting for it to trigger the callback.

## Property Details

### The `“can-request-receiving”` property

      “can-request-receiving”    gboolean

If `TRUE`, the user can request that a remote contact starts sending on this stream.

Owner: TpCallStream

Flags: Read

Default value: FALSE

Since: 0.17.5

### The `“connection”` property

      “connection”               TpConnection *

The TpConnection of the call.

Owner: TpCallStream

Flags: Read / Write / Construct Only

Since: 0.17.5

### The `“content”` property

      “content”                  TpCallContent *

The Content that this streams belongs to

Owner: TpCallStream

Flags: Read / Write / Construct Only

Since: 0.17.6

### The `“local-sending-state”` property

      “local-sending-state”      guint

The local user's sending state, from TpSendingState.

Owner: TpCallStream

Flags: Read

Default value: 0

Since: 0.17.5

## Signal Details

### The `“local-sending-state-changed”` signal

    void
    user_function (TpCallStream      *self,
                   guint              state,
                   TpCallStateReason *reason,
                   gpointer           user_data)

The ::local-sending-state-changed signal is emitted whenever the stream sending state changes.

#### Parameters

self | the TpCallStream |
state | the new TpSendingState |
reason | the TpCallStateReason for the change |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

Since: 0.17.5

### The `“remote-members-changed”` signal

    void
    user_function (TpCallStream      *self,
                   GHashTable        *updates,
                   GPtrArray         *removed,
                   TpCallStateReason *reason,
                   gpointer           user_data)

The ::remote-members-changed signal is emitted whenever the stream's remote members changes.

It is NOT guaranteed that TpContact objects have any feature prepared.

#### Parameters

self | the TpCallStream |
updates | GHashTable mapping TpContact to its new TpSendingState. | [type GLib.HashTable][element-type TelepathyGLib.Contact uint]
removed | GPtrArray of TpContact removed from remote contacts. | [type GLib.PtrArray][element-type TelepathyGLib.Contact]
reason | the TpCallStateReason for the change |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

Since: 0.17.5