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