Top | ![]() |
![]() |
![]() |
![]() |
void | calls_call_state_to_string () |
gboolean | calls_call_state_parse_nick () |
const gchar * | calls_call_get_number () |
const gchar * | calls_call_get_name () |
CallsCallState | calls_call_get_state () |
gboolean | calls_call_get_inbound () |
void | calls_call_answer () |
void | calls_call_hang_up () |
void | calls_call_tone_start () |
gboolean | calls_call_tone_stoppable () |
void | calls_call_tone_stop () |
This is the interface to a call. It has a number, name and a state. Only the state changes after creation. If the state is CALL_CALL_STATE_INCOMING, the call can be answered with answer. The call can also be hung up at any time with hang_up.
DTMF tones can be played the call using tone_start and tone_stop. Valid characters for the key are 0-9, '*', '#', 'A', 'B', 'C' and 'D'.
void calls_call_state_to_string (GString *string
,CallsCallState state
);
gboolean calls_call_state_parse_nick (CallsCallState *state
,const gchar *nick
);
const gchar *
calls_call_get_number (CallsCall *self
);
Get the number the call is connected to. It is possible that this could return NULL if the number is not known, for example if an incoming PTSN call has no caller ID information.
const gchar *
calls_call_get_name (CallsCall *self
);
Get the name of the party the call is connected to, if the network provides it.
CallsCallState
calls_call_get_state (CallsCall *self
);
Get the current state of the call.
gboolean
calls_call_get_inbound (CallsCall *self
);
Get the direction of the call.
void calls_call_tone_start (CallsCall *self
,gchar key
);
Start playing a DTMF tone for the specified key. Implementations
will stop playing the tone either after an implementation-specific
timeout, or after calls_call_tone_stop is called with the same
value for key
.
gboolean
calls_call_tone_stoppable (CallsCall *self
);
Determine whether tones for this call can be stopped by calling calls_call_tone_stop. Some implementations will only allow fixed-length tones to be played. In that case, this function should return FALSE.
void calls_call_tone_stop (CallsCall *self
,gchar key
);
Stop playing a DTMF tone previously started with calls_call_tone_start.
struct CallsCallInterface { GTypeInterface parent_iface; void (*answer) (CallsCall *self); void (*hang_up) (CallsCall *self); void (*tone_start) (CallsCall *self, gchar key); void (*tone_stop) (CallsCall *self, gchar key); };
“inbound”
property “inbound” gboolean
Whether the call is inbound.
Flags: Read
Default value: FALSE
“name”
property “name” gchar *
The name of the party the call is connected to, if the network provides it.
Flags: Read
Default value: NULL
“number”
property “number” gchar *
The number the call is connected to if known.
Flags: Read
Default value: NULL
“state”
property“state” CallsCallState
The current state of the call.
Flags: Read
Default value: CALLS_CALL_STATE_ACTIVE
“state-changed”
signalvoid user_function (CallsCall *self, CallsCallState new_state, CallsCallState old_state, gpointer user_data)
This signal is emitted when the state of the call changes, for example when it's answered or when the call is disconnected.
self |
The CallsCall instance. |
|
new_state |
The new state of the call. |
|
old_state |
The old state of the call. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last