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

call: Add API to query whether this call can do DTMF

This allows enable or disable UI elements.
This commit is contained in:
Evangelos Ribeiro Tzaras 2021-11-12 09:51:04 +01:00
parent bf72169f68
commit c5636ab71c
2 changed files with 14 additions and 0 deletions

View file

@ -358,6 +358,19 @@ tone_key_is_valid (gchar key)
|| key == '#';
}
/**
* calls_call_can_dtmf:
* @self: a #CallsCall
*
* Returns: %TRUE if this call supports DTMF, %FALSE otherwise
*/
gboolean
calls_call_can_dtmf (CallsCall *self)
{
g_return_val_if_fail (CALLS_IS_CALL (self), FALSE);
return CALLS_CALL_GET_CLASS (self)->tone_start != calls_call_real_tone_start;
}
/**
* calls_call_tone_start:

View file

@ -70,6 +70,7 @@ gboolean calls_call_get_inbound (CallsCall *self);
const char *calls_call_get_protocol (CallsCall *self);
void calls_call_answer (CallsCall *self);
void calls_call_hang_up (CallsCall *self);
gboolean calls_call_can_dtmf (CallsCall *self);
void calls_call_tone_start (CallsCall *self,
gchar key);
gboolean calls_call_tone_stoppable (CallsCall *self);