Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:59:55

0001 /* GDBus - GLib D-Bus Library
0002  *
0003  * Copyright (C) 2008-2010 Red Hat, Inc.
0004  *
0005  * SPDX-License-Identifier: LGPL-2.1-or-later
0006  *
0007  * This library is free software; you can redistribute it and/or
0008  * modify it under the terms of the GNU Lesser General Public
0009  * License as published by the Free Software Foundation; either
0010  * version 2.1 of the License, or (at your option) any later version.
0011  *
0012  * This library is distributed in the hope that it will be useful,
0013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0015  * Lesser General Public License for more details.
0016  *
0017  * You should have received a copy of the GNU Lesser General
0018  * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
0019  *
0020  * Author: David Zeuthen <davidz@redhat.com>
0021  */
0022 
0023 #ifndef __G_DBUS_INTROSPECTION_H__
0024 #define __G_DBUS_INTROSPECTION_H__
0025 
0026 #if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
0027 #error "Only <gio/gio.h> can be included directly."
0028 #endif
0029 
0030 #include <gio/giotypes.h>
0031 
0032 G_BEGIN_DECLS
0033 
0034 /**
0035  * GDBusAnnotationInfo:
0036  * @ref_count: The reference count or -1 if statically allocated.
0037  * @key: The name of the annotation, e.g. "org.freedesktop.DBus.Deprecated".
0038  * @value: The value of the annotation.
0039  * @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
0040  *
0041  * Information about an annotation.
0042  *
0043  * Since: 2.26
0044  */
0045 struct _GDBusAnnotationInfo
0046 {
0047   /*< public >*/
0048   gint                  ref_count;  /* (atomic) */
0049   gchar                *key;
0050   gchar                *value;
0051   GDBusAnnotationInfo **annotations;
0052 };
0053 
0054 /**
0055  * GDBusArgInfo:
0056  * @ref_count: The reference count or -1 if statically allocated.
0057  * @name: Name of the argument, e.g. @unix_user_id.
0058  * @signature: D-Bus signature of the argument (a single complete type).
0059  * @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
0060  *
0061  * Information about an argument for a method or a signal.
0062  *
0063  * Since: 2.26
0064  */
0065 struct _GDBusArgInfo
0066 {
0067   /*< public >*/
0068   gint                  ref_count;  /* (atomic) */
0069   gchar                *name;
0070   gchar                *signature;
0071   GDBusAnnotationInfo **annotations;
0072 };
0073 
0074 /**
0075  * GDBusMethodInfo:
0076  * @ref_count: The reference count or -1 if statically allocated.
0077  * @name: The name of the D-Bus method, e.g. @RequestName.
0078  * @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.
0079  * @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.
0080  * @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
0081  *
0082  * Information about a method on a D-Bus interface.
0083  *
0084  * Since: 2.26
0085  */
0086 struct _GDBusMethodInfo
0087 {
0088   /*< public >*/
0089   gint                  ref_count;  /* (atomic) */
0090   gchar                *name;
0091   GDBusArgInfo        **in_args;
0092   GDBusArgInfo        **out_args;
0093   GDBusAnnotationInfo **annotations;
0094 };
0095 
0096 /**
0097  * GDBusSignalInfo:
0098  * @ref_count: The reference count or -1 if statically allocated.
0099  * @name: The name of the D-Bus signal, e.g. "NameOwnerChanged".
0100  * @args: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusArgInfo structures or %NULL if there are no arguments.
0101  * @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
0102  *
0103  * Information about a signal on a D-Bus interface.
0104  *
0105  * Since: 2.26
0106  */
0107 struct _GDBusSignalInfo
0108 {
0109   /*< public >*/
0110   gint                  ref_count;  /* (atomic) */
0111   gchar                *name;
0112   GDBusArgInfo        **args;
0113   GDBusAnnotationInfo **annotations;
0114 };
0115 
0116 /**
0117  * GDBusPropertyInfo:
0118  * @ref_count: The reference count or -1 if statically allocated.
0119  * @name: The name of the D-Bus property, e.g. "SupportedFilesystems".
0120  * @signature: The D-Bus signature of the property (a single complete type).
0121  * @flags: Access control flags for the property.
0122  * @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
0123  *
0124  * Information about a D-Bus property on a D-Bus interface.
0125  *
0126  * Since: 2.26
0127  */
0128 struct _GDBusPropertyInfo
0129 {
0130   /*< public >*/
0131   gint                      ref_count;  /* (atomic) */
0132   gchar                    *name;
0133   gchar                    *signature;
0134   GDBusPropertyInfoFlags    flags;
0135   GDBusAnnotationInfo     **annotations;
0136 };
0137 
0138 /**
0139  * GDBusInterfaceInfo:
0140  * @ref_count: The reference count or -1 if statically allocated.
0141  * @name: The name of the D-Bus interface, e.g. "org.freedesktop.DBus.Properties".
0142  * @methods: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusMethodInfo structures or %NULL if there are no methods.
0143  * @signals: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusSignalInfo structures or %NULL if there are no signals.
0144  * @properties: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusPropertyInfo structures or %NULL if there are no properties.
0145  * @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
0146  *
0147  * Information about a D-Bus interface.
0148  *
0149  * Since: 2.26
0150  */
0151 struct _GDBusInterfaceInfo
0152 {
0153   /*< public >*/
0154   gint                  ref_count;  /* (atomic) */
0155   gchar                *name;
0156   GDBusMethodInfo     **methods;
0157   GDBusSignalInfo     **signals;
0158   GDBusPropertyInfo   **properties;
0159   GDBusAnnotationInfo **annotations;
0160 };
0161 
0162 /**
0163  * GDBusNodeInfo:
0164  * @ref_count: The reference count or -1 if statically allocated.
0165  * @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.
0166  * @interfaces: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusInterfaceInfo structures or %NULL if there are no interfaces.
0167  * @nodes: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusNodeInfo structures or %NULL if there are no nodes.
0168  * @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
0169  *
0170  * Information about nodes in a remote object hierarchy.
0171  *
0172  * Since: 2.26
0173  */
0174 struct _GDBusNodeInfo
0175 {
0176   /*< public >*/
0177   gint                  ref_count;  /* (atomic) */
0178   gchar                *path;
0179   GDBusInterfaceInfo  **interfaces;
0180   GDBusNodeInfo       **nodes;
0181   GDBusAnnotationInfo **annotations;
0182 };
0183 
0184 GIO_AVAILABLE_IN_ALL
0185 const gchar        *g_dbus_annotation_info_lookup          (GDBusAnnotationInfo **annotations,
0186                                                             const gchar          *name);
0187 GIO_AVAILABLE_IN_ALL
0188 GDBusMethodInfo    *g_dbus_interface_info_lookup_method    (GDBusInterfaceInfo   *info,
0189                                                             const gchar          *name);
0190 GIO_AVAILABLE_IN_ALL
0191 GDBusSignalInfo    *g_dbus_interface_info_lookup_signal    (GDBusInterfaceInfo   *info,
0192                                                             const gchar          *name);
0193 GIO_AVAILABLE_IN_ALL
0194 GDBusPropertyInfo  *g_dbus_interface_info_lookup_property  (GDBusInterfaceInfo   *info,
0195                                                             const gchar          *name);
0196 GIO_AVAILABLE_IN_ALL
0197 void                g_dbus_interface_info_cache_build      (GDBusInterfaceInfo   *info);
0198 GIO_AVAILABLE_IN_ALL
0199 void                g_dbus_interface_info_cache_release    (GDBusInterfaceInfo   *info);
0200 
0201 GIO_AVAILABLE_IN_ALL
0202 void                g_dbus_interface_info_generate_xml     (GDBusInterfaceInfo   *info,
0203                                                             guint                 indent,
0204                                                             GString              *string_builder);
0205 
0206 GIO_AVAILABLE_IN_ALL
0207 GDBusNodeInfo      *g_dbus_node_info_new_for_xml           (const gchar          *xml_data,
0208                                                             GError              **error);
0209 GIO_AVAILABLE_IN_ALL
0210 GDBusInterfaceInfo *g_dbus_node_info_lookup_interface      (GDBusNodeInfo        *info,
0211                                                             const gchar          *name);
0212 GIO_AVAILABLE_IN_ALL
0213 void                g_dbus_node_info_generate_xml          (GDBusNodeInfo        *info,
0214                                                             guint                 indent,
0215                                                             GString              *string_builder);
0216 
0217 GIO_AVAILABLE_IN_ALL
0218 GDBusNodeInfo       *g_dbus_node_info_ref                  (GDBusNodeInfo        *info);
0219 GIO_AVAILABLE_IN_ALL
0220 GDBusInterfaceInfo  *g_dbus_interface_info_ref             (GDBusInterfaceInfo   *info);
0221 GIO_AVAILABLE_IN_ALL
0222 GDBusMethodInfo     *g_dbus_method_info_ref                (GDBusMethodInfo      *info);
0223 GIO_AVAILABLE_IN_ALL
0224 GDBusSignalInfo     *g_dbus_signal_info_ref                (GDBusSignalInfo      *info);
0225 GIO_AVAILABLE_IN_ALL
0226 GDBusPropertyInfo   *g_dbus_property_info_ref              (GDBusPropertyInfo    *info);
0227 GIO_AVAILABLE_IN_ALL
0228 GDBusArgInfo        *g_dbus_arg_info_ref                   (GDBusArgInfo         *info);
0229 GIO_AVAILABLE_IN_ALL
0230 GDBusAnnotationInfo *g_dbus_annotation_info_ref            (GDBusAnnotationInfo  *info);
0231 
0232 GIO_AVAILABLE_IN_ALL
0233 void                 g_dbus_node_info_unref                (GDBusNodeInfo        *info);
0234 GIO_AVAILABLE_IN_ALL
0235 void                 g_dbus_interface_info_unref           (GDBusInterfaceInfo   *info);
0236 GIO_AVAILABLE_IN_ALL
0237 void                 g_dbus_method_info_unref              (GDBusMethodInfo      *info);
0238 GIO_AVAILABLE_IN_ALL
0239 void                 g_dbus_signal_info_unref              (GDBusSignalInfo      *info);
0240 GIO_AVAILABLE_IN_ALL
0241 void                 g_dbus_property_info_unref            (GDBusPropertyInfo    *info);
0242 GIO_AVAILABLE_IN_ALL
0243 void                 g_dbus_arg_info_unref                 (GDBusArgInfo         *info);
0244 GIO_AVAILABLE_IN_ALL
0245 void                 g_dbus_annotation_info_unref          (GDBusAnnotationInfo  *info);
0246 
0247 /**
0248  * G_TYPE_DBUS_NODE_INFO:
0249  *
0250  * The #GType for a boxed type holding a #GDBusNodeInfo.
0251  *
0252  * Since: 2.26
0253  */
0254 #define G_TYPE_DBUS_NODE_INFO       (g_dbus_node_info_get_type ())
0255 
0256 /**
0257  * G_TYPE_DBUS_INTERFACE_INFO:
0258  *
0259  * The #GType for a boxed type holding a #GDBusInterfaceInfo.
0260  *
0261  * Since: 2.26
0262  */
0263 #define G_TYPE_DBUS_INTERFACE_INFO  (g_dbus_interface_info_get_type ())
0264 
0265 /**
0266  * G_TYPE_DBUS_METHOD_INFO:
0267  *
0268  * The #GType for a boxed type holding a #GDBusMethodInfo.
0269  *
0270  * Since: 2.26
0271  */
0272 #define G_TYPE_DBUS_METHOD_INFO     (g_dbus_method_info_get_type ())
0273 
0274 /**
0275  * G_TYPE_DBUS_SIGNAL_INFO:
0276  *
0277  * The #GType for a boxed type holding a #GDBusSignalInfo.
0278  *
0279  * Since: 2.26
0280  */
0281 #define G_TYPE_DBUS_SIGNAL_INFO     (g_dbus_signal_info_get_type ())
0282 
0283 /**
0284  * G_TYPE_DBUS_PROPERTY_INFO:
0285  *
0286  * The #GType for a boxed type holding a #GDBusPropertyInfo.
0287  *
0288  * Since: 2.26
0289  */
0290 #define G_TYPE_DBUS_PROPERTY_INFO   (g_dbus_property_info_get_type ())
0291 
0292 /**
0293  * G_TYPE_DBUS_ARG_INFO:
0294  *
0295  * The #GType for a boxed type holding a #GDBusArgInfo.
0296  *
0297  * Since: 2.26
0298  */
0299 #define G_TYPE_DBUS_ARG_INFO        (g_dbus_arg_info_get_type ())
0300 
0301 /**
0302  * G_TYPE_DBUS_ANNOTATION_INFO:
0303  *
0304  * The #GType for a boxed type holding a #GDBusAnnotationInfo.
0305  *
0306  * Since: 2.26
0307  */
0308 #define G_TYPE_DBUS_ANNOTATION_INFO (g_dbus_annotation_info_get_type ())
0309 
0310 GIO_AVAILABLE_IN_ALL
0311 GType g_dbus_node_info_get_type       (void) G_GNUC_CONST;
0312 GIO_AVAILABLE_IN_ALL
0313 GType g_dbus_interface_info_get_type  (void) G_GNUC_CONST;
0314 GIO_AVAILABLE_IN_ALL
0315 GType g_dbus_method_info_get_type     (void) G_GNUC_CONST;
0316 GIO_AVAILABLE_IN_ALL
0317 GType g_dbus_signal_info_get_type     (void) G_GNUC_CONST;
0318 GIO_AVAILABLE_IN_ALL
0319 GType g_dbus_property_info_get_type   (void) G_GNUC_CONST;
0320 GIO_AVAILABLE_IN_ALL
0321 GType g_dbus_arg_info_get_type        (void) G_GNUC_CONST;
0322 GIO_AVAILABLE_IN_ALL
0323 GType g_dbus_annotation_info_get_type (void) G_GNUC_CONST;
0324 
0325 G_END_DECLS
0326 
0327 #endif /* __G_DBUS_INTROSPECTION_H__ */