Adding new MBIM extension CID?
aleksander at aleksander.es
Wed Apr 9 02:54:28 PDT 2014
On Wed, Apr 9, 2014 at 11:46 AM, Aleksander Morgado
<aleksander at aleksander.es> wrote:
> guint mbim_register_custom_service (
> const MbimUuid *uuid,
> const gchar *printable);
> gboolean mbim_unregister_custom_service(
> guint service);
> So, you get the service ID directly as a guint, and you provide both the
> uuid and the 'printable' name. The printable name should be used when
> calling mbim_uuid_get_printable() or mbim_uuid_from_printable().
Wait, this is wrong.
The printable string is not to be used within
mbim_uuid_get_printable() or mbim_uuid_from_printable(). The printable
string would be equivalent to the 'nick' of the MbimService enum; so
to be used in mbim_service_get_string(). This previous method is
auto-generated from the enum declarations (see mbim-enum-types.h in
src/libmbim-glib/generated once compiled).
If we add support for registering services, this method should no
longer be autogenerated (e.g. by removing mbim-uuid.h from the list of
files that glib-mkenums takes to autogenerate these files, in the
src/libmbim-glib/generated/Makefile.am. Once that is disabled, we can
now implement our own, which for the known standard services would be
the same as the autogenerated one, but where we also add another loop
to get the new 'nick' name for the registered services, so that
mbim_service_get_string() also provides a textual representation for
these newly added services.
More information about the libmbim-devel