Re: Generating more macros in ModemManager-names.h from the introspection XML



On Sun, May 6, 2012 at 7:02 AM, Aleksander Morgado <aleksander lanedo com> wrote:
On 05/04/2012 07:14 PM, Jason Glasgow wrote:
> In the XML comments we have descriptions of the keys returned in
> GetStatus, Scan, and the arguments to Simple.Connect and others.  These
> key names are not part of the generated ModemManager-names.h header file.
>
> Attached is a patch that allows us to generate the macros for the key
> name by moving the key names into XML mapping and member elements and
> updating the xsl.  I have not yet done it for all the methods because
> I'm interested in soliciting feedback.  Is this the right approach?
>
> Comments?
>

Hum... mixed feelings here. From one side, I see it useful to generate
symbols for the names of the entries in the dictionaries; from the other
side, I don't want to duplicate where they are defined (gtk-doc comments
and the new mapping).

Another possibility to ensure we only have 1 place to define the
possible dictionary entries would be to manually maintain a list of
symbols in a new public header, as done with the enums in
'ModemManager-enums.h'. The list could be defined as:

/**
 * MM_CONNECT_PROPERTIES_PIN:
 * SIM-PIN unlock code, given as a string value.
 */
#define MM_CONNECT_PROPERTIES_PIN "pin"

... and so on

And all entries of the same dictionary could be included then in the
same section in the gtk-doc page generated from that code.

Once that page with dictionary-specific entries is available, the
introspection gtk-doc documentation could directly include a link to the
relevant section, instead of re-listing all the entries again.

--
Aleksander
I will prepare a new PATCH using the approach you suggest.
-Jason


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]