1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-06-28 14:49:30 +00:00

calls-call: Add calls_call_get_inbound function

This commit is contained in:
Bob Ham 2019-07-22 11:52:42 +01:00
parent b1a743b757
commit f12b411813
2 changed files with 24 additions and 0 deletions

View file

@ -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)
{

View file

@ -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,