1Net::DBus::Binding::IntUrsoesrpeCcotnotrr(i3b)uted PerlNDeotc:u:mDeBnutsa:t:iBoinnding::Introspector(3)
2
3
4

NAME

6       Net::DBus::Binding::Introspector - Handler for object introspection
7       data
8

SYNOPSIS

10         # Create an object populating with info from an
11         # XML doc containing introspection data.
12
13         my $ins = Net::DBus::Binding::Introspector->new(xml => $data);
14
15         # Create an object, defining introspection data
16         # programmatically
17         my $ins = Net::DBus::Binding::Introspector->new(object_path => $object->get_object_path);
18         $ins->add_method("DoSomething", ["string"], [], "org.example.MyObject");
19         $ins->add_method("TestSomething", ["int32"], [], "org.example.MyObject");
20

DESCRIPTION

22       This class is responsible for managing introspection data, and
23       answering questions about it. This is not intended for use by
24       application developers, whom should instead consult the higher level
25       API in Net::DBus::Exporter.
26

METHODS

28       my $ins = Net::DBus::Binding::Introspector->new(object_path =>
29       $object_path, xml => $xml);
30           Creates a new introspection data manager for the object registered
31           at the path specified for the "object_path" parameter. The optional
32           "xml" parameter can be used to pre-load the manager with
33           introspection metadata from an XML document.
34
35       $ins->add_interface($name)
36           Register the object as providing an interface with the name $name
37
38       my $bool = $ins->has_interface($name)
39           Return a true value if the object is registered as providing an
40           interface with the name $name; returns false otherwise.
41
42       my @interfaces = $ins->has_method($name, [$interface])
43           Return a list of all interfaces provided by the object, which
44           contain a method called $name. This may be an empty list.  The
45           optional $interface parameter can restrict the check to just that
46           one interface.
47
48       my $boolean = $ins->is_method_allowed($name[, $interface])
49           Checks according to whether the remote caller is allowed to invoke
50           the method $name on the object associated with this introspector.
51           If this object has 'strict exports' enabled, then only explicitly
52           exported methods will be allowed. The optional $interface parameter
53           can restrict the check to just that one interface. Returns a non-
54           zero value if the method should be allowed.
55
56       my @interfaces = $ins->has_signal($name)
57           Return a list of all interfaces provided by the object, which
58           contain a signal called $name. This may be an empty list.
59
60       my @interfaces = $ins->has_property($name)
61           Return a list of all interfaces provided by the object, which
62           contain a property called $name. This may be an empty list.  The
63           optional $interface parameter can restrict the check to just that
64           one interface.
65
66       $ins->add_method($name, $params, $returns, $interface, $attributes,
67       $paramnames, $returnnames);
68           Register the object as providing a method called $name accepting
69           parameters whose types are declared by $params and returning values
70           whose type are declared by $returns. The method will be scoped to
71           the interface named by $interface. The $attributes parameter is a
72           hash reference for annotating the method. The $paramnames and
73           $returnames parameters are a list of argument and return value
74           names.
75
76       $ins->add_signal($name, $params, $interface, $attributes);
77           Register the object as providing a signal called $name with
78           parameters whose types are declared by $params. The signal will be
79           scoped to the interface named by $interface. The $attributes
80           parameter is a hash reference for annotating the signal.
81
82       $ins->add_property($name, $type, $access, $interface, $attributes);
83           Register the object as providing a property called $name with a
84           type of $type. The $access parameter can be one of "read", "write",
85           or "readwrite". The property will be scoped to the interface named
86           by $interface. The $attributes parameter is a hash reference for
87           annotating the signal.
88
89       my $boolean = $ins->is_method_deprecated($name, $interface)
90           Returns a true value if the method called $name in the interface
91           $interface is marked as deprecated
92
93       my $boolean = $ins->is_signal_deprecated($name, $interface)
94           Returns a true value if the signal called $name in the interface
95           $interface is marked as deprecated
96
97       my $boolean = $ins->is_property_deprecated($name, $interface)
98           Returns a true value if the property called $name in the interface
99           $interface is marked as deprecated
100
101       my $boolean = $ins->does_method_reply($name, $interface)
102           Returns a true value if the method called $name in the interface
103           $interface will generate a reply. Returns a false value otherwise.
104
105       my $boolean = $ins->method_has_strict_exceptions($name, $interface)
106           Returns true if the method called $name in the interface $interface
107           has the strict_exceptions attribute; that is any exceptions which
108           aren't Net::DBus::Error objects should not be caught and allowed to
109           travel up the stack.
110
111       my @names = $ins->list_interfaces
112           Returns a list of all interfaces registered as being provided by
113           the object.
114
115       my @names = $ins->list_methods($interface)
116           Returns a list of all methods registered as being provided by the
117           object, within the interface $interface.
118
119       my @names = $ins->list_signals($interface)
120           Returns a list of all signals registered as being provided by the
121           object, within the interface $interface.
122
123       my @names = $ins->list_properties($interface)
124           Returns a list of all properties registered as being provided by
125           the object, within the interface $interface.
126
127       my @paths = $self->list_children;
128           Returns a list of object paths representing all the children of
129           this node.
130
131       my $path = $ins->get_object_path
132           Returns the path of the object associated with this introspection
133           data
134
135       my @types = $ins->get_method_params($interface, $name)
136           Returns a list of declared data types for parameters of the method
137           called $name within the interface $interface.
138
139       my @types = $ins->get_method_param_names($interface, $name)
140           Returns a list of declared names for parameters of the method
141           called $name within the interface $interface.
142
143       my @types = $ins->get_method_returns($interface, $name)
144           Returns a list of declared data types for return values of the
145           method called $name within the interface $interface.
146
147       my @types = $ins->get_method_return_names($interface, $name)
148           Returns a list of declared names for return values of the method
149           called $name within the interface $interface.
150
151       my @types = $ins->get_signal_params($interface, $name)
152           Returns a list of declared data types for values associated with
153           the signal called $name within the interface $interface.
154
155       my @types = $ins->get_signal_param_names($interface, $name)
156           Returns a list of declared names for values associated with the
157           signal called $name within the interface $interface.
158
159       my $type = $ins->get_property_type($interface, $name)
160           Returns the declared data type for property called $name within the
161           interface $interface.
162
163       my $bool = $ins->is_property_readable($interface, $name);
164           Returns a true value if the property called $name within the
165           interface $interface can have its value read.
166
167       my $bool = $ins->is_property_writable($interface, $name);
168           Returns a true value if the property called $name within the
169           interface $interface can have its value written to.
170
171       my $xml = $ins->format([$obj])
172           Return a string containing an XML document representing the state
173           of the introspection data. The optional $obj parameter can be an
174           instance of Net::DBus::Object to include object specific
175           information in the XML (eg child nodes).
176
177       my $xml_fragment = $ins->to_xml
178           Returns a string containing an XML fragment representing the state
179           of the introspection data. This is basically the same as the
180           "format" method, but without the leading doctype declaration.
181
182       $type = $ins->to_xml_type($type)
183           Takes a text-based representation of a data type and returns the
184           compact representation used in XML introspection data.
185
186       $ins->encode($message, $type, $name, $direction, @args)
187           Append a set of values <@args> to a message object $message.  The
188           $type parameter is either "signal" or "method" and $direction is
189           either "params" or "returns". The introspection data will be
190           queried to obtain the declared data types & the argument
191           marshalling accordingly.
192
193       my @args = $ins->decode($message, $type, $name, $direction)
194           Unmarshalls the contents of a message object $message.  The $type
195           parameter is either "signal" or "method" and $direction is either
196           "params" or "returns". The introspection data will be queried to
197           obtain the declared data types & the arguments unmarshalled
198           accordingly.
199

AUTHOR

201       Daniel P. Berrange
202
204       Copyright (C) 2004-2011 Daniel P. Berrange
205

SEE ALSO

207       Net::DBus::Exporter, Net::DBus::Binding::Message
208
209
210
211perl v5.32.0                      2020-07-28Net::DBus::Binding::Introspector(3)
Impressum