telepathy-glib API Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties | Signals |
#include <telepathy-glib/telepathy-glib.h> struct TpCallChannel; struct TpCallChannelClass; #define TP_CALL_CHANNEL_FEATURE_CORE struct TpCallStateReason; GPtrArray * tp_call_channel_get_contents (TpCallChannel *self
); TpCallState tp_call_channel_get_state (TpCallChannel *self
,TpCallFlags *flags
,GHashTable **details
,TpCallStateReason **reason
); gboolean tp_call_channel_has_hardware_streaming (TpCallChannel *self
); gboolean tp_call_channel_has_initial_audio (TpCallChannel *self
,const gchar **initial_audio_name
); gboolean tp_call_channel_has_initial_video (TpCallChannel *self
,const gchar **initial_video_name
); gboolean tp_call_channel_has_mutable_contents (TpCallChannel *self
); GHashTable * tp_call_channel_get_members (TpCallChannel *self
); gboolean tp_call_channel_has_dtmf (TpCallChannel *self
); gboolean tp_call_channel_has_hold (TpCallChannel *self
); void tp_call_channel_send_tones_async (TpCallChannel *self
,const gchar *tones
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
); gboolean tp_call_channel_send_tones_finish (TpCallChannel *self
,GAsyncResult *result
,GError **error
); void tp_call_channel_set_ringing_async (TpCallChannel *self
,GAsyncReadyCallback callback
,gpointer user_data
); gboolean tp_call_channel_set_ringing_finish (TpCallChannel *self
,GAsyncResult *result
,GError **error
); void tp_call_channel_set_queued_async (TpCallChannel *self
,GAsyncReadyCallback callback
,gpointer user_data
); gboolean tp_call_channel_set_queued_finish (TpCallChannel *self
,GAsyncResult *result
,GError **error
); void tp_call_channel_accept_async (TpCallChannel *self
,GAsyncReadyCallback callback
,gpointer user_data
); gboolean tp_call_channel_accept_finish (TpCallChannel *self
,GAsyncResult *result
,GError **error
); void tp_call_channel_hangup_async (TpCallChannel *self
,TpCallStateChangeReason reason
,const gchar *detailed_reason
,const gchar *message
,GAsyncReadyCallback callback
,gpointer user_data
); gboolean tp_call_channel_hangup_finish (TpCallChannel *self
,GAsyncResult *result
,GError **error
); void tp_call_channel_add_content_async (TpCallChannel *self
,const gchar *name
,TpMediaStreamType type
,TpMediaStreamDirection initial_direction
,GAsyncReadyCallback callback
,gpointer user_data
); TpCallContent * tp_call_channel_add_content_finish (TpCallChannel *self
,GAsyncResult *result
,GError **error
); void tp_call_channel_request_hold_async (TpCallChannel *self
,gboolean hold
,GAsyncReadyCallback callback
,gpointer user_data
); gboolean tp_call_channel_request_hold_finish (TpCallChannel *self
,GAsyncResult *result
,GError **error
);
GObject +----TpProxy +----TpChannel +----TpCallChannel
GBoxed +----TpCallStateReason
"contents" GPtrArray* : Read "flags" guint : Read "hardware-streaming" gboolean : Read "hold-state" guint : Read "hold-state-reason" guint : Read "initial-audio" gboolean : Read "initial-audio-name" gchar* : Read "initial-video" gboolean : Read "initial-video-name" gchar* : Read "mutable-contents" gboolean : Read "state" guint : Read "state-details" GHashTable* : Read "state-reason" TpCallStateReason* : Read
"content-added" :Run Last
"content-removed" :Run Last
"members-changed" :Run Last
"state-changed" :Run Last
struct TpCallChannel;
Data structure representing a TpCallChannel.
Since 0.17.5
#define TP_CALL_CHANNEL_FEATURE_CORE
Expands to a call to a function that returns a quark for the "core" feature on a TpCallChannel.
One can ask for a feature to be prepared using the tp_proxy_prepare_async()
function, and waiting for it to trigger the callback.
struct TpCallStateReason { TpHandle actor; TpCallStateChangeReason reason; gchar *dbus_reason; gchar *message; };
Data structure representing the reason for a call state change.
TpHandle |
the contact responsible for the change, or 0 if no contact was responsible |
TpCallStateChangeReason |
the reason for the change. If
TP_CALL_STATE_CHANGE_REASON_USER_REQUESTED then the actor member will
dictate whether it was the local user or a remote contact responsible |
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 | |
A developer readable debug message giving the reason for the state change. |
Since 0.17.5
GPtrArray * tp_call_channel_get_contents (TpCallChannel *self
);
|
a TpCallChannel |
Returns : |
the value of "contents". [transfer none][type GLib.PtrArray][element-type TelepathyGLib.CallContent] |
Since 0.17.5
TpCallState tp_call_channel_get_state (TpCallChannel *self
,TpCallFlags *flags
,GHashTable **details
,TpCallStateReason **reason
);
|
a TpCallChannel |
|
a place to set the value of "flags". [out][allow-none][transfer none] |
|
a place to set the value of "state-details". [out][allow-none][transfer none] |
|
a place to set the value of "state-reason". [out][allow-none][transfer none] |
Returns : |
the value of "state" |
Since 0.17.5
gboolean tp_call_channel_has_hardware_streaming
(TpCallChannel *self
);
|
a TpCallChannel |
Returns : |
the value of "hardware-streaming" |
Since 0.17.5
gboolean tp_call_channel_has_initial_audio (TpCallChannel *self
,const gchar **initial_audio_name
);
|
a TpCallChannel |
|
a place to set the value of "initial-audio-name". [out][allow-none][transfer none] |
Returns : |
the value of "initial-audio" |
Since 0.17.5
gboolean tp_call_channel_has_initial_video (TpCallChannel *self
,const gchar **initial_video_name
);
|
a TpCallChannel |
|
a place to set the value of "initial-video-name". [out][allow-none][transfer none] |
Returns : |
the value of "initial-video" |
Since 0.17.5
gboolean tp_call_channel_has_mutable_contents
(TpCallChannel *self
);
|
a TpCallChannel |
Returns : |
the value of "mutable-contents" |
Since 0.17.5
GHashTable * tp_call_channel_get_members (TpCallChannel *self
);
Get the members of this call.
The TpContact objects are guaranteed to have all of the features
previously passed to tp_simple_client_factory_add_contact_features()
prepared.
|
a TpCallChannel |
Returns : |
GHashTable mapping TpContact to its new TpCallMemberFlags. [transfer none][type GLib.HashTable][element-type TelepathyGLib.Contact uint] |
Since 0.17.5
gboolean tp_call_channel_has_dtmf (TpCallChannel *self
);
Whether or not self
can send DTMF tones using
tp_call_channel_send_tones_async()
. To be able to send DTMF tones, at least
one of self
's "contents" must implement
TP_IFACE_CALL_CONTENT_INTERFACE_DTMF
interface.
|
a TpCallChannel |
Returns : |
whether or not self can send DTMF tones. |
Since 0.17.5
gboolean tp_call_channel_has_hold (TpCallChannel *self
);
Whether or not self
has the TP_IFACE_CHANNEL_INTERFACE_HOLD
interfaces
|
a TpCallChannel |
Returns : |
whether or not self supports Hold |
Since 0.17.6
void tp_call_channel_send_tones_async (TpCallChannel *self
,const gchar *tones
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Send tones
on every of self
's contents which have the
TP_IFACE_CALL_CONTENT_INTERFACE_DTMF
interface.
For more details, see tp_call_content_send_tones_async()
.
|
a TpCallChannel |
|
a string representation of one or more DTMF events. |
|
optional GCancellable object, NULL to ignore |
|
a callback to call when the operation finishes |
|
data to pass to callback
|
Since 0.17.5
gboolean tp_call_channel_send_tones_finish (TpCallChannel *self
,GAsyncResult *result
,GError **error
);
Finishes tp_call_channel_send_tones_async()
.
|
a TpCallChannel |
|
a GAsyncResult |
|
a GError to fill |
Returns : |
TRUE on success, FALSE otherwise. |
Since 0.17.5
void tp_call_channel_set_ringing_async (TpCallChannel *self
,GAsyncReadyCallback callback
,gpointer user_data
);
Indicate that the local user has been alerted about the incoming call.
|
a TpCallChannel |
|
a callback to call when the operation finishes |
|
data to pass to callback
|
Since 0.17.5
gboolean tp_call_channel_set_ringing_finish (TpCallChannel *self
,GAsyncResult *result
,GError **error
);
Finishes tp_call_channel_set_ringing_async()
.
|
a TpCallChannel |
|
a GAsyncResult |
|
a GError to fill |
Since 0.17.5
void tp_call_channel_set_queued_async (TpCallChannel *self
,GAsyncReadyCallback callback
,gpointer user_data
);
Notifies the CM that the local user is already in a call, so this call has been put in a call-waiting style queue.
|
a TpCallChannel |
|
a callback to call when the operation finishes |
|
data to pass to callback
|
Since 0.17.5
gboolean tp_call_channel_set_queued_finish (TpCallChannel *self
,GAsyncResult *result
,GError **error
);
Finishes tp_call_channel_set_queued_async()
.
|
a TpCallChannel |
|
a GAsyncResult |
|
a GError to fill |
Since 0.17.5
void tp_call_channel_accept_async (TpCallChannel *self
,GAsyncReadyCallback callback
,gpointer user_data
);
For incoming calls with "state" set to
TP_CALL_STATE_INITIALISED
, accept the incoming call. This changes
"state" to TP_CALL_STATE_ACCEPTED
.
For outgoing calls with "state" set to
TP_CALL_STATE_PENDING_INITIATOR
, actually call the remote contact; this
changes "state" to
TP_CALL_STATE_INITIALISING
.
|
a TpCallChannel |
|
a callback to call when the operation finishes |
|
data to pass to callback
|
Since 0.17.5
gboolean tp_call_channel_accept_finish (TpCallChannel *self
,GAsyncResult *result
,GError **error
);
Finishes tp_call_channel_accept_async()
.
|
a TpCallChannel |
|
a GAsyncResult |
|
a GError to fill |
Since 0.17.5
void tp_call_channel_hangup_async (TpCallChannel *self
,TpCallStateChangeReason reason
,const gchar *detailed_reason
,const gchar *message
,GAsyncReadyCallback callback
,gpointer user_data
);
Request that the call is ended. All contents will be removed from self
so
that the "contents" property will be the empty list.
|
a TpCallChannel |
|
a TpCallStateChangeReason |
|
a more specific reason for the call hangup, if one is
available, or an empty or NULL string otherwise |
|
a human-readable message to be sent to the remote contact(s) |
|
a callback to call when the operation finishes |
|
data to pass to callback
|
Since 0.17.5
gboolean tp_call_channel_hangup_finish (TpCallChannel *self
,GAsyncResult *result
,GError **error
);
Finishes tp_call_channel_hangup_async()
.
|
a TpCallChannel |
|
a GAsyncResult |
|
a GError to fill |
Since 0.17.5
void tp_call_channel_add_content_async (TpCallChannel *self
,const gchar *name
,TpMediaStreamType type
,TpMediaStreamDirection initial_direction
,GAsyncReadyCallback callback
,gpointer user_data
);
Request that a new Content of type type
is added to self
. Callers should
check the value of the "mutable-contents" property before trying
to add another content as it might not be allowed.
|
a TpCallChannel |
|
the suggested name of the content to add |
|
the media stream type of the content to be added to the call, from TpMediaStreamType |
|
The initial direction of the content |
|
a callback to call when the operation finishes |
|
data to pass to callback
|
Since 0.17.5
TpCallContent * tp_call_channel_add_content_finish (TpCallChannel *self
,GAsyncResult *result
,GError **error
);
Finishes tp_call_channel_add_content_async()
.
The returned TpCallContent is NOT guaranteed to have
TP_CALL_CONTENT_FEATURE_CORE
prepared.
|
a TpCallChannel |
|
a GAsyncResult |
|
a GError to fill |
Returns : |
reference to the new TpCallContent. [transfer full] |
Since 0.17.5
void tp_call_channel_request_hold_async (TpCallChannel *self
,gboolean hold
,GAsyncReadyCallback callback
,gpointer user_data
);
Requests that the connection manager holds or unholds the call. Watch "hold-state" property to know when the channel goes on hold or is unheld. Unholding may fail if the streaming implementation can not obtain all the resources needed to restart the call.
|
a TpCallChannel |
|
Whether to request a hold or a unhold |
|
a callback to call when the operation finishes |
|
data to pass to callback
|
Since 0.17.6
gboolean tp_call_channel_request_hold_finish (TpCallChannel *self
,GAsyncResult *result
,GError **error
);
Finishes tp_call_channel_request_hold_async
|
a TpCallChannel |
|
a GAsyncResult |
|
a GError to fill |
Since 0.17.6
"contents"
property "contents" GPtrArray* : Read
GPtrArray of TpCallContent objects. The list of content objects that are part of this call.
It is NOT guaranteed that TP_CALL_CONTENT_FEATURE_CORE
is prepared on
those objects.
Since 0.17.5
"flags"
property "flags" guint : Read
A TpCallFlags specifying the flags of the call state.
Default value: 0
Since 0.17.5
"hardware-streaming"
property "hardware-streaming" gboolean : Read
Whether or not the streaming is done by dedicated hardware.
Default value: FALSE
Since 0.17.5
"hold-state"
property "hold-state" guint : Read
A TpLocalHoldState specifying if the Call is currently held
Default value: 0
Since 0.17.6
"hold-state-reason"
property "hold-state-reason" guint : Read
A TpLocalHoldStateReason specifying why the Call is currently held.
Default value: 0
Since 0.17.6
"initial-audio"
property "initial-audio" gboolean : Read
Whether or not the Call was started with audio.
Default value: FALSE
Since 0.17.5
"initial-audio-name"
property "initial-audio-name" gchar* : Read
If "initial-audio" is set to TRUE
, then this property will
is the name of the intial audio content, NULL
otherwise.
Default value: NULL
Since 0.17.5
"initial-video"
property "initial-video" gboolean : Read
Whether or not the Call was started with video.
Default value: FALSE
Since 0.17.5
"initial-video-name"
property "initial-video-name" gchar* : Read
If "initial-video" is set to TRUE
, then this property will
is the name of the intial video content, NULL
otherwise.
Default value: NULL
Since 0.17.5
"mutable-contents"
property "mutable-contents" gboolean : Read
Whether or not call contents can be added or removed.
Default value: FALSE
Since 0.17.5
"state"
property "state" guint : Read
A TpCallState specifying the state of the call.
Default value: 0
Since 0.17.5
"state-details"
property "state-details" GHashTable* : Read
Detailed infoermation about "state". It is a GHashTable mapping gchar*->GValue, it can be accessed using the tp_asv_* functions.
Since 0.17.5
"state-reason"
property"state-reason" TpCallStateReason* : Read
Reason why "state" last changed.
Since 0.17.5
"content-added"
signalvoid user_function (TpCallChannel *self,
GObject *content,
gpointer user_data) : Run Last
The ::content-added signal is emitted whenever a
TpCallContent is added to self
.
It is NOT guaranteed that TP_CALL_CONTENT_FEATURE_CORE
is prepared on
content
.
|
the TpCallChannel |
|
the newly added TpCallContent |
|
user data set when the signal handler was connected. |
Since 0.17.5
"content-removed"
signalvoid user_function (TpCallChannel *self,
GObject *content,
TpCallStateReason *reason,
gpointer user_data) : Run Last
The ::content-removed signal is emitted whenever a
TpCallContent is removed from self
.
It is NOT guaranteed that TP_CALL_CONTENT_FEATURE_CORE
is prepared on
content
.
|
the TpCallChannel |
|
the newly removed TpCallContent |
|
a TpCallStateReason |
|
user data set when the signal handler was connected. |
Since 0.17.5
"members-changed"
signalvoid user_function (TpCallChannel *self,
GHashTable *updates,
GPtrArray *removed,
TpCallStateReason *reason,
gpointer user_data) : Run Last
The ::members-changed signal is emitted whenever the call's members changes.
The TpContact objects are guaranteed to have all of the features
previously passed to tp_simple_client_factory_add_contact_features()
prepared.
|
the TpCallChannel |
|
GHashTable mapping TpContact to its new TpCallMemberFlags. [type GLib.HashTable][element-type TelepathyGLib.Contact uint] |
|
GPtrArray of TpContact removed from the call members. [type GLib.PtrArray][element-type TelepathyGLib.Contact] |
|
the TpCallStateReason for the change |
|
user data set when the signal handler was connected. |
Since 0.17.5
"state-changed"
signalvoid user_function (TpCallChannel *self,
guint state,
guint flags,
TpCallStateReason *reason,
GHashTable *details,
gpointer user_data) : Run Last
The ::state-changed signal is emitted whenever the call state changes.
|
the TpCallChannel |
|
the new TpCallState |
|
the new TpCallFlags |
|
the TpCallStateReason for the change |
|
additional details as a GHashTable readable using the tp_asv_* functions. [element-type utf8 GObject.Value] |
|
user data set when the signal handler was connected. |
Since 0.17.5