mirror of git://git.sysmocom.de/ofono
Add vendor flag capability to voicecalls
This commit is contained in:
parent
e5577046f0
commit
4064f4ba73
|
@ -983,9 +983,10 @@ static void at_voicecall_initialized(gboolean ok, GAtResult *result,
|
|||
ofono_voicecall_register(vc);
|
||||
}
|
||||
|
||||
static int at_voicecall_probe(struct ofono_voicecall *vc)
|
||||
static int at_voicecall_probe(struct ofono_voicecall *vc, int vendor,
|
||||
void *data)
|
||||
{
|
||||
GAtChat *chat = ofono_voicecall_get_data(vc);
|
||||
GAtChat *chat = data;
|
||||
struct voicecall_data *vd;
|
||||
|
||||
vd = g_new0(struct voicecall_data, 1);
|
||||
|
|
|
@ -152,7 +152,7 @@ static int isi_modem_populate(struct ofono_modem *modem)
|
|||
ofono_devinfo_create(isi->modem, 0, "isi", isi->idx);
|
||||
ofono_phonebook_create(isi->modem, 0, "isi", isi->idx);
|
||||
ofono_netreg_create(isi->modem, 0, "isi", isi->idx);
|
||||
ofono_voicecall_create(isi->modem, "isi", isi->idx);
|
||||
ofono_voicecall_create(isi->modem, 0, "isi", isi->idx);
|
||||
ofono_sms_create(isi->modem, 0, "isi", isi->idx);
|
||||
ofono_sim_create(isi->modem, 0, "isi", isi->idx);
|
||||
ofono_ssn_create(isi->modem, 0, "isi", isi->idx);
|
||||
|
|
|
@ -127,9 +127,10 @@ static void isi_send_tones(struct ofono_voicecall *vc, const char *tones,
|
|||
{
|
||||
}
|
||||
|
||||
static int isi_voicecall_probe(struct ofono_voicecall *call)
|
||||
static int isi_voicecall_probe(struct ofono_voicecall *call, int vendor,
|
||||
void *user)
|
||||
{
|
||||
GIsiModem *idx = ofono_voicecall_get_data(call);
|
||||
GIsiModem *idx = user;
|
||||
struct voicecall_data *data = g_try_new0(struct voicecall_data, 1);
|
||||
|
||||
if (!data)
|
||||
|
|
|
@ -46,7 +46,7 @@ typedef void (*ofono_call_list_cb_t)(const struct ofono_error *error,
|
|||
*/
|
||||
struct ofono_voicecall_driver {
|
||||
const char *name;
|
||||
int (*probe)(struct ofono_voicecall *vc);
|
||||
int (*probe)(struct ofono_voicecall *vc, int vendor, void *data);
|
||||
int (*remove)(struct ofono_voicecall *vc);
|
||||
void (*dial)(struct ofono_voicecall *vc,
|
||||
const struct ofono_phone_number *number,
|
||||
|
@ -93,6 +93,7 @@ int ofono_voicecall_driver_register(const struct ofono_voicecall_driver *d);
|
|||
void ofono_voicecall_driver_unregister(const struct ofono_voicecall_driver *d);
|
||||
|
||||
struct ofono_voicecall *ofono_voicecall_create(struct ofono_modem *modem,
|
||||
int vendor,
|
||||
const char *driver, void *data);
|
||||
|
||||
void ofono_voicecall_register(struct ofono_voicecall *vc);
|
||||
|
|
|
@ -515,7 +515,7 @@ static int generic_at_populate(struct ofono_modem *modem)
|
|||
ofono_call_forwarding_create(modem, 0, "generic_at", chat);
|
||||
ofono_call_settings_create(modem, 0, "generic_at", chat);
|
||||
ofono_netreg_create(modem, 0, "generic_at", chat);
|
||||
ofono_voicecall_create(modem, "generic_at", chat);
|
||||
ofono_voicecall_create(modem, 0, "generic_at", chat);
|
||||
ofono_call_meter_create(modem, 0, "generic_at", chat);
|
||||
ofono_call_barring_create(modem, 0, "generic_at", chat);
|
||||
ofono_ssn_create(modem, 0, "generic_at", chat);
|
||||
|
|
|
@ -1813,8 +1813,9 @@ static void voicecall_remove(struct ofono_atom *atom)
|
|||
}
|
||||
|
||||
struct ofono_voicecall *ofono_voicecall_create(struct ofono_modem *modem,
|
||||
const char *driver,
|
||||
void *data)
|
||||
int vendor,
|
||||
const char *driver,
|
||||
void *data)
|
||||
{
|
||||
struct ofono_voicecall *vc;
|
||||
GSList *l;
|
||||
|
@ -1827,7 +1828,6 @@ struct ofono_voicecall *ofono_voicecall_create(struct ofono_modem *modem,
|
|||
if (vc == NULL)
|
||||
return NULL;
|
||||
|
||||
vc->driver_data = data;
|
||||
vc->atom = __ofono_modem_add_atom(modem, OFONO_ATOM_TYPE_VOICECALL,
|
||||
voicecall_remove, vc);
|
||||
|
||||
|
@ -1837,7 +1837,7 @@ struct ofono_voicecall *ofono_voicecall_create(struct ofono_modem *modem,
|
|||
if (g_strcmp0(drv->name, driver))
|
||||
continue;
|
||||
|
||||
if (drv->probe(vc) < 0)
|
||||
if (drv->probe(vc, vendor, data) < 0)
|
||||
continue;
|
||||
|
||||
vc->driver = drv;
|
||||
|
|
Loading…
Reference in New Issue