gdbus-codegen: Add support for new org.gtk.GDBus.C.UnixFD annotation

Also add convenience _with_unix_fd_list variants to GDBusConnection,
GDBusProxy and GDBusMethodInvocation types to easily support this.

Signed-off-by: David Zeuthen <davidz@redhat.com>
This commit is contained in:
David Zeuthen
2011-07-21 16:03:27 -04:00
parent 7b22a8308f
commit c404dbed11
11 changed files with 1033 additions and 384 deletions

View File

@@ -332,6 +332,18 @@ gdbus-codegen --c-namespace MyApp \
</listitem>
</varlistentry>
<varlistentry>
<term><literal>org.gtk.GDBus.C.UnixFD</literal></term>
<listitem>
<para>
If set to a non-empty string, the generated code will
include parameters to exchange file descriptors using the
#GUnixFDList type. This annotation can be used on
<literal>&lt;method&gt;</literal> elements.
</para>
</listitem>
</varlistentry>
</variablelist>
<para>
@@ -744,8 +756,7 @@ on_handle_hello_world (MyAppFrobber *interface,
<link linkend="G-VARIANT-TYPE-INT32:CAPS">'i'</link>,
<link linkend="G-VARIANT-TYPE-UINT32:CAPS">'u'</link>,
<link linkend="G-VARIANT-TYPE-INT64:CAPS">'x'</link>,
<link linkend="G-VARIANT-TYPE-UINT64:CAPS">'t'</link>,
<link linkend="G-VARIANT-TYPE-HANDLE:CAPS">'h'</link> and
<link linkend="G-VARIANT-TYPE-UINT64:CAPS">'t'</link> and
<link linkend="G-VARIANT-TYPE-DOUBLE:CAPS">'d'</link>)
),
strings (type-strings
@@ -780,11 +791,7 @@ on_handle_hello_world (MyAppFrobber *interface,
The generated C functions are guaranteed to not change their ABI
that is, if a method, signal or property does not change its
signature in the introspection XML, the generated C functions will
not change its C ABI either. One exception to this guarantee is if
you are using type <link
linkend="G-VARIANT-TYPE-HANDLE:CAPS">'h'</link> for passing file
descriptors on Unix. Future versions of gdbus-codegen will include
guarantees for this type as well.
not change its C ABI either.
</para>
<para>
The ABI of the generated #GType<!-- -->s will be preserved only if