<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<font size="-1">Hi Aleksander,<br>
<br>
Find attached new patch and thanks for pointing me correct glib
APIs :)<br>
<br>
By removing mbim-uuid.h from the list of files to parse I also had
to rewrite function mbim_context_type_get_string.<br>
<br>
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.<br>
<br>
Arnaud<br>
<br>
</font>
<div class="moz-cite-prefix">On 09/04/2014 11:54, Aleksander Morgado
wrote:<br>
</div>
<blockquote
cite="mid:CAAP7ucJ6eEiacy3P4feeD_gYDw1RheZ7dmgVvgZ7TDgss7m2ng@mail.gmail.com"
type="cite">
<pre wrap="">On Wed, Apr 9, 2014 at 11:46 AM, Aleksander Morgado
<a class="moz-txt-link-rfc2396E" href="mailto:aleksander@aleksander.es"><aleksander@aleksander.es></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">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().
</pre>
</blockquote>
<pre wrap="">
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.
</pre>
</blockquote>
<br>
<p></p>
<p>-- IMPORTANT NOTICE: </p>
<p>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.</p></body>
</html>