.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{ . if \nF \{ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "Net::DBus::Binding::Message 3pm" .TH Net::DBus::Binding::Message 3pm "2014-08-15" "perl v5.20.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Net::DBus::Binding::Message \- Base class for messages .SH "SYNOPSIS" .IX Header "SYNOPSIS" Sending a message .PP .Vb 2 \& my $msg = new Net::DBus::Binding::Message::Signal; \& my $iterator = $msg\->iterator; \& \& $iterator\->append_byte(132); \& $iterator\->append_int32(14241); \& \& $connection\->send($msg); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" 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. .SH "CONSTANTS" .IX Header "CONSTANTS" 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 .IP "\s-1TYPE_ARRAY\s0" 4 .IX Item "TYPE_ARRAY" Constant representing the signature value associated with the array data type. .IP "\s-1TYPE_BOOLEAN\s0" 4 .IX Item "TYPE_BOOLEAN" Constant representing the signature value associated with the boolean data type. .IP "\s-1TYPE_BYTE\s0" 4 .IX Item "TYPE_BYTE" Constant representing the signature value associated with the byte data type. .IP "\s-1TYPE_DICT_ENTRY\s0" 4 .IX Item "TYPE_DICT_ENTRY" Constant representing the signature value associated with the dictionary entry data type. .IP "\s-1TYPE_DOUBLE\s0" 4 .IX Item "TYPE_DOUBLE" Constant representing the signature value associated with the \&\s-1IEEE\s0 double precision floating point data type. .IP "\s-1TYPE_INT16\s0" 4 .IX Item "TYPE_INT16" Constant representing the signature value associated with the signed 16 bit integer data type. .IP "\s-1TYPE_INT32\s0" 4 .IX Item "TYPE_INT32" Constant representing the signature value associated with the signed 32 bit integer data type. .IP "\s-1TYPE_INT64\s0" 4 .IX Item "TYPE_INT64" Constant representing the signature value associated with the signed 64 bit integer data type. .IP "\s-1TYPE_OBJECT_PATH\s0" 4 .IX Item "TYPE_OBJECT_PATH" Constant representing the signature value associated with the object path data type. .IP "\s-1TYPE_STRING\s0" 4 .IX Item "TYPE_STRING" Constant representing the signature value associated with the \&\s-1UTF\-8\s0 string data type. .IP "\s-1TYPE_SIGNATURE\s0" 4 .IX Item "TYPE_SIGNATURE" Constant representing the signature value associated with the signature data type. .IP "\s-1TYPE_STRUCT\s0" 4 .IX Item "TYPE_STRUCT" Constant representing the signature value associated with the struct data type. .IP "\s-1TYPE_UINT16\s0" 4 .IX Item "TYPE_UINT16" Constant representing the signature value associated with the unsigned 16 bit integer data type. .IP "\s-1TYPE_UINT32\s0" 4 .IX Item "TYPE_UINT32" Constant representing the signature value associated with the unsigned 32 bit integer data type. .IP "\s-1TYPE_UINT64\s0" 4 .IX Item "TYPE_UINT64" Constant representing the signature value associated with the unsigned 64 bit integer data type. .IP "\s-1TYPE_VARIANT\s0" 4 .IX Item "TYPE_VARIANT" Constant representing the signature value associated with the variant data type. .SH "METHODS" .IX Header "METHODS" .ie n .IP "my $msg = Net::DBus::Binding::Message\->new(message => $rawmessage);" 4 .el .IP "my \f(CW$msg\fR = Net::DBus::Binding::Message\->new(message => \f(CW$rawmessage\fR);" 4 .IX Item "my $msg = Net::DBus::Binding::Message->new(message => $rawmessage);" Creates a new message object, initializing it with the underlying C message object given by the \f(CW\*(C`message\*(C'\fR 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 .ie n .IP "my $type = $msg\->get_type" 4 .el .IP "my \f(CW$type\fR = \f(CW$msg\fR\->get_type" 4 .IX Item "my $type = $msg->get_type" Retrieves the type code for this message. The returned value corresponds to one of the four \f(CW\*(C`Net::DBus::Binding::Message::MESSAGE_TYPE_*\*(C'\fR constants. .ie n .IP "my $interface = $msg\->get_interface" 4 .el .IP "my \f(CW$interface\fR = \f(CW$msg\fR\->get_interface" 4 .IX Item "my $interface = $msg->get_interface" Retrieves the name of the interface targeted by this message, possibly an empty string if there is no applicable interface for this message. .ie n .IP "my $path = $msg\->get_path" 4 .el .IP "my \f(CW$path\fR = \f(CW$msg\fR\->get_path" 4 .IX Item "my $path = $msg->get_path" Retrieves the object path associated with the message, possibly an empty string if there is no applicable object for this message. .ie n .IP "my $name = $msg\->get_destination" 4 .el .IP "my \f(CW$name\fR = \f(CW$msg\fR\->get_destination" 4 .IX Item "my $name = $msg->get_destination" Retrieves the uniqe 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. .ie n .IP "my $name = $msg\->get_sender" 4 .el .IP "my \f(CW$name\fR = \f(CW$msg\fR\->get_sender" 4 .IX Item "my $name = $msg->get_sender" Retireves the unique name of the client sending the message .ie n .IP "my $serial = $msg\->get_serial" 4 .el .IP "my \f(CW$serial\fR = \f(CW$msg\fR\->get_serial" 4 .IX Item "my $serial = $msg->get_serial" Retrieves the unique serial number of this message. The number is guarenteed 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. .ie n .IP "my $name = $msg\->get_member" 4 .el .IP "my \f(CW$name\fR = \f(CW$msg\fR\->get_member" 4 .IX Item "my $name = $msg->get_member" For method calls, retrieves the name of the method to be invoked, while for signals, retrieves the name of the signal. .ie n .IP "my $sig = $msg\->get_signature" 4 .el .IP "my \f(CW$sig\fR = \f(CW$msg\fR\->get_signature" 4 .IX Item "my $sig = $msg->get_signature" Retrieves a string representing the type signature of the values packed into the body of the message. .ie n .IP "$msg\->set_sender($name)" 4 .el .IP "\f(CW$msg\fR\->set_sender($name)" 4 .IX Item "$msg->set_sender($name)" Set the name of the client sending the message. The name must be the unique name of the client. .ie n .IP "$msg\->set_destination($name)" 4 .el .IP "\f(CW$msg\fR\->set_destination($name)" 4 .IX Item "$msg->set_destination($name)" Set the name of the intended recipient of the message. This is typically used for signals to switch them from broadcast to unicast. .ie n .IP "my $iterator = $msg\->iterator;" 4 .el .IP "my \f(CW$iterator\fR = \f(CW$msg\fR\->iterator;" 4 .IX Item "my $iterator = $msg->iterator;" Retrieves an iterator which can be used for reading or writing fields of the message. The returned object is an instance of the \f(CW\*(C`Net::DBus::Binding::Iterator\*(C'\fR class. .ie n .IP "$boolean = $msg\->\fIget_no_reply()\fR" 4 .el .IP "\f(CW$boolean\fR = \f(CW$msg\fR\->\fIget_no_reply()\fR" 4 .IX Item "$boolean = $msg->get_no_reply()" Gets the flag indicating whether the message is expecting a reply to be sent. .ie n .IP "$msg\->set_no_reply($boolean)" 4 .el .IP "\f(CW$msg\fR\->set_no_reply($boolean)" 4 .IX Item "$msg->set_no_reply($boolean)" 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 .ie n .IP "my @values = $msg\->get_args_list" 4 .el .IP "my \f(CW@values\fR = \f(CW$msg\fR\->get_args_list" 4 .IX Item "my @values = $msg->get_args_list" 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. .ie n .IP "$msg\->append_args_list(@values)" 4 .el .IP "\f(CW$msg\fR\->append_args_list(@values)" 4 .IX Item "$msg->append_args_list(@values)" 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. .SH "AUTHOR" .IX Header "AUTHOR" Daniel P. Berrange .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright (C) 2004\-2011 Daniel P. Berrange .SH "SEE ALSO" .IX Header "SEE ALSO" 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