1Net::DBus::Binding::MesUssaegre(C3o)ntributed Perl DocumNeentt:a:tDiBouns::Binding::Message(3)
2
3
4

NAME

6       Net::DBus::Binding::Message - Base class for messages
7

SYNOPSIS

9       Sending a message
10
11         my $msg = new Net::DBus::Binding::Message::Signal;
12         my $iterator = $msg->iterator;
13
14         $iterator->append_byte(132);
15         $iterator->append_int32(14241);
16
17         $connection->send($msg);
18

DESCRIPTION

20       Provides a base class for the different kinds of message that can be
21       sent/received. Instances of this class are never instantiated directly,
22       rather one of the four sub-types Net::DBus::Binding::Message::Signal,
23       Net::DBus::Binding::Message::MethodCall, Net::DBus::Binding::Mes‐
24       sage::MethodReturn, Net::DBus::Binding::Message::Error should be used.
25

CONSTANTS

27       The following constants are defined in this module. They are not
28       exported into the caller's namespace & thus must be referenced with
29       their fully qualified package names
30
31       TYPE_ARRAY
32           Constant representing the signature value associated with the array
33           data type.
34
35       TYPE_BOOLEAN
36           Constant representing the signature value associated with the bool‐
37           ean data type.
38
39       TYPE_BYTE
40           Constant representing the signature value associated with the byte
41           data type.
42
43       TYPE_DICT_ENTRY
44           Constant representing the signature value associated with the dic‐
45           tionary entry data type.
46
47       TYPE_DOUBLE
48           Constant representing the signature value associated with the IEEE
49           double precision floating point data type.
50
51       TYPE_INT16
52           Constant representing the signature value associated with the
53           signed 16 bit integer data type.
54
55       TYPE_INT32
56           Constant representing the signature value associated with the
57           signed 32 bit integer data type.
58
59       TYPE_INT64
60           Constant representing the signature value associated with the
61           signed 64 bit integer data type.
62
63       TYPE_OBJECT_PATH
64           Constant representing the signature value associated with the
65           object path data type.
66
67       TYPE_STRING
68           Constant representing the signature value associated with the UTF-8
69           string data type.
70
71       TYPE_SIGNATURE
72           Constant representing the signature value associated with the sig‐
73           nature data type.
74
75       TYPE_STRUCT
76           Constant representing the signature value associated with the
77           struct data type.
78
79       TYPE_UINT16
80           Constant representing the signature value associated with the
81           unsigned 16 bit integer data type.
82
83       TYPE_UINT32
84           Constant representing the signature value associated with the
85           unsigned 32 bit integer data type.
86
87       TYPE_UINT64
88           Constant representing the signature value associated with the
89           unsigned 64 bit integer data type.
90
91       TYPE_VARIANT
92           Constant representing the signature value associated with the vari‐
93           ant data type.
94

METHODS

96       my $msg = Net::DBus::Binding::Message->new(message => $rawmessage);
97           Creates a new message object, initializing it with the underlying C
98           message object given by the "message" object. This constructor is
99           intended for internal use only, instead refer to one of the four
100           sub-types for this class for specific message types
101
102       my $type = $msg->get_type
103           Retrieves the type code for this message. The returned value corre‐
104           sponds to one of the four "Net::DBus::Binding::Message::MES‐
105           SAGE_TYPE_*" constants.
106
107       my $interface = $msg->get_interface
108           Retrieves the name of the interface targetted by this message, pos‐
109           sibly an empty string if there is no applicable interface for this
110           message.
111
112       my $path = $msg->get_path
113           Retrieves the object path associated with the message, possibly an
114           empty string if there is no applicable object for this message.
115
116       my $name = $msg->get_destination
117           Retrieves the uniqe or well-known bus name for client intended to
118           be the recipient of the message. Possibly returns an empty string
119           if the message is being broadcast to all clients.
120
121       my $name = $msg->get_sender
122           Retireves the unique name of the client sending the message
123
124       my $serial = $msg->get_serial
125           Retrieves the unique serial number of this message. The number is
126           guarenteed unique for as long as the connection over which the mes‐
127           sage was sent remains open. May return zero, if the message is yet
128           to be sent.
129
130       my $name = $msg->get_member
131           For method calls, retrieves the name of the method to be invoked,
132           while for signals, retrieves the name of the signal.
133
134       my $sig = $msg->get_signature
135           Retrieves a string representing the type signature of the values
136           packed into the body of the message.
137
138       $msg->set_sender($name)
139           Set the name of the client sending the message. The name must be
140           the unique name of the client.
141
142       $msg->set_destination($name)
143           Set the name of the intended recipient of the message. This is typ‐
144           ically used for signals to switch them from broadcast to unicast.
145
146       my $iterator = $msg->iterator;
147           Retrieves an iterator which can be used for reading or writing
148           fields of the message. The returned object is an instance of the
149           "Net::DBus::Binding::Iterator" class.
150
151       $boolean = $msg->get_no_reply()
152           Gets the flag indicating whether the message is expecting a reply
153           to be sent.
154
155       $msg->set_no_reply($boolean)
156           Toggles the flag indicating whether the message is expecting a
157           reply to be sent. All method call messages expect a reply by
158           default. By toggling this flag the communication latency is reduced
159           by removing the need for the client to wait
160
161       my @values = $msg->get_args_list
162           De-marshall all the values in the body of the message, using the
163           message signature to identify data types. The values are returned
164           as a list.
165
166       $msg->append_args_list(@values)
167           Append a set of values to the body of the message. Values will be
168           encoded as either a string, list or dictionary as appropriate to
169           their Perl data type. For more specific data typing needs, the
170           Net::DBus::Binding::Iterator object should be used instead.
171

SEE ALSO

173       Net::DBus::Binding::Server, Net::DBus::Binding::Connection,
174       Net::DBus::Binding::Message::Signal, Net::DBus::Binding::Mes‐
175       sage::MethodCall, Net::DBus::Binding::Message::MethodReturn,
176       Net::DBus::Binding::Message::Error
177

AUTHOR

179       Daniel Berrange <dan@berrange.com>
180
182       Copyright 2004 by Daniel Berrange
183
184
185
186perl v5.8.8                       2008-02-20    Net::DBus::Binding::Message(3)
Impressum