TpBaseCallStream

TpBaseCallStream — base class for TpSvcCall1Stream implementations

Functions

Properties

gboolean can-request-receiving Read
TpBaseCallChannel * channel Read
TpBaseConnection * connection Read / Write / Construct Only
TpBaseCallContent * content Read / Write / Construct Only
GStrv interfaces Read
guint local-sending-state Read / Write / Construct Only
gchar * object-path Read / Write / Construct Only
GHashTable_guint+gchararray_* remote-member-identifiers Read
GHashTable_guint+guint_* remote-members Read

Types and Values

Object Hierarchy

    GObject
    ╰── TpBaseCallStream
        ╰── TpBaseMediaCallStream

Implemented Interfaces

TpBaseCallStream implements TpSvcCall1Stream.

Includes

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

Description

This base class makes it easier to write TpSvcCall1Stream implementations by implementing its properties, and some of its methods.

Subclasses should fill in TpBaseCallStreamClass.get_interfaces, TpBaseCallStreamClass.request_receiving and TpBaseCallStreamClass.set_sending virtual function.

Functions

TpBaseCallStreamGetInterfacesFunc ()

GPtrArray *
(*TpBaseCallStreamGetInterfacesFunc) (TpBaseCallStream *self);

Signature of an implementation of TpBaseCallStreamClass.get_interfaces.

Parameters

self

a TpBaseCallStream

 

Returns

a GPtrArray containing static strings.

Since 0.17.5


TpBaseCallStreamRequestReceivingFunc ()

gboolean
(*TpBaseCallStreamRequestReceivingFunc)
                               (TpBaseCallStream *self,
                                TpHandle contact,
                                gboolean receive,
                                GError **error);

Signature of an implementation of TpBaseCallStreamClass.request_receiving.

Parameters

self

a TpBaseCallStream

 

contact

the contact from who user wants to start or stop receiving

 

receive

wheter or not user would like to be receiving

 

error

a GError to fill

 

Returns

TRUE on success, FALSE otherwise.

Since 0.17.5


TpBaseCallStreamSetSendingFunc ()

gboolean
(*TpBaseCallStreamSetSendingFunc) (TpBaseCallStream *self,
                                   gboolean sending,
                                   GError **error);

Signature of an implementation of TpBaseCallStreamClass.set_sending.

Parameters

self

a TpBaseCallStream

 

sending

whether or not user would like to be sending

 

error

a GError to fill

 

Returns

TRUE on success, FALSE otherwise.

Since 0.17.5


tp_base_call_stream_get_connection ()

TpBaseConnection *
tp_base_call_stream_get_connection (TpBaseCallStream *self);

Parameters

self

a TpBaseCallStream

 

Returns

the value of “connection”

Since 0.17.5


tp_base_call_stream_get_object_path ()

const gchar *
tp_base_call_stream_get_object_path (TpBaseCallStream *self);

Parameters

self

a TpBaseCallStream

 

Returns

the value of “object-path”

Since 0.17.5


tp_base_call_stream_get_local_sending_state ()

TpSendingState
tp_base_call_stream_get_local_sending_state
                               (TpBaseCallStream *self);

Parameters

self

a TpBaseCallStream

 

Returns

the value of “local-sending-state”

Since 0.17.5


tp_base_call_stream_update_local_sending_state ()

gboolean
tp_base_call_stream_update_local_sending_state
                               (TpBaseCallStream *self,
                                TpSendingState new_state,
                                TpHandle actor_handle,
                                TpCallStateChangeReason reason,
                                const gchar *dbus_reason,
                                const gchar *message);

Update the local sending state, emitting LocalSendingStateChanged DBus signal if needed.

Parameters

self

a TpBaseCallStream

 

new_state

the new local TpSendingState

 

actor_handle

the contact responsible for the change, or 0 if no contact was responsible.

 

reason

the TpCallStateChangeReason of the change

 

dbus_reason

a specific reason for the change, which may be a D-Bus error in the Telepathy namespace, a D-Bus error in any other namespace (for implementation-specific errors), or the empty string to indicate that the state change was not an error.

 

message

an optional debug message, to expediate debugging the potentially many processes involved in a call.

 

Returns

TRUE if state was updated, FALSE if it was already set to new_state .

Since 0.17.5


tp_base_call_stream_get_remote_sending_state ()

TpSendingState
tp_base_call_stream_get_remote_sending_state
                               (TpBaseCallStream *self,
                                TpHandle contact);

Parameters

self

a TpBaseCallStream

 

contact

the TpHandle of a member contact

 

Returns

the TpSendingState of contact .

Since 0.17.5


tp_base_call_stream_update_remote_sending_state ()

