[kdbus] KDBUS_ITEM_PAYLOAD_OFF items are (once again) relative to msg header
[platform/upstream/glib.git] / gio / tests / test-codegen.xml
1 <node>
2   <!-- Fully Loaded Interface -->
3   <interface name="org.project.Bar">
4     <annotation name="org.gtk.GDBus.DocString" value="The org.project.Bar interface is very complicated."/>
5     <annotation name="org.gtk.GDBus.DocString.Short" value="Brief interface doc string"/>
6
7     <method name="HelloWorld">
8       <annotation name="org.gtk.GDBus.DocString" value="Method &lt;emphasis&gt;documentation&lt;/emphasis&gt; blablablabla."/>
9       <annotation name="ExistingAnnotation" value="blah"/>
10       <annotation name="org.gtk.GDBus.ExistingInternalAnnotation" value="booh"/>
11       <arg name="greeting" direction="in" type="s">
12         <annotation name="org.gtk.GDBus.DocString" value="in param doc"/>
13       </arg>
14       <arg name="response" direction="out" type="s">
15         <annotation name="org.gtk.GDBus.DocString" value="out param doc"/>
16       </arg>
17     </method>
18
19     <method name="TestPrimitiveTypes">
20       <arg direction="in"  type="y" name="val_byte" />
21       <arg direction="in"  type="b" name="val_boolean" />
22       <arg direction="in"  type="n" name="val_int16" />
23       <arg direction="in"  type="q" name="val_uint16" />
24       <arg direction="in"  type="i" name="val_int32" />
25       <arg direction="in"  type="u" name="val_uint32" />
26       <arg direction="in"  type="x" name="val_int64" />
27       <arg direction="in"  type="t" name="val_uint64" />
28       <arg direction="in"  type="d" name="val_double" />
29       <arg direction="in"  type="s" name="val_string" />
30       <arg direction="in"  type="o" name="val_objpath" />
31       <arg direction="in"  type="g" name="val_signature" />
32       <arg direction="in"  type="ay" name="val_bytestring" />
33       <arg direction="out" type="y" name="ret_byte" />
34       <arg direction="out" type="b" name="ret_boolean" />
35       <arg direction="out" type="n" name="ret_int16" />
36       <arg direction="out" type="q" name="ret_uint16" />
37       <arg direction="out" type="i" name="ret_int32" />
38       <arg direction="out" type="u" name="ret_uint32" />
39       <arg direction="out" type="x" name="ret_int64" />
40       <arg direction="out" type="t" name="ret_uint64" />
41       <arg direction="out" type="d" name="ret_double" />
42       <arg direction="out" type="s" name="ret_string" />
43       <arg direction="out" type="o" name="ret_objpath" />
44       <arg direction="out" type="g" name="ret_signature" />
45       <arg direction="out" type="ay" name="ret_bytestring" />
46     </method>
47
48     <method name="TestNonPrimitiveTypes">
49       <arg direction="in" type="a{ss}" name="dict_s_to_s" />
50       <arg direction="in" type="a{s(ii)}" name="dict_s_to_pairs" />
51       <arg direction="in" type="(iss)" name="a_struct" />
52       <arg direction="in" type="as" name="array_of_strings" />
53       <arg direction="in" type="ao" name="array_of_objpaths" />
54       <arg direction="in" type="ag" name="array_of_signatures" />
55       <arg direction="in" type="aay" name="array_of_bytestrings" />
56       <arg direction="out" type="ay" name="result" />
57     </method>
58
59     <method name="RequestSignalEmission">
60       <arg direction="in" type="i" name="which_one" />
61     </method>
62
63     <method name="RequestMultiPropertyMods"/>
64
65     <method name="UnimplementedMethod"/>
66
67     <method name="PropertyCancellation"/>
68
69     <signal name="TestSignal">
70       <annotation name="org.gtk.GDBus.DocString" value="Signal documentation."/>
71       <arg type="i" name="val_int32">
72         <annotation name="org.gtk.GDBus.DocString" value="Signal param docs"/>
73       </arg>
74       <arg type="as" name="array_of_strings" />
75       <arg type="aay" name="array_of_bytestrings" />
76       <arg type="a{s(ii)}" name="dict_s_to_pairs" />
77     </signal>
78
79     <signal name="AnotherSignal">
80       <arg type="s" name="word" />
81     </signal>
82
83     <property name="y" type="y" access="readwrite">
84       <annotation name="org.gtk.GDBus.DocString" value="&lt;para&gt;Property docs, yah...&lt;/para&gt;&lt;para&gt;Second paragraph.&lt;/para&gt;"/>
85     </property>
86     <property name="b" type="b" access="readwrite"/>
87     <property name="n" type="n" access="readwrite"/>
88     <property name="q" type="q" access="readwrite"/>
89     <property name="i" type="i" access="readwrite"/>
90     <property name="u" type="u" access="readwrite"/>
91     <property name="x" type="x" access="readwrite"/>
92     <property name="t" type="t" access="readwrite"/>
93     <property name="d" type="d" access="readwrite"/>
94     <property name="s" type="s" access="readwrite"/>
95     <property name="o" type="o" access="readwrite"/>
96     <property name="g" type="g" access="readwrite"/>
97     <property name="ay" type="ay" access="readwrite"/>
98     <property name="as" type="as" access="readwrite"/>
99     <property name="aay" type="aay" access="readwrite"/>
100     <property name="ao" type="ao" access="readwrite"/>
101     <property name="ag" type="ag" access="readwrite"/>
102     <property name="FinallyNormalName" type="s" access="readwrite"/>
103     <property name="ReadonlyProperty" type="s" access="read"/>
104     <property name="WriteonlyProperty" type="s" access="write"/>
105
106     <!-- unset properties -->
107     <property name="unset_i" type="i" access="readwrite"/>
108     <property name="unset_d" type="d" access="readwrite"/>
109     <property name="unset_s" type="s" access="readwrite"/>
110     <property name="unset_o" type="o" access="readwrite"/>
111     <property name="unset_g" type="g" access="readwrite"/>
112     <property name="unset_ay" type="ay" access="readwrite"/>
113     <property name="unset_as" type="as" access="readwrite"/>
114     <property name="unset_ao" type="ao" access="readwrite"/>
115     <property name="unset_ag" type="ag" access="readwrite"/>
116     <property name="unset_struct" type="(idsogayasaoag)" access="readwrite"/>
117   </interface> <!-- End org.project.Bar -->
118
119   <!-- Namespaced -->
120   <interface name="org.project.Bar.Frobnicator">
121     <method name="RandomMethod"/>
122   </interface>
123
124   <!-- Empty -->
125   <interface name="org.project.Baz">
126   </interface>
127
128   <!-- Outside D-Bus prefix -->
129   <interface name="com.acme.Coyote">
130     <method name="Run"/>
131     <method name="Sleep"/>
132     <method name="Attack"/>
133     <signal name="Surprised"/>
134     <property name="Mood" type="s" access="read"/>
135   </interface>
136
137   <!-- force various names -->
138   <interface name="com.acme.Rocket">
139     <!-- Forcing the typename via an annotation -->
140     <annotation name="org.gtk.GDBus.C.Name" value="Rocket123"/>
141
142     <!-- ditto method -->
143     <method name="Ignite">
144       <annotation name="org.gtk.GDBus.C.Name" value="ignite_xyz"/>
145     </method>
146
147     <!-- ditto signal -->
148     <signal name="Exploded">
149       <annotation name="org.gtk.GDBus.C.Name" value="exploded-xyz"/>
150     </signal>
151
152     <!-- ditto property -->
153     <property name="Speed" type="d" access="read">
154       <annotation name="org.gtk.GDBus.C.Name" value="speed-xyz"/>
155     </property>
156
157     <property name="Direction" type="(ddd)" access="read"/>
158
159     <!-- Check there's no conflict with the GType iface_name_get_type() function -->
160     <property name="Type" type="s" access="read"/>
161   </interface>
162
163   <!-- Test interface for forcing use of GVariant -->
164   <interface name="org.project.Bat">
165
166     <!-- Forcing GVariant for types that would be mapped -->
167     <method name="ForceMethod">
168       <arg name="force_in_i" type="i" direction="in">
169         <annotation name="org.gtk.GDBus.C.ForceGVariant" value="true"/>
170       </arg>
171       <arg name="force_in_s" type="s" direction="in">
172         <annotation name="org.gtk.GDBus.C.ForceGVariant" value="true"/>
173       </arg>
174       <arg name="force_in_ay" type="ay" direction="in">
175         <annotation name="org.gtk.GDBus.C.ForceGVariant" value="true"/>
176       </arg>
177       <arg name="force_in_struct" type="(i)" direction="in">
178         <annotation name="org.gtk.GDBus.C.ForceGVariant" value="true"/>
179       </arg>
180       <arg name="force_out_i" type="i" direction="out">
181         <annotation name="org.gtk.GDBus.C.ForceGVariant" value="true"/>
182       </arg>
183       <arg name="force_out_s" type="s" direction="out">
184         <annotation name="org.gtk.GDBus.C.ForceGVariant" value="true"/>
185       </arg>
186       <arg name="force_out_ay" type="ay" direction="out">
187         <annotation name="org.gtk.GDBus.C.ForceGVariant" value="true"/>
188       </arg>
189       <arg name="force_out_struct" type="(i)" direction="out">
190         <annotation name="org.gtk.GDBus.C.ForceGVariant" value="true"/>
191       </arg>
192     </method>
193
194     <signal name="ForceSignal">
195       <arg name="force_i" type="i">
196         <annotation name="org.gtk.GDBus.C.ForceGVariant" value="true"/>
197       </arg>
198       <arg name="force_s" type="s">
199         <annotation name="org.gtk.GDBus.C.ForceGVariant" value="true"/>
200       </arg>
201       <arg name="force_ay" type="ay">
202         <annotation name="org.gtk.GDBus.C.ForceGVariant" value="true"/>
203       </arg>
204       <arg name="force_struct" type="(i)">
205         <annotation name="org.gtk.GDBus.C.ForceGVariant" value="true"/>
206       </arg>
207     </signal>
208
209     <property name="force_i" type="i" access="readwrite">
210       <annotation name="org.gtk.GDBus.C.ForceGVariant" value="true"/>
211     </property>
212     <property name="force_s" type="s" access="readwrite">
213       <annotation name="org.gtk.GDBus.C.ForceGVariant" value="true"/>
214     </property>
215     <property name="force_ay" type="ay" access="readwrite">
216       <annotation name="org.gtk.GDBus.C.ForceGVariant" value="true"/>
217     </property>
218     <property name="force_struct" type="(i)" access="readwrite">
219       <annotation name="org.gtk.GDBus.C.ForceGVariant" value="true"/>
220     </property>
221
222   </interface> <!-- End org.project.Bat -->
223
224   <!-- Test interface for g-authorized-method -->
225   <interface name="org.project.Authorize">
226     <method name="CheckNotAuthorized"/>
227     <method name="CheckAuthorized"/>
228     <method name="CheckNotAuthorizedFromObject"/>
229   </interface> <!-- End org.project.Authorize -->
230
231   <!-- Test interfaces for handling methods in a thread -->
232   <interface name="org.project.MethodThreads">
233     <method name="GetSelf">
234       <arg name="self_pointer" direction="out" type="s"/>
235     </method>
236   </interface> <!-- End org.project.MethodThreads -->
237
238   <!--
239     org.project.InlineDocs:
240     @short_description: The short description
241
242     Here is the <emphasis>longer</emphasis> description.
243
244     With lots of stuff.
245   -->
246   <interface name="org.project.InlineDocs">
247
248     <!--
249       FooMethod:
250       @greeting: The docs for greeting parameter.
251       @response: The docs for response parameter.
252
253       The docs for the actual method.
254
255       Multi-paragraph.
256
257       Test of inline links: The #org.project.Bar D-Bus interface,
258       org.project.Bar.HelloWorld() method, the
259       #org.project.Bar::TestSignal, the
260       #org.project.InlineDocs:Property3 property.
261     -->
262     <method name="FooMethod">
263       <arg name="greeting" direction="in" type="s"/>
264       <arg name="response" direction="out" type="s"/>
265     </method>
266
267     <!-- Method2: foo -->
268     <method name="Method2">
269       <arg name="greeting" direction="in" type="s"/>
270       <arg name="response" direction="out" type="s"/>
271     </method>
272
273     <!--
274       BarSignal:
275       @blah: The docs for blah parameter.
276       @boo: The docs for boo parameter.
277
278       The docs for the actual signal.
279     -->
280     <signal name="BarSignal">
281       <!-- Non-Doc comment -->
282       <arg name="blah" type="s"/>
283       <arg name="boo" type="s"/>
284     </signal>
285
286     <!-- BazProperty: The docs for the property. -->
287     <property name="BazProperty" type="s" access="read"/>
288
289     <!-- Property2: Another property
290          This should be a new paragraph.
291     -->
292     <property name="Property2" type="s" access="read"/>
293
294     <!-- Property3:
295          First line.
296          This should NOT be a new paragraph.
297     -->
298     <property name="Property3" type="s" access="read"/>
299
300     <!-- Property4:  
301          First line. With trailing whitespace.  
302          Second line (same paragraph).  
303     -->
304     <property name="Property4" type="s" access="read"/>
305
306     <!-- Property5: Foo  
307          First line (second paragraph). With trailing whitespace.  
308          Second line (same paragraph).  
309 <programlisting>
310 1 program listing
311  2 should include indented space
312   3
313    4
314     5
315 </programlisting>
316     -->
317     <property name="Property5" type="s" access="read"/>
318
319
320     <!--
321       FancyProperty:
322       Here's some fancy use of XML inside the comment.
323       <variablelist>
324         <varlistentry>
325           <term><option>namespace</option></term>
326           <listitem>
327             <para>The namespace to use for generated code. In CamelCase format.</para>
328           </listitem>
329         </varlistentry>
330         <varlistentry>
331           <term><option>output-prefix</option></term>
332           <listitem>
333             <para>
334               A prefix to use for all generated files. Defaults to <filename>generated</filename>.
335             </para>
336           </listitem>
337         </varlistentry>
338       </variablelist>
339     -->
340     <property name="FancyProperty" type="s" access="read"/>
341   </interface>
342
343   <interface name="ChangingInterfaceV1">
344     <method name="FooMethod"/>
345     <method name="BarMethod"/>
346     <method name="BazMethod"/>
347     <signal name="FooSignal"/>
348     <signal name="BarSignal"/>
349     <signal name="BazSignal"/>
350   </interface>
351
352   <!-- ChangingInterfaceV2:
353   -->
354   <interface name="ChangingInterfaceV2">
355     <!--
356       NewSignalIn2:
357       @since: 2.0
358     -->
359     <signal name="NewSignalIn2"/>
360     <!--
361       NewMethodIn2:
362       @since: 2.0
363     -->
364     <method name="NewMethodIn2"/>
365
366     <!-- reverse order -->
367     <signal name="BazSignal"/>
368     <signal name="BarSignal"/>
369     <signal name="FooSignal"/>
370     <method name="BazMethod"/>
371     <method name="BarMethod"/>
372     <method name="FooMethod"/>
373   </interface>
374
375   <!-- ChangingInterfaceV10:
376   -->
377   <interface name="ChangingInterfaceV10">
378     <!--
379       AddedSignalIn10:
380       @since: 10.0
381     -->
382     <signal name="AddedSignalIn10"/>
383     <method name="AddedMethodIn10">
384       <annotation name="org.gtk.GDBus.Since" value="10.0"/>
385     </method>
386
387     <!--
388       NewSignalIn2:
389       @since: 2.0
390     -->
391     <signal name="NewSignalIn2"/>
392     <!--
393       NewMethodIn2:
394       @since: 2.0
395     -->
396     <method name="NewMethodIn2"/>
397
398     <!-- reverse order -->
399     <signal name="BazSignal"/>
400     <signal name="BarSignal"/>
401     <signal name="FooSignal"/>
402     <method name="BazMethod"/>
403     <method name="BarMethod"/>
404     <method name="FooMethod"/>
405   </interface>
406
407   <interface name="TestUglyCaseInterface">
408     <annotation name="org.gtk.GDBus.C.Name" value="TesT_ugly_CASE_Interface"/>
409
410     <method name="GetiSCSIServers">
411       <annotation name="org.gtk.GDBus.C.Name" value="Get_iSCSI_Servers"/>
412     </method>
413
414     <signal name="serversUPDATEDNOW">
415       <annotation name="org.gtk.GDBus.C.Name" value="Servers_UPDATED_NOW"/>
416     </signal>
417
418     <property name="UGLYNAME" type="i" access="readwrite">
419       <annotation name="org.gtk.GDBus.C.Name" value="UGLY_NAME"/>
420     </property>
421   </interface>
422
423   <!--
424     OldieInterface:
425     @short_description: A an example of an deprecated interface
426
427     This is an example of a deprecated interface.
428     -->
429   <interface name="OldieInterface">
430     <annotation name="org.freedesktop.DBus.Deprecated" value="true"/>
431
432     <method name="Foo">
433       <annotation name="org.freedesktop.DBus.Deprecated" value="true"/>
434     </method>
435
436     <signal name="Bar">
437       <annotation name="org.freedesktop.DBus.Deprecated" value="true"/>
438     </signal>
439
440     <property name="Bat" type="i" access="readwrite">
441       <annotation name="org.freedesktop.DBus.Deprecated" value="true"/>
442     </property>
443   </interface>
444
445   <!-- ensure we don't choke on unknown/unexpected XML tags or unknown/unexpected attribyutes (#650874) -->
446   <interface name="UnknownXmlTags" unexpected="boo">
447     <someUnknownTag>
448       <anotherTagWeIgnore>yadaydaydaydayda</anotherTagWeIgnore>
449     </someUnknownTag>
450     <method name="CanSetTimezone" also_unexpected="1">
451       <annotation name="org.freedesktop.DBus.GLib.Async" value="" also_unexpected="1">
452         <unknownTag/>
453       </annotation>
454       <arg name="value" direction="out" type="i" also_unexpected="1">
455         <unknownTag/>
456       </arg>
457       <unknownTag/>
458     </method>
459     <signal name="SomeSignal" also_unexpected="1">
460       <unknownTag/>
461     </signal>
462     <property name="SomeProperty" type="s" access="readwrite" also_unexpected="1">
463       <unknownTag/>
464     </property>
465   </interface>
466   <unknownTag/>
467
468   <interface name="FDPassing">
469     <method name="HelloFD">
470       <annotation name="org.gtk.GDBus.C.UnixFD" value="1"/>
471       <arg name="greeting" direction="in" type="s"/>
472       <arg name="response" direction="out" type="s"/>
473     </method>
474   </interface>
475
476   <interface name="Naming">
477     <property name="Type" type="i" access="readwrite"/>
478   </interface>
479
480 </node>