Adding new MBIM extension CID?

Arnaud Desmier adesmier at sequans.com
Thu Apr 10 03:01:28 PDT 2014


Hi Aleksander,

Find attached new patch and thanks for pointing me correct glib APIs :)

By removing mbim-uuid.h from the list of files to parse I also had to 
rewrite function mbim_context_type_get_string.

I've added a new unit test function in test-uuid.c to check that any 
impacted uuid/service function are working for custom services.

Arnaud

On 09/04/2014 11:54, Aleksander Morgado wrote:
> 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.
>



-- IMPORTANT NOTICE: 

The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libmbim-devel/attachments/20140410/d001b7e6/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-support-for-custom-services.patch
Type: text/x-patch
Size: 11777 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libmbim-devel/attachments/20140410/d001b7e6/attachment.bin>


More information about the libmbim-devel mailing list