| telepathy-glib API Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Implemented Interfaces | Properties | ||||
TpBaseCallStreamTpBaseCallStream — base class for TpSvcCallStream implementations |
#include <telepathy-glib/telepathy-glib.h>
TpBaseCallStream;
struct TpBaseCallStreamClass;
GPtrArray * (*TpBaseCallStreamGetInterfacesFunc)
(TpBaseCallStream *self);
gboolean (*TpBaseCallStreamRequestReceivingFunc)
(TpBaseCallStream *self,
TpHandle contact,
gboolean receive,
GError **error);
gboolean (*TpBaseCallStreamSetSendingFunc) (TpBaseCallStream *self,
gboolean sending,
GError **error);
TpBaseConnection * tp_base_call_stream_get_connection (TpBaseCallStream *self);
const gchar * tp_base_call_stream_get_object_path (TpBaseCallStream *self);
TpSendingState tp_base_call_stream_get_local_sending_state
(TpBaseCallStream *self);
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);
TpSendingState tp_base_call_stream_get_remote_sending_state
(TpBaseCallStream *self,
TpHandle contact);
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);
gboolean tp_base_call_stream_remove_member (TpBaseCallStream *self,
TpHandle contact,
TpHandle actor_handle,
TpCallStateChangeReason reason,
const gchar *dbus_reason,
const gchar *message);
"can-request-receiving" gboolean : Read "channel" TpBaseCallChannel* : Read "connection" TpBaseConnection* : Read / Write / Construct Only "content" TpBaseCallContent* : Read / Write / Construct Only "interfaces" GStrv : Read "local-sending-state" guint : Read / Write / Construct Only "object-path" gchar* : Read / Write / Construct Only "remote-member-identifiers" GHashTable_guint+gchararray_* : Read "remote-members" GHashTable_guint+guint_* : Read
This base class makes it easier to write TpSvcCallStream 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.
typedef struct _TpBaseCallStream TpBaseCallStream;
A base class for call stream implementations
Since 0.17.5
struct TpBaseCallStreamClass {
TpBaseCallStreamRequestReceivingFunc request_receiving;
TpBaseCallStreamSetSendingFunc set_sending;
TpBaseCallStreamGetInterfacesFunc get_interfaces;
};
The class structure for TpBaseCallStream
TpBaseCallStreamRequestReceivingFunc |
optional (see "can-request-receiving"); virtual method called when user requested receiving from the given remote contact. |
TpBaseCallStreamSetSendingFunc |
mandatory; virtual method called when user requested to start/stop sending to remote contacts. |
TpBaseCallStreamGetInterfacesFunc |
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
GPtrArray * (*TpBaseCallStreamGetInterfacesFunc)
(TpBaseCallStream *self);
Signature of an implementation of TpBaseCallStreamClass.get_interfaces.
|
a TpBaseCallStream |
Returns : |
a GPtrArray containing static strings. |
Since 0.17.5
gboolean (*TpBaseCallStreamRequestReceivingFunc) (TpBaseCallStream *self,TpHandle contact,gboolean receive,GError **error);
Signature of an implementation of TpBaseCallStreamClass.request_receiving.
|
a TpBaseCallStream |
|
the contact from who user wants to start or stop receiving |
|
wheter or not user would like to be receiving |
|
a GError to fill |
Returns : |
TRUE on success, FALSE otherwise. |
Since 0.17.5
gboolean (*TpBaseCallStreamSetSendingFunc) (TpBaseCallStream *self,gboolean sending,GError **error);
Signature of an implementation of TpBaseCallStreamClass.set_sending.
|
a TpBaseCallStream |
|
whether or not user would like to be sending |
|
a GError to fill |
Returns : |
TRUE on success, FALSE otherwise. |
Since 0.17.5
TpBaseConnection * tp_base_call_stream_get_connection (TpBaseCallStream *self);
|
a TpBaseCallStream |
Returns : |
the value of "connection" |
Since 0.17.5
const gchar * tp_base_call_stream_get_object_path (TpBaseCallStream *self);
|
a TpBaseCallStream |
Returns : |
the value of "object-path" |
Since 0.17.5
TpSendingState tp_base_call_stream_get_local_sending_state
(TpBaseCallStream *self);
|
a TpBaseCallStream |
Returns : |
the value of "local-sending-state" |
Since 0.17.5
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.
|
a TpBaseCallStream |
|
the new local TpSendingState |
|
the contact responsible for the change, or 0 if no contact was responsible. |
|
the TpCallStateChangeReason of the change |
|
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. |
|
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
TpSendingState tp_base_call_stream_get_remote_sending_state (TpBaseCallStream *self,TpHandle contact);
|
a TpBaseCallStream |
|
the TpHandle of a member contact |
Returns : |
the TpSendingState of contact. |
Since 0.17.5
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.
|
a TpBaseCallStream |
|
the TpHandle to update or add to members |
|
the new sending state of contact
|
|
the contact responsible for the change, or 0 if no contact was responsible. |
|
the TpCallStateChangeReason of the change |
|
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. |
|
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
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.
|
a TpBaseCallStream |
|
the TpHandle to remove from members |
|
the contact responsible for the change, or 0 if no contact was responsible. |
|
the TpCallStateChangeReason of the change |
|
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. |
|
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
"can-request-receiving" property"can-request-receiving" gboolean : Read
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.
Default value: FALSE
Since 0.17.5
"channel" property"channel" TpBaseCallChannel* : Read
TpBaseChannel object that owns this call stream.
Since 0.17.5
"connection" property"connection" TpBaseConnection* : Read / Write / Construct Only
TpBaseConnection object that owns this call stream.
Since 0.17.5
"content" property"content" TpBaseCallContent* : Read / Write / Construct Only
TpBaseCallContent object that owns this call stream.
Since 0.17.6
"interfaces" property"interfaces" GStrv : Read
Additional interfaces implemented by this stream.
Since 0.17.5
"local-sending-state" property"local-sending-state" guint : Read / Write / Construct Only
The local TpSendingState.
Allowed values: <= 4
Default value: 0
Since 0.17.5
"object-path" property"object-path" gchar* : Read / Write / Construct Only
The D-Bus object path used for this object on the bus.
Default value: NULL
Since 0.17.5
"remote-member-identifiers" property "remote-member-identifiers" GHashTable_guint+gchararray_* : Read
GHashTable mapping contact TpHandle to their identifies.
Since 0.17.5
"remote-members" property "remote-members" GHashTable_guint+guint_* : Read
GHashTable mapping contact TpHandle to their TpSendingState.
Since 0.17.5