~ubuntu-branches/ubuntu/vivid/glib2.0/vivid-proposed

« back to all changes in this revision

Viewing changes to docs/reference/gio/html/gdbus-codegen.html

  • Committer: Package Import Robot
  • Author(s): Andreas Henriksson
  • Date: 2014-03-24 20:58:34 UTC
  • mfrom: (1.66.13)
  • Revision ID: package-import@ubuntu.com-20140324205834-8hsgok8k36ftocqa
Tags: 2.40.0-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
55
55
<a name="id-1.4.24.7.6"></a><h2>Generating C code</h2>
56
56
<p>
57
57
    When generating C code, a
58
 
    <a href="/home/desrt/.cache/jhbuild/install/share/gtk-doc/html/gobject/GTypeModule.html"><span class="type">GInterface</span></a>-derived type is generated for each D-Bus
 
58
    <a href="http://library.gnome.org/devel/gobject/unstable/GTypeModule.html"><span class="type">GInterface</span></a>-derived type is generated for each D-Bus
59
59
    interface. Additionally, for every generated type,
60
60
    <span class="type">FooBar</span>, two concrete instantiable types,
61
61
    <span class="type">FooBarProxy</span> and <span class="type">FooBarSkeleton</span>, implementing
84
84
  </p>
85
85
<p>
86
86
    Two forms of the name are used - the CamelCase form and the
87
 
    lower-case form. The CamelCase form is used for the <a href="../gobject/gobject-Type-Information.html#GType"><span class="type">GType</span></a> and
 
87
    lower-case form. The CamelCase form is used for the <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> and
88
88
    struct name, while lower-case form is used in function names. The
89
89
    lower-case form is calculated by converting from CamelCase to
90
90
    lower-case and inserting underscores at word boundaries (using
267
267
        </p>
268
268
<p>
269
269
          When generating C code, this annotation is used to add
270
 
          <a href="../glib/glib-Miscellaneous-Macros.html#G-GNUC-DEPRECATED:CAPS"><span class="type">G_GNUC_DEPRECATED</span></a> to generated functions for the element.
 
270
          <a href="http://library.gnome.org/devel/glib/unstable/glib-Miscellaneous-Macros.html#G-GNUC-DEPRECATED:CAPS"><span class="type">G_GNUC_DEPRECATED</span></a> to generated functions for the element.
271
271
        </p>
272
272
<p>
273
273
          When generating Docbook XML, a deprecation warning will
330
330
<tr>
331
331
<td><p><span class="term"><code class="literal">org.gtk.GDBus.C.ForceGVariant</code></span></p></td>
332
332
<td><p>
333
 
          If set to a non-empty string, a <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> instance will
 
333
          If set to a non-empty string, a <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> instance will
334
334
          be used instead of the natural C type. This annotation can
335
335
          be used on any <code class="literal">&lt;arg&gt;</code> and
336
336
          <code class="literal">&lt;property&gt;</code> element.
531
531
    two files called
532
532
    <code class="filename">myapp-generated.[ch]</code> are
533
533
    generated. The files provide an abstract
534
 
    <a href="../gobject/gobject-Type-Information.html#GTypeInterface"><span class="type">GTypeInterface</span></a>-derived type called
 
534
    <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GTypeInterface"><span class="type">GTypeInterface</span></a>-derived type called
535
535
    <span class="type">MyAppFrobber</span> as well as two instantiable types with
536
536
    the same name but suffixed with <span class="type">Proxy</span> and
537
537
    <span class="type">Skeleton</span>. The generated file, roughly, contains the
656
656
                        <span class="gtkdoc kwb">const</span> gchar<span class="gtkdoc opt">*</span> <span class="gtkdoc kwb">const</span> <span class="gtkdoc opt">*</span>messages<span class="gtkdoc opt">);</span>
657
657
 
658
658
  <span class="comment">/* Signal handler for the ::handle-hello-world signal */</span>
