Adding new MBIM extension CID?

Arnaud Desmier adesmier at sequans.com
Thu Apr 10 05:40:45 PDT 2014


OK, so I enabled again mbim-uuid.h within generated/Makefile.am.

But instead of writing a mbim_service_custom_get_string I wrote a 
mbim_get_service_string. This function can retrieve service nickname for 
any service and is called instead of mbim_service_get_string that is 
automatically generated.

I know the difference between mbim_service_get_string and 
mbim_get_service_string is really tiny and can confuse but I have no 
better name.

Arnaud


On 10/04/2014 13:12, Aleksander Morgado wrote:
> On Thu, Apr 10, 2014 at 12:01 PM, Arnaud Desmier <adesmier at sequans.com> wrote:
>> 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.
>
> Hum... I just realized; we cannot remove mbim-uuid.h from the
> glib-mkenums list as then MbimService and MbimContextType wouldn't be
> registered as GEnums any more, and that's an API break.
>
> Could you please re-add mbim-uuid.h, and instead write a new
> mbim_service_custom_get_string (guint val)? It's probably not a big
> deal to have that one as you already included a
> mbim_service_id_is_custom() which we can use to check before printing.
> Sorry for not realizing this earlier... :/
>
> BTW; in that mbim_service_id_is_custom(), you can also check first this:
>     if (id <= MBIM_SERVICE_DSS)
>         return FALSE;
>
> Last thing, coding-style wise, please recheck the patch and make sure
> that a whitespace is always included before parenthesis when calling
> methods. Oh, and use /* this */ to comment code, instead of // this.
>
> We're almost there, thanks for that work :)
>



-- 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/af37a473/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-support-for-custom-services.patch
Type: text/x-patch
Size: 11515 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libmbim-devel/attachments/20140410/af37a473/attachment-0001.bin>


More information about the libmbim-devel mailing list