diff options
author | Carlo Lobrano <c.lobrano@gmail.com> | 2016-08-08 15:47:18 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2016-08-10 09:39:27 +0200 |
commit | 60f4f9e57df90cf094fffb6896ffce8dba15d244 (patch) | |
tree | a611d459cc957f1c5bf3e16268d2d3b8ba082f9f /src/mm-iface-modem.h | |
parent | 3047522b2e494776d9aced64180e54c46e861de1 (diff) |
modem: support SIM hot swap
BaseModem
added reprobe property.
MMDevice
added logic to recreate the modem if it is set invalid and "to reprobe"
MMBroadbandModem
* added initialization step for SIM hot swap:
1. keep dedicated ports open to listen to modem's unsolicited
2. dedicated error management in case of initialization failure due to SIM missing
* added function to be called in order to act upon SIM insertion/removal:
1. close dedicated ports
2. set the modem to be reprobed
3. disable modem
* added SIM HOT SWAP boolean property
MMIfaceModem
* added initialization step for SIM hot swap, if supported by the plugin
* dedicated error management in case of initialization failure due to SIM missing
Diffstat (limited to 'src/mm-iface-modem.h')
-rw-r--r-- | src/mm-iface-modem.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/mm-iface-modem.h b/src/mm-iface-modem.h index 74ea9f92..517c651d 100644 --- a/src/mm-iface-modem.h +++ b/src/mm-iface-modem.h @@ -32,10 +32,11 @@ #define MM_IS_IFACE_MODEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MM_TYPE_IFACE_MODEM)) #define MM_IFACE_MODEM_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), MM_TYPE_IFACE_MODEM, MMIfaceModem)) -#define MM_IFACE_MODEM_DBUS_SKELETON "iface-modem-dbus-skeleton" -#define MM_IFACE_MODEM_STATE "iface-modem-state" -#define MM_IFACE_MODEM_SIM "iface-modem-sim" -#define MM_IFACE_MODEM_BEARER_LIST "iface-modem-bearer-list" +#define MM_IFACE_MODEM_DBUS_SKELETON "iface-modem-dbus-skeleton" +#define MM_IFACE_MODEM_STATE "iface-modem-state" +#define MM_IFACE_MODEM_SIM "iface-modem-sim" +#define MM_IFACE_MODEM_BEARER_LIST "iface-modem-bearer-list" +#define MM_IFACE_MODEM_SIM_HOT_SWAP_SUPPORTED "iface-modem-sim-hot-swap-supported" typedef struct _MMIfaceModem MMIfaceModem; @@ -327,6 +328,14 @@ struct _MMIfaceModem { MMBaseBearer * (*create_bearer_finish) (MMIfaceModem *self, GAsyncResult *res, GError **error); + /* Setup SIM hot swap */ + void (*setup_sim_hot_swap) (MMIfaceModem *self, + GAsyncReadyCallback callback, + gpointer user_data); + + gboolean (*setup_sim_hot_swap_finish) (MMIfaceModem *self, + GAsyncResult *res, + GError **error); }; GType mm_iface_modem_get_type (void); |