telit: add modem_power_down to telit plugin
This commit is contained in:
committed by
Aleksander Morgado
parent
4c036eb8f9
commit
14e4771056
@@ -39,6 +39,30 @@ G_DEFINE_TYPE_EXTENDED (MMBroadbandModemTelit, mm_broadband_modem_telit, MM_TYPE
|
||||
G_IMPLEMENT_INTERFACE (MM_TYPE_IFACE_MODEM, iface_modem_init)
|
||||
G_IMPLEMENT_INTERFACE (MM_TYPE_IFACE_MODEM_3GPP, iface_modem_3gpp_init));
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Modem power down (Modem interface) */
|
||||
|
||||
static gboolean
|
||||
modem_power_down_finish (MMIfaceModem *self,
|
||||
GAsyncResult *res,
|
||||
GError **error)
|
||||
{
|
||||
return !!mm_base_modem_at_command_finish (MM_BASE_MODEM (self), res, error);
|
||||
}
|
||||
|
||||
static void
|
||||
modem_power_down (MMIfaceModem *self,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
{
|
||||
mm_base_modem_at_command (MM_BASE_MODEM (self),
|
||||
"+CFUN=4",
|
||||
20,
|
||||
FALSE,
|
||||
callback,
|
||||
user_data);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Load access technologies (Modem interface) */
|
||||
|
||||
@@ -289,6 +313,8 @@ mm_broadband_modem_telit_init (MMBroadbandModemTelit *self)
|
||||
static void
|
||||
iface_modem_init (MMIfaceModem *iface)
|
||||
{
|
||||
iface->modem_power_down = modem_power_down;
|
||||
iface->modem_power_down_finish = modem_power_down_finish;
|
||||
iface->load_access_technologies = load_access_technologies;
|
||||
iface->load_access_technologies_finish = load_access_technologies_finish;
|
||||
iface->setup_flow_control = setup_flow_control;
|
||||
|
||||
Reference in New Issue
Block a user