730
730
/*****************************************************************************/
733
do_enable_power_up_done (MMGenericGsm *gsm,
736
MMCallbackInfo *info)
739
MMAtSerialPort *primary;
741
/* Enable unsolicited result codes */
742
primary = mm_generic_gsm_get_at_port (gsm, MM_PORT_TYPE_PRIMARY);
745
mm_at_serial_port_queue_command (primary, "^CURC=1", 5, NULL, NULL);
748
/* Chain up to parent */
749
MM_GENERIC_GSM_CLASS (mm_modem_huawei_gsm_parent_class)->do_enable_power_up_done (gsm, NULL, error, info);
752
/*****************************************************************************/
755
disable_unsolicited_done (MMAtSerialPort *port,
761
MMCallbackInfo *info = (MMCallbackInfo *) user_data;
763
/* If the modem has already been removed, return without
764
* scheduling callback */
765
if (mm_callback_info_check_modem_removed (info))
768
/* Ignore all errors */
769
mm_callback_info_schedule (info);
773
invoke_call_parent_disable_fn (MMCallbackInfo *info)
775
/* Note: we won't call the parent disable if info->modem is no longer
776
* valid. The invoke is called always once the info gets scheduled, which
777
* may happen during removed modem detection. */
779
MMModem *parent_modem_iface;
781
parent_modem_iface = g_type_interface_peek_parent (MM_MODEM_GET_INTERFACE (info->modem));
782
parent_modem_iface->disable (info->modem, (MMModemFn)info->callback, info->user_data);
787
disable (MMModem *modem,
791
MMAtSerialPort *primary;
792
MMCallbackInfo *info;
794
info = mm_callback_info_new_full (modem,
795
invoke_call_parent_disable_fn,
799
primary = mm_generic_gsm_get_at_port (MM_GENERIC_GSM (modem), MM_PORT_TYPE_PRIMARY);
802
/* Turn off unsolicited responses */
803
mm_at_serial_port_queue_command (primary, "^CURC=0", 5, disable_unsolicited_done, info);
806
/*****************************************************************************/
809
733
grab_port (MMModem *modem,
810
734
const char *subsys,
960
883
gsm_class->set_allowed_mode = set_allowed_mode;
961
884
gsm_class->get_allowed_mode = get_allowed_mode;
962
885
gsm_class->get_access_technology = get_access_technology;
963
gsm_class->do_enable_power_up_done = do_enable_power_up_done;