summaryrefslogtreecommitdiff
path: root/gio/src/dbusintrospection.hg
blob: 06ab7b7f5d2343c9c93fcb0113d129994b7e1952 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
/* Copyright (C) 2010 The giomm Development Team
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
 */

_CONFIGINCLUDE(giommconfig.h)

#include <glibmm/refptr.h>
#include <glibmm/value.h>
#include <gio/gio.h>
#include <vector>

_DEFS(giomm,gio)
_PINCLUDE(glibmm/private/object_p.h)

namespace Gio
{

namespace DBus
{

_WRAP_ENUM(PropertyInfoFlags, GDBusPropertyInfoFlags, NO_GTYPE, decl_prefix GIOMM_API)

/** Stores information about an annotation.
 *
 * @newin{2,28}
 * @ingroup DBus
 */
class GIOMM_API AnnotationInfo final
{
  _CLASS_OPAQUE_REFCOUNTED(AnnotationInfo, GDBusAnnotationInfo, NONE, g_dbus_annotation_info_ref, g_dbus_annotation_info_unref, GIOMM_API)
  _IGNORE(g_dbus_annotation_info_ref, g_dbus_annotation_info_unref)

public:
#m4 _CONVERSION(`const std::vector<Glib::RefPtr<AnnotationInfo>>&', `GDBusAnnotationInfo**',`Glib::ArrayHandler<Glib::RefPtr<AnnotationInfo>>::vector_to_array($3).data()')
  _WRAP_METHOD(static Glib::ustring info_lookup(const std::vector<Glib::RefPtr<AnnotationInfo>>&  annotations, const Glib::ustring& name), g_dbus_annotation_info_lookup)
};

/** ArgInfo - Stores information about an argument for a method or a
 * signal.
 *
 * @newin{2,28}
 * @ingroup DBus
 */
class GIOMM_API ArgInfo final
{
  _CLASS_OPAQUE_REFCOUNTED(ArgInfo, GDBusArgInfo, NONE, g_dbus_arg_info_ref, g_dbus_arg_info_unref, GIOMM_API)
  _IGNORE(g_dbus_arg_info_ref, g_dbus_arg_info_unref)

public:
};

/** Stores information about a method on an D-Bus interface.
 *
 * @newin{2,28}
 * @ingroup DBus
 */
class GIOMM_API MethodInfo final
{
  _CLASS_OPAQUE_REFCOUNTED(MethodInfo, GDBusMethodInfo, NONE, g_dbus_method_info_ref, g_dbus_method_info_unref, GIOMM_API)
  _IGNORE(g_dbus_method_info_ref, g_dbus_method_info_unref)

public:
};

/** Stores information about a signal on a D-Bus interface.
 *
 * @newin{2,28}
 * @ingroup DBus
 */
class GIOMM_API SignalInfo final
{
  _CLASS_OPAQUE_REFCOUNTED(SignalInfo, GDBusSignalInfo, NONE, g_dbus_signal_info_ref, g_dbus_signal_info_unref, GIOMM_API)
  _IGNORE(g_dbus_signal_info_ref, g_dbus_signal_info_unref)

public:
};

/** Stores information about a property on a D-Bus interface.
 *
 * @newin{2,28}
 * @ingroup DBus
 */
class GIOMM_API PropertyInfo final
{
  _CLASS_OPAQUE_REFCOUNTED(PropertyInfo, GDBusPropertyInfo, NONE, g_dbus_property_info_ref, g_dbus_property_info_unref, GIOMM_API)
  _IGNORE(g_dbus_property_info_ref, g_dbus_property_info_unref)

public:
};

/** Stores information about a D-Bus interface.
 *
 * @newin{2,28}
 * @ingroup DBus
 */
class GIOMM_API InterfaceInfo final
{
  _CLASS_OPAQUE_REFCOUNTED(InterfaceInfo, GDBusInterfaceInfo, NONE, g_dbus_interface_info_ref, g_dbus_interface_info_unref, GIOMM_API)
  _IS_REFCOUNTED_BOXEDTYPE(g_dbus_interface_info_get_type)
  _IGNORE(g_dbus_interface_info_ref, g_dbus_interface_info_unref)

public:
  _WRAP_METHOD(Glib::RefPtr<MethodInfo> lookup_method(const Glib::ustring& name), g_dbus_interface_info_lookup_method, refreturn)
  _WRAP_METHOD(Glib::RefPtr<const MethodInfo> lookup_method(const Glib::ustring& name) const, g_dbus_interface_info_lookup_method, constversion, refreturn)

  _WRAP_METHOD(Glib::RefPtr<SignalInfo> lookup_signal(const Glib::ustring& name), g_dbus_interface_info_lookup_signal, refreturn)
  _WRAP_METHOD(Glib::RefPtr<const SignalInfo> lookup_signal(const Glib::ustring& name) const, g_dbus_interface_info_lookup_signal, constversion, refreturn)

  _WRAP_METHOD(Glib::RefPtr<PropertyInfo> lookup_property(const Glib::ustring& name), g_dbus_interface_info_lookup_property, refreturn)
  _WRAP_METHOD(Glib::RefPtr<const PropertyInfo> lookup_property(const Glib::ustring& name) const, g_dbus_interface_info_lookup_property, constversion, refreturn)

  _WRAP_METHOD(void cache_build(), g_dbus_interface_info_cache_build, newin "2,44")
  _WRAP_METHOD(void cache_release(), g_dbus_interface_info_cache_release, newin "2,44")

  //TODO: _WRAP_METHOD(void generate_xml(guint indent, GString* string_builder), g_dbus_interface_info_generate_xml)
};

/** NodeInfo - Stores information about nodes in a remote object
 * hierarchy.
 *
 * @newin{2,28}
 * @ingroup DBus
 */
class GIOMM_API NodeInfo final
{
  _CLASS_OPAQUE_REFCOUNTED(NodeInfo, GDBusNodeInfo, NONE, g_dbus_node_info_ref, g_dbus_node_info_unref, GIOMM_API)
  _IGNORE(g_dbus_node_info_ref, g_dbus_node_info_unref)

public:
  _WRAP_METHOD(static Glib::RefPtr<NodeInfo> create_for_xml(const Glib::ustring& xml_data), g_dbus_node_info_new_for_xml, errthrow "Glib::MarkupError")

  _WRAP_METHOD(Glib::RefPtr<InterfaceInfo> lookup_interface(const Glib::ustring& name), g_dbus_node_info_lookup_interface, refreturn)
  _WRAP_METHOD(Glib::RefPtr<const InterfaceInfo> lookup_interface(const Glib::ustring& name) const, g_dbus_node_info_lookup_interface, constversion, refreturn)

  /** Looks up information about the first interface.
   */
  Glib::RefPtr<InterfaceInfo> lookup_interface();

  /** Looks up information about the first interface.
   */
  Glib::RefPtr<const InterfaceInfo> lookup_interface() const;

  //TODO: _WRAP_METHOD(void generate_xml(guint indent, GString* string_builder), g_dbus_node_info_generate_xml)
};

} //namespace DBus

} // namespace Gio