Hi Jeevaka,

2010/8/31  <jeevaka.badrap...@elektrobit.com>:
> What I meant was to provide a driver API which will take both the dcs
> and string as parameter. something like the following:
>
> enum ofono_dcs{
>        OFONO_DCS_UNKNOWN,
>        OFONO_DCS_GSM_7BIT,
>        OFONO_DCS_8BIT,
>        OFONO_DCS_UCS2,
> };
>
> void (*request)(struct ofono_ussd *ussd, int dcs, const char *str,
>                        ofono_ussd_cb_t, void *data);
>
> If the dcs is set to OFONO_DCS_UNKNOWN, then the conversion from UTF-8
> to GSM 7 bit default alphabet needs to be done. Anything other than
> OFONO_DCS_UNKNOWN, modem driver doesn't need to do any conversion and
> sends the dcs and string as it is to the network.

Would it always make sense to do the conversion of the USSD string in
the core, not in the modem driver? So the API would be something like

 void (*request)(struct ofono_ussd *ussd, int dcs, void const *data,
size_t len,
                        ofono_ussd_cb_t, void *data);


-- 
Pekka.Pessi mail at nokia.com
_______________________________________________
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono

Reply via email to