gboolean
tp_base_call_stream_update_remote_sending_state
                               (TpBaseCallStream *self,
                                TpHandle contact,
                                TpSendingState new_state,
                                TpHandle actor_handle,
                                TpCallStateChangeReason reason,
                                const gchar *dbus_reason,
                                const gchar *message);

If contact is not member, add it. Otherwise update its sending state. Emits RemoteMemberChanged DBus signal if needed.

Parameters

self

a TpBaseCallStream

 

contact

the TpHandle to update or add to members

 

new_state

the new sending state of contact

 

actor_handle

the contact responsible for the change, or 0 if no contact was responsible.

 

reason

the TpCallStateChangeReason of the change

 

dbus_reason

a specific reason for the change, which may be a D-Bus error in the Telepathy namespace, a D-Bus error in any other namespace (for implementation-specific errors), or the empty string to indicate that the state change was not an error.

 

message

an optional debug message, to expediate debugging the potentially many processes involved in a call.

 

Returns

TRUE if state was updated, FALSE if it was already set to new_state .

Since 0.17.5


tp_base_call_stream_remove_member ()

gboolean
tp_base_call_stream_remove_member (TpBaseCallStream *self,
                                   TpHandle contact,
                                   TpHandle actor_handle,
                                   TpCallStateChangeReason reason,
                                   const gchar *dbus_reason,
                                   const gchar *message);

Remove contact from stream members, emitting RemoteMembersChanged DBus signal if needed. Do nothing if contact is not member.

Parameters

self

a TpBaseCallStream

 

contact

the TpHandle to remove from members

 

actor_handle

the contact responsible for the change, or 0 if no contact was responsible.

 

reason

the TpCallStateChangeReason of the change

 

dbus_reason

a specific reason for the change, which may be a D-Bus error in the Telepathy namespace, a D-Bus error in any other namespace (for implementation-specific errors), or the empty string to indicate that the state change was not an error.

 

message

an optional debug message, to expediate debugging the potentially many processes involved in a call.

 

Returns

TRUE if contact was removed, FALSE if it was not member.

Since 0.17.5

Types and Values

struct TpBaseCallStream

struct TpBaseCallStream;

A base class for call stream implementations

Since 0.17.5


struct TpBaseCallStreamClass

struct TpBaseCallStreamClass {
  TpBaseCallStreamRequestReceivingFunc request_receiving;
  TpBaseCallStreamSetSendingFunc set_sending;
  TpBaseCallStreamGetInterfacesFunc get_interfaces;
};

The class structure for TpBaseCallStream

Members

TpBaseCallStreamRequestReceivingFunc request_receiving;

optional (see “can-request-receiving”); virtual method called when user requested receiving from the given remote contact.

 

TpBaseCallStreamSetSendingFunc set_sending;

mandatory; virtual method called when user requested to start/stop sending to remote contacts.

 

TpBaseCallStreamGetInterfacesFunc get_interfaces;

extra interfaces provided by this stream (this SHOULD NOT include TP_IFACE_CALL_STREAM itself). Implementation must first chainup on parent class implementation then add extra interfaces into the GPtrArray.

 

Since 0.17.5

Property Details

The “can-request-receiving” property

  “can-request-receiving”    gboolean

Whether or not user can request receiving from remote contact using the RequestSending DBus method call. The value is determined by whether or not TpBaseCallStreamClass.request_receiving is implemented.

Flags: Read

Default value: FALSE

Since 0.17.5


The “channel” property

  “channel”                  TpBaseCallChannel *

TpBaseChannel object that owns this call stream.

Flags: Read

Since 0.17.5


The “connection” property

  “connection”               TpBaseConnection *

TpBaseConnection object that owns this call stream.

Flags: Read / Write / Construct Only

Since 0.17.5


The “content” property

  “content”                  TpBaseCallContent *

TpBaseCallContent object that owns this call stream.

Flags: Read / Write / Construct Only

Since 0.17.6


The “interfaces” property

  “interfaces”               GStrv

Additional interfaces implemented by this stream.

Flags: Read

Since 0.17.5


The “local-sending-state” property

  “local-sending-state”      guint

The local TpSendingState.

Flags: Read / Write / Construct Only

Allowed values: <= 4

Default value: 0

Since 0.17.5


The “object-path” property

  “object-path”              gchar *

The D-Bus object path used for this object on the bus.

Flags: Read / Write / Construct Only

Default value: NULL

Since 0.17.5


The “remote-member-identifiers” property

  “remote-member-identifiers” GHashTable_guint+gchararray_*

GHashTable mapping contact TpHandle to their identifies.

Flags: Read

Since 0.17.5


The “remote-members” property

  “remote-members”           GHashTable_guint+guint_*

GHashTable mapping contact TpHandle to their TpSendingState.

Flags: Read

Since 0.17.5

See Also

TpSvcCall1Stream, TpBaseCallChannel and TpBaseCallContent