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