call: Allow for the inability to stop DTMF tones

Some implementations, like oFono, only allow fixed-length tones to be
sent to the network, not started and stopped at will.  To account for
this, we make the tone_start member function nullable and add a new
function, calls_call_tone_stoppable, to determine whether there is a
stop function.
This commit is contained in:
Bob Ham
2018-05-31 10:20:17 +00:00
parent 40afb187c2
commit dd815fa86f
2 changed files with 67 additions and 27 deletions

View File

@@ -65,15 +65,16 @@ 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);
void calls_call_answer (CallsCall *self);
void calls_call_hang_up (CallsCall *self);
void calls_call_tone_start (CallsCall *self,
gchar key);
void calls_call_tone_stop (CallsCall *self,
gchar key);
const gchar * calls_call_get_number (CallsCall *self);
const gchar * calls_call_get_name (CallsCall *self);
CallsCallState calls_call_get_state (CallsCall *self);
void calls_call_answer (CallsCall *self);
void calls_call_hang_up (CallsCall *self);
void calls_call_tone_start (CallsCall *self,
gchar key);
gboolean calls_call_tone_stoppable (CallsCall *self);
void calls_call_tone_stop (CallsCall *self,
gchar key);
G_END_DECLS