mirror of git://git.sysmocom.de/ofono
telit: add post_online to SAP Client
This commit is contained in:
parent
fde698c2a5
commit
fa56fe78c5
|
@ -51,6 +51,7 @@ struct bluetooth_sap_driver {
|
|||
void (*post_sim) (struct ofono_modem *modem);
|
||||
void (*set_online) (struct ofono_modem *modem, ofono_bool_t online,
|
||||
ofono_modem_online_cb_t cb, void *user_data);
|
||||
void (*post_online) (struct ofono_modem *modem);
|
||||
int (*disable) (struct ofono_modem *modem);
|
||||
};
|
||||
|
||||
|
|
|
@ -588,12 +588,43 @@ static void telit_set_online(struct ofono_modem *modem, ofono_bool_t online,
|
|||
cbd, g_free);
|
||||
}
|
||||
|
||||
static void telit_post_online(struct ofono_modem *modem)
|
||||
{
|
||||
struct telit_data *data = ofono_modem_get_data(modem);
|
||||
struct ofono_message_waiting *mw;
|
||||
struct ofono_gprs *gprs;
|
||||
struct ofono_gprs_context *gc;
|
||||
|
||||
if(data->sap_modem)
|
||||
modem = data->sap_modem;
|
||||
|
||||
DBG("%p", modem);
|
||||
|
||||
ofono_netreg_create(modem, OFONO_VENDOR_TELIT, "atmodem", data->chat);
|
||||
ofono_ussd_create(modem, 0, "atmodem", data->chat);
|
||||
ofono_call_forwarding_create(modem, 0, "atmodem", data->chat);
|
||||
ofono_call_settings_create(modem, 0, "atmodem", data->chat);
|
||||
ofono_call_meter_create(modem, 0, "atmodem", data->chat);
|
||||
ofono_call_barring_create(modem, 0, "atmodem", data->chat);
|
||||
|
||||
gprs = ofono_gprs_create(modem, 0, "atmodem", data->chat);
|
||||
gc = ofono_gprs_context_create(modem, 0, "atmodem", data->chat);
|
||||
|
||||
if (gprs && gc)
|
||||
ofono_gprs_add_context(gprs, gc);
|
||||
|
||||
mw = ofono_message_waiting_create(modem);
|
||||
if (mw)
|
||||
ofono_message_waiting_register(mw);
|
||||
}
|
||||
|
||||
static struct bluetooth_sap_driver sap_driver = {
|
||||
.name = "telit",
|
||||
.enable = telit_sap_enable,
|
||||
.pre_sim = telit_pre_sim,
|
||||
.post_sim = telit_post_sim,
|
||||
.set_online = telit_set_online,
|
||||
.post_online = telit_post_online,
|
||||
.disable = telit_sap_disable,
|
||||
};
|
||||
|
||||
|
@ -630,33 +661,6 @@ static void telit_remove(struct ofono_modem *modem)
|
|||
g_free(data);
|
||||
}
|
||||
|
||||
static void telit_post_online(struct ofono_modem *modem)
|
||||
{
|
||||
struct telit_data *data = ofono_modem_get_data(modem);
|
||||
struct ofono_message_waiting *mw;
|
||||
struct ofono_gprs *gprs;
|
||||
struct ofono_gprs_context *gc;
|
||||
|
||||
DBG("%p", modem);
|
||||
|
||||
ofono_netreg_create(modem, OFONO_VENDOR_TELIT, "atmodem", data->chat);
|
||||
ofono_ussd_create(modem, 0, "atmodem", data->chat);
|
||||
ofono_call_forwarding_create(modem, 0, "atmodem", data->chat);
|
||||
ofono_call_settings_create(modem, 0, "atmodem", data->chat);
|
||||
ofono_call_meter_create(modem, 0, "atmodem", data->chat);
|
||||
ofono_call_barring_create(modem, 0, "atmodem", data->chat);
|
||||
|
||||
gprs = ofono_gprs_create(modem, 0, "atmodem", data->chat);
|
||||
gc = ofono_gprs_context_create(modem, 0, "atmodem", data->chat);
|
||||
|
||||
if (gprs && gc)
|
||||
ofono_gprs_add_context(gprs, gc);
|
||||
|
||||
mw = ofono_message_waiting_create(modem);
|
||||
if (mw)
|
||||
ofono_message_waiting_register(mw);
|
||||
}
|
||||
|
||||
static struct ofono_modem_driver telit_driver = {
|
||||
.name = "telit",
|
||||
.probe = telit_probe,
|
||||
|
|
Loading…
Reference in New Issue