Top |
TpBaseMediaCallStreamTpBaseMediaCallStream — base class for TpSvcCallStreamInterfaceMedia implementations |
GPtrArray_DBusGObjectPath_ * | endpoints | Read |
gboolean | has-server-info | Read |
gboolean | ice-restart-pending | Read |
GPtrArray_GValueArray_guint+gchararray+guint+GHashTable_gchararray+GValue___* | local-candidates | Read |
GValueArray_gchararray+gchararray_* | local-credentials | Read |
guint | receiving-state | Read |
GPtrArray_GHashTable_gchararray+GValue__* | relay-info | Read |
guint | sending-state | Read |
GPtrArray_GValueArray_gchararray+guint__* | stun-servers | Read |
guint | transport | Read / Write / Construct Only |
TpBaseMediaCallStream implements TpSvcDBusProperties, TpSvcCallStream and TpSvcCallStreamInterfaceMedia.
This base class makes it easier to write TpSvcCallStreamInterfaceMedia implementations by implementing some of its properties and methods.
Subclasses must still implement TpBaseCallStream's virtual methods plus TpBaseMediaCallStreamClass.add_local_candidates and TpBaseMediaCallStreamClass.finish_initial_candidates.
gboolean (*TpBaseMediaCallStreamFinishInitialCandidatesFunc) (TpBaseMediaCallStream *self
,GError **error
);
Signature of an implementation of TpBaseMediaCallStreamClass.finish_initial_candidates.
Since: 0.17.5
GPtrArray * (*TpBaseMediaCallStreamAddCandidatesFunc) (TpBaseMediaCallStream *self
,const GPtrArray *candidates
,GError **error
);
Signature of an implementation of TpBaseMediaCallStreamClass.add_local_candidates.
Implementation should validate the added candidates
and return a subset
(or all) of them that are accepted. Implementation should return a new
GPtrArray build in a way that g_ptr_array_unref()
is enough to free all its
memory. It is fine to just add element pointers from candidates
to the
returned GPtrArray without deep-copy them.
self |
||
candidates |
a GPtrArray of GValueArray containing candidates info |
|
error |
a GError to fill |
Since: 0.17.5
void (*TpBaseMediaCallStreamReportFailureFunc) (TpBaseMediaCallStream *self
,TpStreamFlowState old_state
,TpCallStateChangeReason reason
,const gchar *dbus_reason
,const gchar *message
);
Signature of an implementation of TpBaseMediaCallStreamClass.report_sending_failure and TpBaseMediaCallStreamClass.report_receiving_failure.
self |
||
old_state |
the previous TpStreamFlowState |
|
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. |
Since: 0.17.5
void (*TpBaseMediaCallStreamRequestReceivingFunc) (TpBaseMediaCallStream *self
,TpHandle contact
,gboolean receive
);
Signature of an implementation of TpBaseMediaCallStreamClass.request_receiving.
self |
||
contact |
the contact from who user wants to start or stop receiving |
|
receive |
wheter or not user would like to be receiving |
Since: 0.17.5
gboolean (*TpBaseMediaCallStreamSetSendingFunc) (TpBaseMediaCallStream *self
,gboolean sending
,GError **error
);
Signature of an implementation of TpBaseMediaCallStreamClass.set_sending.
Since: 0.17.5
void tp_base_media_call_stream_set_relay_info (TpBaseMediaCallStream *self
,GPtrArray *relays
);
Set the relays info. The GPtrArray should have a free_func defined such as
g_ptr_array_ref()
is enough to keep the data and g_ptr_array_unref()
is
enough to release it later.
Note that this replaces the previously set relays, it is not an addition.
Since: 0.17.5
void tp_base_media_call_stream_set_stun_servers (TpBaseMediaCallStream *self
,GPtrArray *stun_servers
);
Set the STUN servers. The GPtrArray should have a free_func defined such as
g_ptr_array_ref()
is enough to keep the data and g_ptr_array_unref()
is
enough to release it later.
Note that this replaces the previously set STUN servers, it is not an addition.
Since: 0.17.5
void tp_base_media_call_stream_add_endpoint (TpBaseMediaCallStream *self
,TpCallStreamEndpoint *endpoint
);
Add endpoint
to “endpoints” list, and emits
EndpointsChanged DBus signal.
Since: 0.17.5
void tp_base_media_call_stream_remove_endpoint (TpBaseMediaCallStream *self
,TpCallStreamEndpoint *endpoint
);
Remove endpoint
from “endpoints” list, and emits
EndpointsChanged DBus signal.
Since: 0.17.5
GList *
tp_base_media_call_stream_get_endpoints
(TpBaseMediaCallStream *self
);
Same as “endpoints” but as a GList of TpCallStreamEndpoint.
Since: 0.17.5
const gchar *
tp_base_media_call_stream_get_username
(TpBaseMediaCallStream *self
);
Since: 0.17.5
const gchar *
tp_base_media_call_stream_get_password
(TpBaseMediaCallStream *self
);
Since: 0.17.5
void
tp_base_media_call_stream_update_receiving_state
(TpBaseMediaCallStream *self
);
Update the receiving state.
Since: 0.17.5
TpStreamFlowState
tp_base_media_call_stream_get_receiving_state
(TpBaseMediaCallStream *self
);
Since: 0.17.5
void
tp_base_media_call_stream_update_sending_state
(TpBaseMediaCallStream *self
);
Update the sending state.
Since: 0.17.5
TpStreamFlowState
tp_base_media_call_stream_get_sending_state
(TpBaseMediaCallStream *self
);
Since: 0.17.5
void tp_base_media_call_stream_set_local_sending (TpBaseMediaCallStream *self
,gboolean sending
);
Set local sending state.
Since: 0.17.5
gboolean
tp_base_media_call_stream_get_local_sending
(TpBaseMediaCallStream *self
);
Gets the local sending state
Since: 0.17.7
GPtrArray *
tp_base_media_call_stream_get_local_candidates
(TpBaseMediaCallStream *self
);
Since: 0.17.5
struct TpBaseMediaCallStream;
A base class for media call stream implementations
Since: 0.17.5
struct TpBaseMediaCallStreamClass { TpBaseMediaCallStreamReportFailureFunc report_sending_failure; TpBaseMediaCallStreamReportFailureFunc report_receiving_failure; TpBaseMediaCallStreamAddCandidatesFunc add_local_candidates; TpBaseMediaCallStreamFinishInitialCandidatesFunc finish_initial_candidates; TpBaseMediaCallStreamRequestReceivingFunc request_receiving; TpBaseMediaCallStreamSetSendingFunc set_sending; };
The class structure for TpBaseMediaCallStream
TpBaseMediaCallStreamReportFailureFunc |
optional; called to indicate a failure in the outgoing portion of the stream |
|
TpBaseMediaCallStreamReportFailureFunc |
optional; called to indicate a failure in the incoming portion of the stream |
|
TpBaseMediaCallStreamAddCandidatesFunc |
mandatory; called when new candidates are added |
|
TpBaseMediaCallStreamFinishInitialCandidatesFunc |
optional; called when the initial batch of candidates has been added, and should now be processed/sent to the remote side |
|
TpBaseMediaCallStreamRequestReceivingFunc |
optional (see “can-request-receiving”); virtual method called when user requested receiving from the given remote contact. This virtual method should be implemented instead of TpBaseCallStreamClass.request_receiving |
|
TpBaseMediaCallStreamSetSendingFunc |
mandatory; virtual method called when user requested to start/stop sending to remote contacts. This virtual method should be implemented instead of TpBaseCallStreamClass.set_sending |
Since: 0.17.5
“endpoints”
property “endpoints” GPtrArray_DBusGObjectPath_ *
GPtrArray{object-path string} The endpoints of this content.
Owner: TpBaseMediaCallStream
Flags: Read
Since: 0.17.5
“has-server-info”
property “has-server-info” gboolean
TRUE
if “relay-info” and
“stun-servers” have been set.
Owner: TpBaseMediaCallStream
Flags: Read
Default value: FALSE
Since: 0.17.5
“ice-restart-pending”
property “ice-restart-pending” gboolean
TRUE
when ICERestartRequested signal is emitted, and FALSE
when
SetCredentials is called. Useful for debugging.
Owner: TpBaseMediaCallStream
Flags: Read
Default value: FALSE
Since: 0.17.5
“local-candidates”
property “local-candidates” GPtrArray_GValueArray_guint+gchararray+guint+GHashTable_gchararray+GValue___*
GPtrArray{candidate GValueArray} List of local candidates.
Owner: TpBaseMediaCallStream
Flags: Read
Since: 0.17.5
“local-credentials”
property “local-credentials” GValueArray_gchararray+gchararray_*
GValueArray{username string, password string} ufrag and pwd as defined by ICE.
Owner: TpBaseMediaCallStream
Flags: Read
Since: 0.17.5
“receiving-state”
property “receiving-state” guint
The receiving TpStreamFlowState.
Owner: TpBaseMediaCallStream
Flags: Read
Default value: 0
Since: 0.17.5
“relay-info”
property “relay-info” GPtrArray_GHashTable_gchararray+GValue__*
GPtrArray{relay-info asv} List of relay information.
Owner: TpBaseMediaCallStream
Flags: Read
Since: 0.17.5
“sending-state”
property “sending-state” guint
The sending TpStreamFlowState.
Owner: TpBaseMediaCallStream
Flags: Read
Default value: 0
Since: 0.17.5
“stun-servers”
property “stun-servers” GPtrArray_GValueArray_gchararray+guint__*
GPtrArray{stun-server GValueArray} List of STUN servers.
Owner: TpBaseMediaCallStream
Flags: Read
Since: 0.17.5
“transport”
property “transport” guint
The TpStreamTransportType of this stream.
Owner: TpBaseMediaCallStream
Flags: Read / Write / Construct Only
Default value: 0
Since: 0.17.5