From 89c9566ede8cd7b587d0a383bef2a3973897c4c5 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Mon, 14 Oct 2019 13:47:48 +0200 Subject: simtech: implement +CLCC URC based call list management --- plugins/simtech/mm-broadband-modem-simtech.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'plugins/simtech/mm-broadband-modem-simtech.c') diff --git a/plugins/simtech/mm-broadband-modem-simtech.c b/plugins/simtech/mm-broadband-modem-simtech.c index 3d649a6e..6a8ae80d 100644 --- a/plugins/simtech/mm-broadband-modem-simtech.c +++ b/plugins/simtech/mm-broadband-modem-simtech.c @@ -33,22 +33,26 @@ #include "mm-iface-modem.h" #include "mm-iface-modem-3gpp.h" #include "mm-iface-modem-location.h" +#include "mm-iface-modem-voice.h" #include "mm-shared-simtech.h" #include "mm-broadband-modem-simtech.h" static void iface_modem_init (MMIfaceModem *iface); static void iface_modem_3gpp_init (MMIfaceModem3gpp *iface); static void iface_modem_location_init (MMIfaceModemLocation *iface); +static void iface_modem_voice_init (MMIfaceModemVoice *iface); static void shared_simtech_init (MMSharedSimtech *iface); static MMIfaceModem *iface_modem_parent; static MMIfaceModem3gpp *iface_modem_3gpp_parent; static MMIfaceModemLocation *iface_modem_location_parent; +static MMIfaceModemVoice *iface_modem_voice_parent; G_DEFINE_TYPE_EXTENDED (MMBroadbandModemSimtech, mm_broadband_modem_simtech, MM_TYPE_BROADBAND_MODEM, 0, G_IMPLEMENT_INTERFACE (MM_TYPE_IFACE_MODEM, iface_modem_init) G_IMPLEMENT_INTERFACE (MM_TYPE_IFACE_MODEM_3GPP, iface_modem_3gpp_init) G_IMPLEMENT_INTERFACE (MM_TYPE_IFACE_MODEM_LOCATION, iface_modem_location_init) + G_IMPLEMENT_INTERFACE (MM_TYPE_IFACE_MODEM_VOICE, iface_modem_voice_init) G_IMPLEMENT_INTERFACE (MM_TYPE_SHARED_SIMTECH, shared_simtech_init)) typedef enum { @@ -1289,10 +1293,34 @@ peek_parent_location_interface (MMSharedSimtech *self) return iface_modem_location_parent; } +static void +iface_modem_voice_init (MMIfaceModemVoice *iface) +{ + iface_modem_voice_parent = g_type_interface_peek_parent (iface); + + iface->check_support = mm_shared_simtech_voice_check_support; + iface->check_support_finish = mm_shared_simtech_voice_check_support_finish; + iface->enable_unsolicited_events = mm_shared_simtech_voice_enable_unsolicited_events; + iface->enable_unsolicited_events_finish = mm_shared_simtech_voice_enable_unsolicited_events_finish; + iface->disable_unsolicited_events = mm_shared_simtech_voice_disable_unsolicited_events; + iface->disable_unsolicited_events_finish = mm_shared_simtech_voice_disable_unsolicited_events_finish; + iface->setup_unsolicited_events = mm_shared_simtech_voice_setup_unsolicited_events; + iface->setup_unsolicited_events_finish = mm_shared_simtech_voice_setup_unsolicited_events_finish; + iface->cleanup_unsolicited_events = mm_shared_simtech_voice_cleanup_unsolicited_events; + iface->cleanup_unsolicited_events_finish = mm_shared_simtech_voice_cleanup_unsolicited_events_finish; +} + +static MMIfaceModemVoice * +peek_parent_voice_interface (MMSharedSimtech *self) +{ + return iface_modem_voice_parent; +} + static void shared_simtech_init (MMSharedSimtech *iface) { iface->peek_parent_location_interface = peek_parent_location_interface; + iface->peek_parent_voice_interface = peek_parent_voice_interface; } static void -- cgit v1.2.3-70-g09d2