315 lines
8.1 KiB
HTML
315 lines
8.1 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of Net::DBus::Binding::Message</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>Net::DBus::Binding::Message</H1>
|
|
Section: User Contributed Perl Documentation (3pm)<BR>Updated: 2019-12-26<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
Net::DBus::Binding::Message - Base class for messages
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
|
|
|
|
Sending a message
|
|
<P>
|
|
|
|
|
|
|
|
<PRE>
|
|
my $msg = new Net::DBus::Binding::Message::Signal;
|
|
my $iterator = $msg->iterator;
|
|
|
|
$iterator->append_byte(132);
|
|
$iterator->append_int32(14241);
|
|
|
|
$connection->send($msg);
|
|
|
|
</PRE>
|
|
|
|
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
|
|
|
|
Provides a base class for the different kinds of
|
|
message that can be sent/received. Instances of
|
|
this class are never instantiated directly, rather
|
|
one of the four sub-types Net::DBus::Binding::Message::Signal,
|
|
Net::DBus::Binding::Message::MethodCall, Net::DBus::Binding::Message::MethodReturn,
|
|
Net::DBus::Binding::Message::Error should be used.
|
|
<A NAME="lbAE"> </A>
|
|
<H2>CONSTANTS</H2>
|
|
|
|
|
|
|
|
The following constants are defined in this module. They are
|
|
not exported into the caller's namespace & thus must be referenced
|
|
with their fully qualified package names
|
|
<DL COMPACT>
|
|
<DT id="1"><FONT SIZE="-1">TYPE_ARRAY</FONT><DD>
|
|
|
|
|
|
Constant representing the signature value associated with the
|
|
array data type.
|
|
<DT id="2"><FONT SIZE="-1">TYPE_BOOLEAN</FONT><DD>
|
|
|
|
|
|
Constant representing the signature value associated with the
|
|
boolean data type.
|
|
<DT id="3"><FONT SIZE="-1">TYPE_BYTE</FONT><DD>
|
|
|
|
|
|
Constant representing the signature value associated with the
|
|
byte data type.
|
|
<DT id="4"><FONT SIZE="-1">TYPE_DICT_ENTRY</FONT><DD>
|
|
|
|
|
|
Constant representing the signature value associated with the
|
|
dictionary entry data type.
|
|
<DT id="5"><FONT SIZE="-1">TYPE_DOUBLE</FONT><DD>
|
|
|
|
|
|
Constant representing the signature value associated with the
|
|
<FONT SIZE="-1">IEEE</FONT> double precision floating point data type.
|
|
<DT id="6"><FONT SIZE="-1">TYPE_INT16</FONT><DD>
|
|
|
|
|
|
Constant representing the signature value associated with the
|
|
signed 16 bit integer data type.
|
|
<DT id="7"><FONT SIZE="-1">TYPE_INT32</FONT><DD>
|
|
|
|
|
|
Constant representing the signature value associated with the
|
|
signed 32 bit integer data type.
|
|
<DT id="8"><FONT SIZE="-1">TYPE_INT64</FONT><DD>
|
|
|
|
|
|
Constant representing the signature value associated with the
|
|
signed 64 bit integer data type.
|
|
<DT id="9"><FONT SIZE="-1">TYPE_OBJECT_PATH</FONT><DD>
|
|
|
|
|
|
Constant representing the signature value associated with the
|
|
object path data type.
|
|
<DT id="10"><FONT SIZE="-1">TYPE_STRING</FONT><DD>
|
|
|
|
|
|
Constant representing the signature value associated with the
|
|
<FONT SIZE="-1">UTF-8</FONT> string data type.
|
|
<DT id="11"><FONT SIZE="-1">TYPE_SIGNATURE</FONT><DD>
|
|
|
|
|
|
Constant representing the signature value associated with the
|
|
signature data type.
|
|
<DT id="12"><FONT SIZE="-1">TYPE_STRUCT</FONT><DD>
|
|
|
|
|
|
Constant representing the signature value associated with the
|
|
struct data type.
|
|
<DT id="13"><FONT SIZE="-1">TYPE_UINT16</FONT><DD>
|
|
|
|
|
|
Constant representing the signature value associated with the
|
|
unsigned 16 bit integer data type.
|
|
<DT id="14"><FONT SIZE="-1">TYPE_UINT32</FONT><DD>
|
|
|
|
|
|
Constant representing the signature value associated with the
|
|
unsigned 32 bit integer data type.
|
|
<DT id="15"><FONT SIZE="-1">TYPE_UINT64</FONT><DD>
|
|
|
|
|
|
Constant representing the signature value associated with the
|
|
unsigned 64 bit integer data type.
|
|
<DT id="16"><FONT SIZE="-1">TYPE_VARIANT</FONT><DD>
|
|
|
|
|
|
Constant representing the signature value associated with the
|
|
variant data type.
|
|
<DT id="17"><FONT SIZE="-1">TYPE_UNIX_FD</FONT><DD>
|
|
|
|
|
|
Constant representing the signature value associated with the
|
|
unix file descriptor data type.
|
|
</DL>
|
|
<A NAME="lbAF"> </A>
|
|
<H2>METHODS</H2>
|
|
|
|
|
|
|
|
<DL COMPACT>
|
|
<DT id="18">my $msg = Net::DBus::Binding::Message->new(message => $rawmessage);<DD>
|
|
|
|
|
|
|
|
|
|
Creates a new message object, initializing it with the underlying C
|
|
message object given by the <TT>"message"</TT> object. This constructor is
|
|
intended for internal use only, instead refer to one of the four
|
|
sub-types for this class for specific message types
|
|
<DT id="19">my $type = $msg->get_type<DD>
|
|
|
|
|
|
|
|
|
|
Retrieves the type code for this message. The returned value corresponds
|
|
to one of the four <TT>"Net::DBus::Binding::Message::MESSAGE_TYPE_*"</TT> constants.
|
|
<DT id="20">my $interface = $msg->get_interface<DD>
|
|
|
|
|
|
|
|
|
|
Retrieves the name of the interface targeted by this message, possibly
|
|
an empty string if there is no applicable interface for this message.
|
|
<DT id="21">my $path = $msg->get_path<DD>
|
|
|
|
|
|
|
|
|
|
Retrieves the object path associated with the message, possibly an
|
|
empty string if there is no applicable object for this message.
|
|
<DT id="22">my $name = $msg->get_destination<DD>
|
|
|
|
|
|
|
|
|
|
Retrieves the unique or well-known bus name for client intended to be
|
|
the recipient of the message. Possibly returns an empty string if
|
|
the message is being broadcast to all clients.
|
|
<DT id="23">my $name = $msg->get_sender<DD>
|
|
|
|
|
|
|
|
|
|
Retireves the unique name of the client sending the message
|
|
<DT id="24">my $serial = $msg->get_serial<DD>
|
|
|
|
|
|
|
|
|
|
Retrieves the unique serial number of this message. The number
|
|
is guaranteed unique for as long as the connection over which
|
|
the message was sent remains open. May return zero, if the message
|
|
is yet to be sent.
|
|
<DT id="25">my $name = $msg->get_member<DD>
|
|
|
|
|
|
|
|
|
|
For method calls, retrieves the name of the method to be invoked,
|
|
while for signals, retrieves the name of the signal.
|
|
<DT id="26">my $sig = $msg->get_signature<DD>
|
|
|
|
|
|
|
|
|
|
Retrieves a string representing the type signature of the values
|
|
packed into the body of the message.
|
|
<DT id="27">$msg->set_sender($name)<DD>
|
|
|
|
|
|
|
|
|
|
Set the name of the client sending the message. The name must
|
|
be the unique name of the client.
|
|
<DT id="28">$msg->set_destination($name)<DD>
|
|
|
|
|
|
|
|
|
|
Set the name of the intended recipient of the message. This is
|
|
typically used for signals to switch them from broadcast to
|
|
unicast.
|
|
<DT id="29">my $iterator = $msg->iterator;<DD>
|
|
|
|
|
|
|
|
|
|
Retrieves an iterator which can be used for reading or
|
|
writing fields of the message. The returned object is
|
|
an instance of the <TT>"Net::DBus::Binding::Iterator"</TT> class.
|
|
<DT id="30">$boolean = $msg-><B>get_no_reply()</B><DD>
|
|
|
|
|
|
|
|
|
|
Gets the flag indicating whether the message is expecting
|
|
a reply to be sent.
|
|
<DT id="31">$msg->set_no_reply($boolean)<DD>
|
|
|
|
|
|
|
|
|
|
Toggles the flag indicating whether the message is expecting
|
|
a reply to be sent. All method call messages expect a reply
|
|
by default. By toggling this flag the communication latency
|
|
is reduced by removing the need for the client to wait
|
|
<DT id="32">my @values = $msg->get_args_list<DD>
|
|
|
|
|
|
|
|
|
|
De-marshall all the values in the body of the message, using the
|
|
message signature to identify data types. The values are returned
|
|
as a list.
|
|
<DT id="33">$msg->append_args_list(@values)<DD>
|
|
|
|
|
|
|
|
|
|
Append a set of values to the body of the message. Values will
|
|
be encoded as either a string, list or dictionary as appropriate
|
|
to their Perl data type. For more specific data typing needs,
|
|
the Net::DBus::Binding::Iterator object should be used instead.
|
|
</DL>
|
|
<A NAME="lbAG"> </A>
|
|
<H2>AUTHOR</H2>
|
|
|
|
|
|
|
|
Daniel P. Berrange
|
|
<A NAME="lbAH"> </A>
|
|
<H2>COPYRIGHT</H2>
|
|
|
|
|
|
|
|
Copyright (C) 2004-2011 Daniel P. Berrange
|
|
<A NAME="lbAI"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
|
|
|
|
Net::DBus::Binding::Server, Net::DBus::Binding::Connection, Net::DBus::Binding::Message::Signal, Net::DBus::Binding::Message::MethodCall, Net::DBus::Binding::Message::MethodReturn, Net::DBus::Binding::Message::Error
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="34"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="35"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="36"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="37"><A HREF="#lbAE">CONSTANTS</A><DD>
|
|
<DT id="38"><A HREF="#lbAF">METHODS</A><DD>
|
|
<DT id="39"><A HREF="#lbAG">AUTHOR</A><DD>
|
|
<DT id="40"><A HREF="#lbAH">COPYRIGHT</A><DD>
|
|
<DT id="41"><A HREF="#lbAI">SEE ALSO</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:48 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|