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

METHODS

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

SEE ALSO

175       Net::DBus::Binding::Server, Net::DBus::Binding::Connection,
176       Net::DBus::Binding::Message::Signal,
177       Net::DBus::Binding::Message::MethodCall,
178       Net::DBus::Binding::Message::MethodReturn,
179       Net::DBus::Binding::Message::Error
180

AUTHOR

182       Daniel Berrange <dan@berrange.com>
183
185       Copyright 2004 by Daniel Berrange
186
187
188
189perl v5.12.0                      2008-02-21    Net::DBus::Binding::Message(3)
Impressum