659
 
  <span class="function"><a href="../glib/glib-Basic-Types.html#gboolean">gboolean</a></span> <span class="gtkdoc opt">(*</span>handle_hello_world<span class="gtkdoc opt">) (</span>MyAppFrobber <span class="gtkdoc opt">*</span>proxy<span class="gtkdoc opt">,</span>
 
659
  <span class="function"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean">gboolean</a></span> <span class="gtkdoc opt">(*</span>handle_hello_world<span class="gtkdoc opt">) (</span>MyAppFrobber <span class="gtkdoc opt">*</span>proxy<span class="gtkdoc opt">,</span>
660
660
                                  GDBusMethodInvocation <span class="gtkdoc opt">*</span>invocation<span class="gtkdoc opt">,</span>
661
661
                                  <span class="gtkdoc kwb">const</span> gchar <span class="gtkdoc opt">*</span>greeting<span class="gtkdoc opt">);</span>
662
662
<span class="gtkdoc opt">}</span> MyAppFrobberIface<span class="gtkdoc opt">;</span>
742
742
 
743
743
<p>
744
744
    Thus, for every D-Bus method, there will be three C functions for
745
 
    calling the method, one <a href="../gobject/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> signal for handling an incoming
 
745
    calling the method, one <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> signal for handling an incoming
746
746
    call and one C function for completing an incoming call. For every
747
 
    D-Bus signal, there's one <a href="../gobject/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> signal and one C function for
 
747
    D-Bus signal, there's one <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> signal and one C function for
748
748
    emitting it. For every D-Bus property, two C functions are
749
 
    generated (one setter, one getter) and one <a href="../gobject/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> property. The
 
749
    generated (one setter, one getter) and one <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> property. The
750
750
    following table summarizes the generated facilities and where they
751
751
    are applicable:
752
752
  </p>
782
782
<tr>
783
783
<td>Properties (Reading)</td>
784
784
<td>Use <code class="function"><code class="function">m_a_f_get_verbose()</code></code> or <em class="parameter"><code>:verbose</code></em>.</td>
785
 
<td>Implement <a href="../gobject/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>'s <code class="function"><code class="function">get_property()</code></code> vfunc.</td>
 
785
<td>Implement <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>'s <code class="function"><code class="function">get_property()</code></code> vfunc.</td>
786
786
</tr>
787
787
<tr>
788
788
<td>Properties (writing)</td>
789
789
<td>Use <code class="function"><code class="function">m_a_f_set_verbose()</code></code> or <em class="parameter"><code>:verbose</code></em>.</td>
790
 
<td>Implement <a href="../gobject/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>'s <code class="function"><code class="function">set_property()</code></code> vfunc.</td>
 
790
<td>Implement <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>'s <code class="function"><code class="function">set_property()</code></code> vfunc.</td>
791
791
</tr>
792
792
</tbody>
793
793
</table></div>
826
826
            NULL<span class="gtkdoc opt">,</span>                          <span class="comment">/* GCancellable* */</span>
827
827
            <span class="gtkdoc opt">&amp;</span>error<span class="gtkdoc opt">);</span>
828
828
<span class="comment">/* do stuff with proxy */</span>
829
 
<span class="function"><a href="../gobject/gobject-The-Base-Object-Type.html#g-object-unref">g_object_unref</a></span> <span class="gtkdoc opt">(</span>proxy<span class="gtkdoc opt">);</span></pre></td>
 
829
<span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref">g_object_unref</a></span> <span class="gtkdoc opt">(</span>proxy<span class="gtkdoc opt">);</span></pre></td>
830
830
      </tr>
831
831
    </tbody>
832
832
  </table>
846
846
      <em class="parameter"><code>:verbose</code></em> or the
847
847
      <code class="function"><code class="function">my_app_get_verbose()</code></code> and
848
848
      <code class="function"><code class="function">my_app_set_verbose()</code></code> methods. Use the
849
 
      standard <a href="../gobject/gobject-The-Base-Object-Type.html#GObject-notify"><span class="type">“notify”</span></a> signal to listen to property changes.
 
849
      standard <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject-notify"><span class="type">“notify”</span></a> signal to listen to property changes.
850
850
    </p>
851
851
<p>
852
852
      Note that all property access is via <a class="link" href="GDBusProxy.html" title="GDBusProxy"><span class="type">GDBusProxy</span></a>'s
863
863
<a name="id-1.4.24.7.10.11"></a><h3>Server-side usage</h3>
864
864
<p>
865
865
      The generated <span class="type">MyAppFrobber</span> interface is designed so
