Re: [RFC] Install introspection files



On Wednesday 16 April 2008 14:45:12 Helmut Schaa wrote:
> I'm using the NetworkManager introspection files for automatically
> generating the Qt-DBus-Objects needed for KNetworkManager. Currently I keep
> a copy of the introspection files in my development tree due to the fact
> that NetworkManager does not install the introspection files anywhere.
>
> I'd like to get rid of this copy as I have to update the files every now
> and then ;)
>
> Attached are two patches:
>
> 1) install_introspection_files.patch
> - Add configure-flag to specify where to install the introspection-files
>   (default is $(prefix)/share/dbus-1/interfaces)
> - Install the introspection-files to that directory

Cool

> 2) rename_introspection_files.patch
> - Rename all introspection files according to the interface it describes as
>   nm-* is not a suitable name for installed introspection files.

Agreed, for the selfish reason that the Qt4 qdbusxml2cpp tool creates include 
guards based on the filename, and '-' are not valid chars in #defines, so 
including multiple generated headers fails since they all seem to 
say "#ifndef NM".

> The second patch leaves some questions open as some introspection files
> contain more then one interface (e.g. nm-exported-connection.xml) or one
> interface is described in two files (e.g. nm-manager.xml and
> nm-manager-client.xml).
>
> I solved that currently by using the first interface as filename for
> nm-exported-connection.xml and renaming nm-manager.xml to
> org.freedesktop.NetworkManagerLegacy.xml while nm-manager-client.xml is
> renamed to org.freedesktop.NetworkManager.xml.
>
> Comments?

Before you do this I'd like to suggest we think again about whether to install 
the documented introspection files or to clean the documented xml to 'pure 
introspection xml at build time.  

The reason for this is that I started adding detailed http object descriptions 
to each interface by setting the default namespace to http in the enclosing 
elements - however, the glib bindings generator can't handle this.  I think 
the patch Dan added skips any element that has a ':' in the tagname; tracking 
the default namespace would mean adding more state to the glib tool which 
arguably belongs in its xml parser.  Instead of requiring everyone to patch 
their toolchain again, we can do this in the build system.

Will
-- 
Will Stephenson
IRC: Bille


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