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,
24       Net::DBus::Binding::Message::MethodReturn,
25       Net::DBus::Binding::Message::Error should be used.
26

CONSTANTS

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

METHODS

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

AUTHOR

179       Daniel P. Berrange
180
182       Copyright (C) 2004-2011 Daniel P. Berrange
183

SEE ALSO

185       Net::DBus::Binding::Server, Net::DBus::Binding::Connection,
186       Net::DBus::Binding::Message::Signal,
187       Net::DBus::Binding::Message::MethodCall,
188       Net::DBus::Binding::Message::MethodReturn,
189       Net::DBus::Binding::Message::Error
190
191
192
193perl v5.28.0                      2015-03-16    Net::DBus::Binding::Message(3)
Impressum