Change LGPL-2.1+ to LGPL-2.1-or-later
[platform/upstream/glib.git] / gio / gdbusintrospection.h
1 /* GDBus - GLib D-Bus Library
2  *
3  * Copyright (C) 2008-2010 Red Hat, Inc.
4  *
5  * SPDX-License-Identifier: LGPL-2.1-or-later
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General
18  * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
19  *
20  * Author: David Zeuthen <davidz@redhat.com>
21  */
22
23 #ifndef __G_DBUS_INTROSPECTION_H__
24 #define __G_DBUS_INTROSPECTION_H__
25
26 #if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
27 #error "Only <gio/gio.h> can be included directly."
28 #endif
29
30 #include <gio/giotypes.h>
31 #include <gio/tizen_header_glib.h>  /* for TIZEN_PUBLIC_DEPRECATED_API */
32
33 G_BEGIN_DECLS
34
35 /**
36  * GDBusAnnotationInfo:
37  * @ref_count: The reference count or -1 if statically allocated.
38  * @key: The name of the annotation, e.g. "org.freedesktop.DBus.Deprecated".
39  * @value: The value of the annotation.
40  * @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
41  *
42  * Information about an annotation.
43  *
44  * Since: 2.26
45  */
46 struct _GDBusAnnotationInfo
47 {
48   /*< public >*/
49   gint                  ref_count;  /* (atomic) */
50   gchar                *key;
51   gchar                *value;
52   GDBusAnnotationInfo **annotations;
53 };
54
55 /**
56  * GDBusArgInfo:
57  * @ref_count: The reference count or -1 if statically allocated.
58  * @name: Name of the argument, e.g. @unix_user_id.
59  * @signature: D-Bus signature of the argument (a single complete type).
60  * @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
61  *
62  * Information about an argument for a method or a signal.
63  *
64  * Since: 2.26
65  */
66 struct _GDBusArgInfo
67 {
68   /*< public >*/
69   gint                  ref_count;  /* (atomic) */
70   gchar                *name;
71   gchar                *signature;
72   GDBusAnnotationInfo **annotations;
73 };
74
75 /**
76  * GDBusMethodInfo:
77  * @ref_count: The reference count or -1 if statically allocated.
78  * @name: The name of the D-Bus method, e.g. @RequestName.
79  * @in_args: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusArgInfo structures or %NULL if there are no in arguments.
80  * @out_args: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusArgInfo structures or %NULL if there are no out arguments.
81  * @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
82  *
83  * Information about a method on an D-Bus interface.
84  *
85  * Since: 2.26
86  */
87 struct _GDBusMethodInfo
88 {
89   /*< public >*/
90   gint                  ref_count;  /* (atomic) */
91   gchar                *name;
92   GDBusArgInfo        **in_args;
93   GDBusArgInfo        **out_args;
94   GDBusAnnotationInfo **annotations;
95 };
96
97 /**
98  * GDBusSignalInfo:
99  * @ref_count: The reference count or -1 if statically allocated.
100  * @name: The name of the D-Bus signal, e.g. "NameOwnerChanged".
101  * @args: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusArgInfo structures or %NULL if there are no arguments.
102  * @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
103  *
104  * Information about a signal on a D-Bus interface.
105  *
106  * Since: 2.26
107  */
108 struct _GDBusSignalInfo
109 {
110   /*< public >*/
111   gint                  ref_count;  /* (atomic) */
112   gchar                *name;
113   GDBusArgInfo        **args;
114   GDBusAnnotationInfo **annotations;
115 };
116
117 /**
118  * GDBusPropertyInfo:
119  * @ref_count: The reference count or -1 if statically allocated.
120  * @name: The name of the D-Bus property, e.g. "SupportedFilesystems".
121  * @signature: The D-Bus signature of the property (a single complete type).
122  * @flags: Access control flags for the property.
123  * @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
124  *
125  * Information about a D-Bus property on a D-Bus interface.
126  *
127  * Since: 2.26
128  */
129 struct _GDBusPropertyInfo
130 {
131   /*< public >*/
132   gint                      ref_count;  /* (atomic) */
133   gchar                    *name;
134   gchar                    *signature;
135   GDBusPropertyInfoFlags    flags;
136   GDBusAnnotationInfo     **annotations;
137 };
138
139 /**
140  * GDBusInterfaceInfo:
141  * @ref_count: The reference count or -1 if statically allocated.
142  * @name: The name of the D-Bus interface, e.g. "org.freedesktop.DBus.Properties".
143  * @methods: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusMethodInfo structures or %NULL if there are no methods.
144  * @signals: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusSignalInfo structures or %NULL if there are no signals.
145  * @properties: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusPropertyInfo structures or %NULL if there are no properties.
146  * @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
147  *
148  * Information about a D-Bus interface.
149  *
150  * Since: 2.26
151  */
152 struct _GDBusInterfaceInfo
153 {
154   /*< public >*/
155   gint                  ref_count;  /* (atomic) */
156   gchar                *name;
157   GDBusMethodInfo     **methods;
158   GDBusSignalInfo     **signals;
159   GDBusPropertyInfo   **properties;
160   GDBusAnnotationInfo **annotations;
161 };
162
163 /**
164  * GDBusNodeInfo:
165  * @ref_count: The reference count or -1 if statically allocated.
166  * @path: The path of the node or %NULL if omitted. Note that this may be a relative path. See the D-Bus specification for more details.
167  * @interfaces: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusInterfaceInfo structures or %NULL if there are no interfaces.
168  * @nodes: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusNodeInfo structures or %NULL if there are no nodes.
169  * @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
170  *
171  * Information about nodes in a remote object hierarchy.
172  *
173  * Since: 2.26
174  */
175 struct _GDBusNodeInfo
176 {
177   /*< public >*/
178   gint                  ref_count;  /* (atomic) */
179   gchar                *path;
180   GDBusInterfaceInfo  **interfaces;
181   GDBusNodeInfo       **nodes;
182   GDBusAnnotationInfo **annotations;
183 };
184
185 GIO_AVAILABLE_IN_ALL
186 const gchar        *g_dbus_annotation_info_lookup          (GDBusAnnotationInfo **annotations,
187                                                             const gchar          *name) TIZEN_PUBLIC_DEPRECATED_API;
188 GIO_AVAILABLE_IN_ALL
189 GDBusMethodInfo    *g_dbus_interface_info_lookup_method    (GDBusInterfaceInfo   *info,
190                                                             const gchar          *name) TIZEN_PUBLIC_DEPRECATED_API;
191 GIO_AVAILABLE_IN_ALL
192 GDBusSignalInfo    *g_dbus_interface_info_lookup_signal    (GDBusInterfaceInfo   *info,
193                                                             const gchar          *name) TIZEN_PUBLIC_DEPRECATED_API;
194 GIO_AVAILABLE_IN_ALL
195 GDBusPropertyInfo  *g_dbus_interface_info_lookup_property  (GDBusInterfaceInfo   *info,
196                                                             const gchar          *name) TIZEN_PUBLIC_DEPRECATED_API;
197 GIO_AVAILABLE_IN_ALL
198 void                g_dbus_interface_info_cache_build      (GDBusInterfaceInfo   *info) TIZEN_PUBLIC_DEPRECATED_API;
199 GIO_AVAILABLE_IN_ALL
200 void                g_dbus_interface_info_cache_release    (GDBusInterfaceInfo   *info) TIZEN_PUBLIC_DEPRECATED_API;
201
202 GIO_AVAILABLE_IN_ALL
203 void                g_dbus_interface_info_generate_xml     (GDBusInterfaceInfo   *info,
204                                                             guint                 indent,
205                                                             GString              *string_builder) TIZEN_PUBLIC_DEPRECATED_API;
206
207 GIO_AVAILABLE_IN_ALL
208 GDBusNodeInfo      *g_dbus_node_info_new_for_xml           (const gchar          *xml_data,
209                                                             GError              **error) TIZEN_PUBLIC_DEPRECATED_API;
210 GIO_AVAILABLE_IN_ALL
211 GDBusInterfaceInfo *g_dbus_node_info_lookup_interface      (GDBusNodeInfo        *info,
212                                                             const gchar          *name) TIZEN_PUBLIC_DEPRECATED_API;
213 GIO_AVAILABLE_IN_ALL
214 void                g_dbus_node_info_generate_xml          (GDBusNodeInfo        *info,
215                                                             guint                 indent,
216                                                             GString              *string_builder) TIZEN_PUBLIC_DEPRECATED_API;
217
218 GIO_AVAILABLE_IN_ALL
219 GDBusNodeInfo       *g_dbus_node_info_ref                  (GDBusNodeInfo        *info) TIZEN_PUBLIC_DEPRECATED_API;
220 GIO_AVAILABLE_IN_ALL
221 GDBusInterfaceInfo  *g_dbus_interface_info_ref             (GDBusInterfaceInfo   *info) TIZEN_PUBLIC_DEPRECATED_API;
222 GIO_AVAILABLE_IN_ALL
223 GDBusMethodInfo     *g_dbus_method_info_ref                (GDBusMethodInfo      *info) TIZEN_PUBLIC_DEPRECATED_API;
224 GIO_AVAILABLE_IN_ALL
225 GDBusSignalInfo     *g_dbus_signal_info_ref                (GDBusSignalInfo      *info) TIZEN_PUBLIC_DEPRECATED_API;
226 GIO_AVAILABLE_IN_ALL
227 GDBusPropertyInfo   *g_dbus_property_info_ref              (GDBusPropertyInfo    *info) TIZEN_PUBLIC_DEPRECATED_API;
228 GIO_AVAILABLE_IN_ALL
229 GDBusArgInfo        *g_dbus_arg_info_ref                   (GDBusArgInfo         *info) TIZEN_PUBLIC_DEPRECATED_API;
230 GIO_AVAILABLE_IN_ALL
231 GDBusAnnotationInfo *g_dbus_annotation_info_ref            (GDBusAnnotationInfo  *info) TIZEN_PUBLIC_DEPRECATED_API;
232
233 GIO_AVAILABLE_IN_ALL
234 void                 g_dbus_node_info_unref                (GDBusNodeInfo        *info) TIZEN_PUBLIC_DEPRECATED_API;
235 GIO_AVAILABLE_IN_ALL
236 void                 g_dbus_interface_info_unref           (GDBusInterfaceInfo   *info) TIZEN_PUBLIC_DEPRECATED_API;
237 GIO_AVAILABLE_IN_ALL
238 void                 g_dbus_method_info_unref              (GDBusMethodInfo      *info) TIZEN_PUBLIC_DEPRECATED_API;
239 GIO_AVAILABLE_IN_ALL
240 void                 g_dbus_signal_info_unref              (GDBusSignalInfo      *info) TIZEN_PUBLIC_DEPRECATED_API;
241 GIO_AVAILABLE_IN_ALL
242 void                 g_dbus_property_info_unref            (GDBusPropertyInfo    *info) TIZEN_PUBLIC_DEPRECATED_API;
243 GIO_AVAILABLE_IN_ALL
244 void                 g_dbus_arg_info_unref                 (GDBusArgInfo         *info) TIZEN_PUBLIC_DEPRECATED_API;
245 GIO_AVAILABLE_IN_ALL
246 void                 g_dbus_annotation_info_unref          (GDBusAnnotationInfo  *info) TIZEN_PUBLIC_DEPRECATED_API;
247
248 /**
249  * G_TYPE_DBUS_NODE_INFO:
250  *
251  * The #GType for a boxed type holding a #GDBusNodeInfo.
252  *
253  * Since: 2.26
254  */
255 #define G_TYPE_DBUS_NODE_INFO       (g_dbus_node_info_get_type ())
256
257 /**
258  * G_TYPE_DBUS_INTERFACE_INFO:
259  *
260  * The #GType for a boxed type holding a #GDBusInterfaceInfo.
261  *
262  * Since: 2.26
263  */
264 #define G_TYPE_DBUS_INTERFACE_INFO  (g_dbus_interface_info_get_type ())
265
266 /**
267  * G_TYPE_DBUS_METHOD_INFO:
268  *
269  * The #GType for a boxed type holding a #GDBusMethodInfo.
270  *
271  * Since: 2.26
272  */
273 #define G_TYPE_DBUS_METHOD_INFO     (g_dbus_method_info_get_type ())
274
275 /**
276  * G_TYPE_DBUS_SIGNAL_INFO:
277  *
278  * The #GType for a boxed type holding a #GDBusSignalInfo.
279  *
280  * Since: 2.26
281  */
282 #define G_TYPE_DBUS_SIGNAL_INFO     (g_dbus_signal_info_get_type ())
283
284 /**
285  * G_TYPE_DBUS_PROPERTY_INFO:
286  *
287  * The #GType for a boxed type holding a #GDBusPropertyInfo.
288  *
289  * Since: 2.26
290  */
291 #define G_TYPE_DBUS_PROPERTY_INFO   (g_dbus_property_info_get_type ())
292
293 /**
294  * G_TYPE_DBUS_ARG_INFO:
295  *
296  * The #GType for a boxed type holding a #GDBusArgInfo.
297  *
298  * Since: 2.26
299  */
300 #define G_TYPE_DBUS_ARG_INFO        (g_dbus_arg_info_get_type ())
301
302 /**
303  * G_TYPE_DBUS_ANNOTATION_INFO:
304  *
305  * The #GType for a boxed type holding a #GDBusAnnotationInfo.
306  *
307  * Since: 2.26
308  */
309 #define G_TYPE_DBUS_ANNOTATION_INFO (g_dbus_annotation_info_get_type ())
310
311 GIO_AVAILABLE_IN_ALL
312 GType g_dbus_node_info_get_type       (void) G_GNUC_CONST TIZEN_PUBLIC_DEPRECATED_API;
313 GIO_AVAILABLE_IN_ALL
314 GType g_dbus_interface_info_get_type  (void) G_GNUC_CONST TIZEN_PUBLIC_DEPRECATED_API;
315 GIO_AVAILABLE_IN_ALL
316 GType g_dbus_method_info_get_type     (void) G_GNUC_CONST TIZEN_PUBLIC_DEPRECATED_API;
317 GIO_AVAILABLE_IN_ALL
318 GType g_dbus_signal_info_get_type     (void) G_GNUC_CONST TIZEN_PUBLIC_DEPRECATED_API;
319 GIO_AVAILABLE_IN_ALL
320 GType g_dbus_property_info_get_type   (void) G_GNUC_CONST TIZEN_PUBLIC_DEPRECATED_API;
321 GIO_AVAILABLE_IN_ALL
322 GType g_dbus_arg_info_get_type        (void) G_GNUC_CONST TIZEN_PUBLIC_DEPRECATED_API;
323 GIO_AVAILABLE_IN_ALL
324 GType g_dbus_annotation_info_get_type (void) G_GNUC_CONST TIZEN_PUBLIC_DEPRECATED_API;
325
326 G_END_DECLS
327
328 #endif /* __G_DBUS_INTROSPECTION_H__ */