866
 
      it is easy to implement it in a <a href="../gobject/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>
 
866
      it is easy to implement it in a <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>
867
867
      subclass. For example, to handle
868
868
      <code class="function"><code class="function">HelloWorld()</code></code> method invocations, set the
869
869
      vfunc for <code class="function"><code class="function">handle_hello_hello_world()</code></code> in the
870
870
      <span class="type">MyAppFrobberIface</span> structure. Similary, to handle
871
871
      the <em class="parameter"><code>net.Corp.MyApp.Frobber:Verbose</code></em>
872
 
      property override the <em class="parameter"><code>:verbose</code></em> <a href="../gobject/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>
 
872
      property override the <em class="parameter"><code>:verbose</code></em> <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>
873
873
      property from the subclass. To emit a signal, use
874
874
      e.g. <code class="function"><code class="function">my_app_emit_signal()</code></code> or
875
 
      <a href="../gobject/gobject-Signals.html#g-signal-emit-by-name"><code class="function">g_signal_emit_by_name()</code></a>.
 
875
      <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#g-signal-emit-by-name"><code class="function">g_signal_emit_by_name()</code></a>.
876
876
    </p>
877
877
<p>
878
878
      Instead of subclassing, it is often easier to use the generated
879
879
      <span class="type">MyAppFrobberSkeleton</span> subclass. To handle incoming
880
 
      method calls, use <code class="function"><a href="../gobject/gobject-Signals.html#g-signal-connect"><code class="function">g_signal_connect()</code></a></code> with
 
880
      method calls, use <code class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#g-signal-connect"><code class="function">g_signal_connect()</code></a></code> with
881
881
      the <code class="function">::handle-*</code> signals and instead of
882
 
      overriding <a href="../gobject/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>'s
 
882
      overriding <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>'s
883
883
      <code class="function"><code class="function">get_property()</code></code> and
884
884
      <code class="function"><code class="function">set_property()</code></code> vfuncs, use
885
 
      <a href="../gobject/gobject-The-Base-Object-Type.html#g-object-get"><code class="function">g_object_get()</code></a> and
886
 
      <a href="../gobject/gobject-The-Base-Object-Type.html#g-object-set"><code class="function">g_object_set()</code></a> or the generated property
 
885
      <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-get"><code class="function">g_object_get()</code></a> and
 
886
      <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-set"><code class="function">g_object_set()</code></a> or the generated property
887
887
      getters and setters (the generated class has an internal
888
888
      property bag implementation).
889
889
    </p>
941
941
                       <span class="gtkdoc kwb">const</span> gchar            <span class="gtkdoc opt">*</span>greeting<span class="gtkdoc opt">,</span>
942
942
                       gpointer                user_data<span class="gtkdoc opt">)</span>
