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)
43           Return a list of all interfaces provided by the object, which
44           contain a method called $name. This may be an empty list.
45
46       my @interfaces = $ins->has_signal($name)
47           Return a list of all interfaces provided by the object, which
48           contain a signal called $name. This may be an empty list.
49
50       my @interfaces = $ins->has_property($name)
51           Return a list of all interfaces provided by the object, which
52           contain a property called $name. This may be an empty list.
53
54       $ins->add_method($name, $params, $returns, $interface, $attributes,
55       $paramnames, $returnnames);
56           Register the object as providing a method called $name accepting
57           parameters whose types are declared by $params and returning values
58           whose type are declared by $returns. The method will be scoped to
59           the inteface named by $interface. The $attributes parameter is a
60           hash reference for annotating the method. The $paramnames and
61           $returnames parameters are a list of argument and return value
62           names.
63
64       $ins->add_signal($name, $params, $interface, $attributes);
65           Register the object as providing a signal called $name with
66           parameters whose types are declared by $params. The signal will be
67           scoped to the inteface named by $interface. The $attributes
68           parameter is a hash reference for annotating the signal.
69
70       $ins->add_property($name, $type, $access, $interface, $attributes);
71           Register the object as providing a property called $name with a
72           type of $type. The $access parameter can be one of "read", "write",
73           or "readwrite". The property will be scoped to the inteface named
74           by $interface. The $attributes parameter is a hash reference for
75           annotating the signal.
76
77       my $boolean = $ins->is_method_deprecated($name, $interface)
78           Returns a true value if the method called $name in the interface
79           $interface is marked as deprecated
80
81       my $boolean = $ins->is_signal_deprecated($name, $interface)
82           Returns a true value if the signal called $name in the interface
83           $interface is marked as deprecated
84
85       my $boolean = $ins->is_property_deprecated($name, $interface)
86           Returns a true value if the property called $name in the interface
87           $interface is marked as deprecated
88
89       my $boolean = $ins->does_method_reply($name, $interface)
90           Returns a true value if the method called $name in the interface
91           $interface will generate a reply. Returns a false value otherwise.
92
93       my @names = $ins->list_interfaces
94           Returns a list of all interfaces registered as being provided by
95           the object.
96
97       my @names = $ins->list_methods($interface)
98           Returns a list of all methods registered as being provided by the
99           object, within the interface $interface.
100
101       my @names = $ins->list_signals($interface)
102           Returns a list of all signals registered as being provided by the
103           object, within the interface $interface.
104
105       my @names = $ins->list_properties($interface)
106           Returns a list of all properties registered as being provided by
107           the object, within the interface $interface.
108
109       my @paths = $self->list_children;
110           Returns a list of object paths representing all the children of
111           this node.
112
113       my $path = $ins->get_object_path
114           Returns the path of the object associated with this introspection
115           data
116
117       my @types = $ins->get_method_params($interface, $name)
118           Returns a list of declared data types for parameters of the method
119           called $name within the interface $interface.
120
121       my @types = $ins->get_method_param_names($interface, $name)
122           Returns a list of declared names for parameters of the method
123           called $name within the interface $interface.
124
125       my @types = $ins->get_method_returns($interface, $name)
126           Returns a list of declared data types for return values of the
127           method called $name within the interface $interface.
128
129       my @types = $ins->get_method_return_names($interface, $name)
130           Returns a list of declared names for return values of the method
131           called $name within the interface $interface.
132
133       my @types = $ins->get_signal_params($interface, $name)
134           Returns a list of declared data types for values associated with
135           the signal called $name within the interface $interface.
136
137       my @types = $ins->get_signal_param_names($interface, $name)
138           Returns a list of declared names for values associated with the
139           signal called $name within the interface $interface.
140
141       my $type = $ins->get_property_type($interface, $name)
142           Returns the declared data type for property called $name within the
143           interface $interface.
144
145       my $bool = $ins->is_property_readable($interface, $name);
146           Returns a true value if the property called $name within the
147           interface $interface can have its value read.
148
149       my $bool = $ins->is_property_writable($interface, $name);
150           Returns a true value if the property called $name within the
151           interface $interface can have its value written to.
152
153       my $xml = $ins->format([$obj])
154           Return a string containing an XML document representing the state
155           of the introspection data. The optional $obj parameter can be an
156           instance of Net::DBus::Object to include object specific
157           information in the XML (eg child nodes).
158
159       my $xml_fragment = $ins->to_xml
160           Returns a string containing an XML fragment representing the state
161           of the introspection data. This is basically the same as the
162           "format" method, but without the leading doctype declaration.
163
164       $type = $ins->to_xml_type($type)
165           Takes a text-based representation of a data type and returns the
166           compact representation used in XML introspection data.
167
168       $ins->encode($message, $type, $name, $direction, @args)
169           Append a set of values <@args> to a message object $message.  The
170           $type parameter is either "signal" or "method" and $direction is
171           either "params" or "returns". The introspection data will be
172           queried to obtain the declared data types & the argument
173           marshalling accordingly.
174
175       my @args = $ins->decode($message, $type, $name, $direction)
176           Unmarshalls the contents of a message object $message.  The $type
177           parameter is either "signal" or "method" and $direction is either
178           "params" or "returns". The introspection data will be queried to
179           obtain the declared data types & the arguments unmarshalled
180           accordingly.
181

SEE ALSO

183       Net::DBus::Exporter, Net::DBus::Binding::Message
184

AUTHOR

186       Daniel Berrange <dan@berrange.com>
187
189       Copyright 2004 by Daniel Berrange
190
191
192
193perl v5.12.0                      2008-02-21Net::DBus::Binding::Introspector(3)
Impressum