mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2025-01-06 03:25:31 +00:00
calls-call: Add calls_call_get_inbound function
This commit is contained in:
parent
b1a743b757
commit
f12b411813
2 changed files with 24 additions and 0 deletions
|
@ -212,6 +212,29 @@ DEFINE_CALL_FUNC_VOID(answer);
|
|||
DEFINE_CALL_FUNC_VOID(hang_up);
|
||||
|
||||
|
||||
/**
|
||||
* calls_call_get_inbound:
|
||||
* @self: a #CallsCall
|
||||
*
|
||||
* Get the direction of the call.
|
||||
*
|
||||
* Returns: TRUE if inbound, FALSE if outbound.
|
||||
*/
|
||||
gboolean
|
||||
calls_call_get_inbound (CallsCall *self)
|
||||
{
|
||||
gboolean inbound;
|
||||
|
||||
g_return_val_if_fail (CALLS_IS_CALL (self), FALSE);
|
||||
|
||||
g_object_get (self,
|
||||
"inbound", &inbound,
|
||||
NULL);
|
||||
|
||||
return inbound;
|
||||
}
|
||||
|
||||
|
||||
static inline gboolean
|
||||
tone_key_is_valid (gchar key)
|
||||
{
|
||||
|
|
|
@ -68,6 +68,7 @@ struct _CallsCallInterface
|
|||
const gchar * calls_call_get_number (CallsCall *self);
|
||||
const gchar * calls_call_get_name (CallsCall *self);
|
||||
CallsCallState calls_call_get_state (CallsCall *self);
|
||||
gboolean calls_call_get_inbound (CallsCall *self);
|
||||
void calls_call_answer (CallsCall *self);
|
||||
void calls_call_hang_up (CallsCall *self);
|
||||
void calls_call_tone_start (CallsCall *self,
|
||||
|
|
Loading…
Reference in a new issue