943
943
<span class="gtkdoc opt">{</span>
944
 
  <span class="keyword">if</span> <span class="gtkdoc opt">(</span><span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strcmp0">g_strcmp0</a></span> <span class="gtkdoc opt">(</span>greeting<span class="gtkdoc opt">,</span> <span class="string">&quot;Boo&quot;</span><span class="gtkdoc opt">) !=</span> <span class="number">0</span><span class="gtkdoc opt">)</span>
 
944
  <span class="keyword">if</span> <span class="gtkdoc opt">(</span><span class="function"><a href="http://library.gnome.org/devel/glib/unstable/glib-String-Utility-Functions.html#g-strcmp0">g_strcmp0</a></span> <span class="gtkdoc opt">(</span>greeting<span class="gtkdoc opt">,</span> <span class="string">&quot;Boo&quot;</span><span class="gtkdoc opt">) !=</span> <span class="number">0</span><span class="gtkdoc opt">)</span>
945
945
    <span class="gtkdoc opt">{</span>
946
946
      gchar <span class="gtkdoc opt">*</span>response<span class="gtkdoc opt">;</span>
947
 
      response <span class="gtkdoc opt">=</span> <span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strdup-printf">g_strdup_printf</a></span> <span class="gtkdoc opt">(</span><span class="string">&quot;Word! You said `%s'.&quot;</span><span class="gtkdoc opt">,</span> greeting<span class="gtkdoc opt">);</span>
 
947
      response <span class="gtkdoc opt">=</span> <span class="function"><a href="http://library.gnome.org/devel/glib/unstable/glib-String-Utility-Functions.html#g-strdup-printf">g_strdup_printf</a></span> <span class="gtkdoc opt">(</span><span class="string">&quot;Word! You said `%s'.&quot;</span><span class="gtkdoc opt">,</span> greeting<span class="gtkdoc opt">);</span>
948
948
      <span class="function">my_app_complete_hello_world</span> <span class="gtkdoc opt">(</span>interface<span class="gtkdoc opt">,</span> invocation<span class="gtkdoc opt">,</span> response<span class="gtkdoc opt">);</span>
949
 
      <span class="function"><a href="../glib/glib-Memory-Allocation.html#g-free">g_free</a></span> <span class="gtkdoc opt">(</span>response<span class="gtkdoc opt">);</span>
 
949
      <span class="function"><a href="http://library.gnome.org/devel/glib/unstable/glib-Memory-Allocation.html#g-free">g_free</a></span> <span class="gtkdoc opt">(</span>response<span class="gtkdoc opt">);</span>
950
950
    <span class="gtkdoc opt">}</span>
951
951
  <span class="keyword">else</span>
952
952
    <span class="gtkdoc opt">{</span>
964
964
  interface <span class="gtkdoc opt">=</span> <span class="function">my_app_frobber_skeleton_new</span> <span class="gtkdoc opt">();</span>
965
965
  <span class="function">my_app_frobber_set_verbose</span> <span class="gtkdoc opt">(</span>interface<span class="gtkdoc opt">,</span> TRUE<span class="gtkdoc opt">);</span>
966
966
 
967
 
  <span class="function"><a href="../gobject/gobject-Signals.html#g-signal-connect">g_signal_connect</a></span> <span class="gtkdoc opt">(</span>interface<span class="gtkdoc opt">,</span>
 
967
  <span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#g-signal-connect">g_signal_connect</a></span> <span class="gtkdoc opt">(</span>interface<span class="gtkdoc opt">,</span>
968
968
                    <span class="string">&quot;handle-hello-world&quot;</span><span class="gtkdoc opt">,</span>
969
 
                    <span class="function"><a href="../gobject/gobject-Closures.html#G-CALLBACK:CAPS">G_CALLBACK</a></span> <span class="gtkdoc opt">(</span>on_handle_hello_world<span class="gtkdoc opt">),</span>
 
969
                    <span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Closures.html#G-CALLBACK:CAPS">G_CALLBACK</a></span> <span class="gtkdoc opt">(</span>on_handle_hello_world<span class="gtkdoc opt">),</span>
970
970
                    some_user_data<span class="gtkdoc opt">);</span>
971
971
 
972
972
  <span class="gtkdoc opt">[...]</span>
986
986
 
987
987
<p>
988
988
      To facilitate atomic changesets (multiple properties changing at
989
 
      the same time), <a href="../gobject/gobject-The-Base-Object-Type.html#GObject-notify"><span class="type">“notify”</span></a> signals are queued up when
 
989
      the same time), <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject-notify"><span class="type">“notify”</span></a> signals are queued up when
990
990
      received. The queue is drained in an idle handler (which is called from the
991
 
      <a href="../glib/glib-The-Main-Event-Loop.html#g-main-context-push-thread-default">thread-default main loop</a>
 
991
      <a href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#g-main-context-push-thread-default">thread-default main loop</a>
992
992
      of the thread where the skeleton object was
993
993
      contructed) and will cause emissions of the <a class="ulink" href="http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-properties" target="_top">org.freedesktop.DBus.Properties::PropertiesChanged</a>
994
994
      signal with all the properties that have changed. Use
995
995
      <a class="link" href="GDBusInterfaceSkeleton.html#g-dbus-interface-skeleton-flush" title="g_dbus_interface_skeleton_flush ()"><code class="function">g_dbus_interface_skeleton_flush()</code></a> or
996
996
      <a class="link" href="GDBusObjectSkeleton.html#g-dbus-object-skeleton-flush" title="g_dbus_object_skeleton_flush ()"><code class="function">g_dbus_object_skeleton_flush()</code></a> to empty the queue
997
 
      immediately. Use <a href="../gobject/gobject-The-Base-Object-Type.html#g-object-freeze-notify"><code class="function">g_object_freeze_notify()</code></a> and
998
 
      <a href="../gobject/gobject-The-Base-Object-Type.html#g-object-thaw-notify"><code class="function">g_object_thaw_notify()</code></a> for atomic changesets if on a different
 
997
      immediately. Use <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-freeze-notify"><code class="function">g_object_freeze_notify()</code></a> and
 
998
      <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-thaw-notify"><code class="function">g_object_thaw_notify()</code></a> for atomic changesets if on a different
999
999
      thread.
1000
1000
    </p>
1001
1001
</div>
1005
1005
<p>
1006
1006
    Scalar types
1007
1007
    (type-strings
1008
 
    <a href="../glib/glib-GVariantType.html#G-VARIANT-TYPE-BOOLEAN:CAPS">'b'</a>,
1009
 
    <a href="../glib/glib-GVariantType.html#G-VARIANT-TYPE-BYTE:CAPS">'y'</a>,
1010
 
    <a href="../glib/glib-GVariantType.html#G-VARIANT-TYPE-INT16:CAPS">'n'</a>,
1011
 
    <a href="../glib/glib-GVariantType.html#G-VARIANT-TYPE-UINT16:CAPS">'q'</a>,
1012
 
    <a href="../glib/glib-GVariantType.html#G-VARIANT-TYPE-INT32:CAPS">'i'</a>,
1013
 
    <a href="../glib/glib-GVariantType.html#G-VARIANT-TYPE-UINT32:CAPS">'u'</a>,
1014
 
    <a href="../glib/glib-GVariantType.html#G-VARIANT-TYPE-INT64:CAPS">'x'</a>,
1015
 
    <a href="../glib/glib-GVariantType.html#G-VARIANT-TYPE-UINT64:CAPS">'t'</a> and
1016
 
    <a href="../glib/glib-GVariantType.html#G-VARIANT-TYPE-DOUBLE:CAPS">'d'</a>)
 
1008
    <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariantType.html#G-VARIANT-TYPE-BOOLEAN:CAPS">'b'</a>,
 
1009
    <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariantType.html#G-VARIANT-TYPE-BYTE:CAPS">'y'</a>,
 
1010
    <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariantType.html#G-VARIANT-TYPE-INT16:CAPS">'n'</a>,
 
1011
    <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariantType.html#G-VARIANT-TYPE-UINT16:CAPS">'q'</a>,
 
1012
    <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariantType.html#G-VARIANT-TYPE-INT32:CAPS">'i'</a>,
 
1013
    <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariantType.html#G-VARIANT-TYPE-UINT32:CAPS">'u'</a>,
 
1014
    <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariantType.html#G-VARIANT-TYPE-INT64:CAPS">'x'</a>,
 
1015
    <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariantType.html#G-VARIANT-TYPE-UINT64:CAPS">'t'</a> and
 
1016
    <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariantType.html#G-VARIANT-TYPE-DOUBLE:CAPS">'d'</a>)
1017
1017
    ),
1018
1018
    strings (type-strings
1019
 
    <a href="../glib/glib-GVariantType.html#G-VARIANT-TYPE-STRING:CAPS">'s'</a>,
1020
 
    <a href="../glib/glib-GVariantType.html#G-VARIANT-TYPE-BYTESTRING:CAPS">'ay'</a>,
1021
 
    <a href="../glib/glib-GVariantType.html#G-VARIANT-TYPE-OBJECT-PATH:CAPS">'o'</a> and
1022
 
    <a href="../glib/glib-GVariantType.html#G-VARIANT-TYPE-SIGNATURE:CAPS">'g'</a>) and
 
1019
    <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariantType.html#G-VARIANT-TYPE-STRING:CAPS">'s'</a>,
 
1020
    <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariantType.html#G-VARIANT-TYPE-BYTESTRING:CAPS">'ay'</a>,
 
1021
    <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariantType.html#G-VARIANT-TYPE-OBJECT-PATH:CAPS">'o'</a> and
 
1022
    <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariantType.html#G-VARIANT-TYPE-SIGNATURE:CAPS">'g'</a>) and
1023
1023
    arrays of string (type-strings
1024
 
    <a href="../glib/glib-GVariantType.html#G-VARIANT-TYPE-STRING-ARRAY:CAPS">'as'</a>,
1025
 
    <a href="../glib/glib-GVariantType.html#G-VARIANT-TYPE-OBJECT-PATH-ARRAY:CAPS">'ao'</a> and
1026
 
    <a href="../glib/glib-GVariantType.html#G-VARIANT-TYPE-BYTESTRING-ARRAY:CAPS">'aay'</a>)
 
1024
    <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariantType.html#G-VARIANT-TYPE-STRING-ARRAY:CAPS">'as'</a>,
 
1025
    <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariantType.html#G-VARIANT-TYPE-OBJECT-PATH-ARRAY:CAPS">'ao'</a> and
 
1026
    <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariantType.html#G-VARIANT-TYPE-BYTESTRING-ARRAY:CAPS">'aay'</a>)
1027
1027
    are mapped to the natural types,
1028
 
    e.g. <a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>, <a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a>, <a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a>, <a href="../gobject/gobject-Standard-Parameter-and-Value-Types.html#gchararray">gchar*</a>,
1029
 
    <a href="../gobject/gobject-Boxed-Types.html#GStrv">gchar**</a> and
1030
 
    so on. Everything else is mapped to the <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a>
 
1028
    e.g. <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>, <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a>, <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a>, <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Standard-Parameter-and-Value-Types.html#gchararray">gchar*</a>,
 
1029
    <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Boxed-Types.html#GStrv">gchar**</a> and
 
1030
    so on. Everything else is mapped to the <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a>
1031
1031
    type.
1032
1032
  </p>
1033
1033
<p>
1034
1034
    This automatic mapping can be turned off by using the annotation
1035
1035
    <code class="literal">org.gtk.GDBus.C.ForceGVariant</code> - if used then a
1036
 
    <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> is always exchanged instead of the
 
1036
    <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> is always exchanged instead of the
1037
1037
    corresponding native C type. This annotation may be convenient to
1038
1038
    use when using
1039
 
    bytestrings (type-string <a href="../glib/glib-GVariantType.html#G-VARIANT-TYPE-BYTESTRING:CAPS">'ay'</a>)
 
1039
    bytestrings (type-string <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariantType.html#G-VARIANT-TYPE-BYTESTRING:CAPS">'ay'</a>)
1040
1040
    for data that could have embedded NUL bytes.
1041
1041
  </p>
1042
1042
</div>
1050
1050
    class structures will be preserved as well.
1051
1051
  </p>
1052
1052
<p>
1053
 
    The ABI of the generated <a href="../gobject/gobject-Type-Information.html#GType"><span class="type">GType</span></a>s will be preserved only if
 
1053
    The ABI of the generated <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a>s will be preserved only if
1054
1054
    the <code class="literal">org.gtk.GDBus.Since</code> annotation is used
1055
 
    judiciously — this is because the VTable for the <a href="/home/desrt/.cache/jhbuild/install/share/gtk-doc/html/gobject/GTypeModule.html"><span class="type">GInterface</span></a>
 
1055
    judiciously — this is because the VTable for the <a href="http://library.gnome.org/devel/gobject/unstable/GTypeModule.html"><span class="type">GInterface</span></a>
1056
1056
    relies on functions pointers for signal handlers. Specifically, if
1057
1057
    a D-Bus method, property or signal or is added to a D-Bus
1058
 
    interface, then ABI of the generated <a href="/home/desrt/.cache/jhbuild/install/share/gtk-doc/html/gobject/GTypeModule.html"><span class="type">GInterface</span></a> type is preserved
 
1058
    interface, then ABI of the generated <a href="http://library.gnome.org/devel/gobject/unstable/GTypeModule.html"><span class="type">GInterface</span></a> type is preserved
1059
1059
    if, and only if, each added method, property signal is annotated
1060
1060
    with they <code class="literal">org.gtk.GDBus.Since</code> annotation using
1061
1061
    a greater version number than previous versions.