aboutsummaryrefslogtreecommitdiff
path: root/src/mm-base-call.h
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2018-08-10 13:52:06 +0200
committerDan Williams <dcbw@redhat.com>2018-10-16 17:09:21 +0000
commit329caff84f1a3918b17f04b457afbc4a43c771c7 (patch)
tree2f0f69b41b091f65a9d9627cd2476218e845a524 /src/mm-base-call.h
parent17c511ec6955d07af431bf2012e274c9b3ce3d48 (diff)
base-call: implement generic audio channel setup/cleanup handlers
Modems that require specific commands to setup or cleanup the audio channel as soon as a call is ongoing can subclass these two new methods. The setup() method is considered part of the call start/accept process, and so if it fails, the whole operation will fail. The failures in the cleanup() method will be reported in the log, but otherwise ignored, as this operation may be executed without any user intervention (e.g. if the remote party hangs up).
Diffstat (limited to 'src/mm-base-call.h')
-rw-r--r--src/mm-base-call.h21
1 files changed, 16 insertions, 5 deletions
diff --git a/src/mm-base-call.h b/src/mm-base-call.h
index f68e9f6b..edb4aae5 100644
--- a/src/mm-base-call.h
+++ b/src/mm-base-call.h
@@ -88,6 +88,22 @@ struct _MMBaseCallClass {
GError **error);
gboolean (* cleanup_unsolicited_events) (MMBaseCall *self,
GError **error);
+
+ /* Setup/cleanup audio channel */
+ void (* setup_audio_channel) (MMBaseCall *self,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+ gboolean (* setup_audio_channel_finish) (MMBaseCall *self,
+ GAsyncResult *res,
+ MMPort **audio_port,
+ MMCallAudioFormat **audio_format,
+ GError **error);
+ void (* cleanup_audio_channel) (MMBaseCall *self,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+ gboolean (* cleanup_audio_channel_finish) (MMBaseCall *self,
+ GAsyncResult *res,
+ GError **error);
};
GType mm_base_call_get_type (void);
@@ -105,11 +121,6 @@ void mm_base_call_change_state (MMBaseCall *self,
MMCallState new_state,
MMCallStateReason reason);
-void mm_base_call_set_audio_port (MMBaseCall *self,
- const gchar *port);
-void mm_base_call_set_audio_format (MMBaseCall *self,
- MMCallAudioFormat *audio_format);
-
void mm_base_call_received_dtmf (MMBaseCall *self,
const gchar *dtmf);