.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45) .\" .\" 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 .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . 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 >0, 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 .\" ======================================================================== .\" .IX Title "Net::DBus::Binding::PendingCall 3" .TH Net::DBus::Binding::PendingCall 3 2024-09-01 "perl v5.40.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::PendingCall \- A handler for pending method replies .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 2 \& my $call = Net::DBus::Binding::PendingCall\->new(method_call => $call, \& pending_call => $reply); \& \& # Wait for completion \& $call\->block; \& \& # And get the reply message \& my $msg = $call\->get_reply; .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" This object is used when it is necessary to make asynchronous method calls. It provides the means to be notified when the reply is finally received. .SH METHODS .IX Header "METHODS" .ie n .IP "my $call = Net::DBus::Binding::PendingCall\->new(method_call => $method_call, pending_call => $pending_call);" 4 .el .IP "my \f(CW$call\fR = Net::DBus::Binding::PendingCall\->new(method_call => \f(CW$method_call\fR, pending_call => \f(CW$pending_call\fR);" 4 .IX Item "my $call = Net::DBus::Binding::PendingCall->new(method_call => $method_call, pending_call => $pending_call);" Creates a new pending call object, with the \f(CW\*(C`method_call\*(C'\fR parameter being a reference to the \f(CW\*(C`Net::DBus::Binding::Message::MethodCall\*(C'\fR object whose reply is being waiting for. The \f(CW\*(C`pending_call\*(C'\fR parameter is a reference to the raw C pending call object. .ie n .IP $call\->cancel 4 .el .IP \f(CW$call\fR\->cancel 4 .IX Item "$call->cancel" Cancel the pending call, causing any reply that is later received to be discarded. .ie n .IP "my $boolean = $call\->get_completed" 4 .el .IP "my \f(CW$boolean\fR = \f(CW$call\fR\->get_completed" 4 .IX Item "my $boolean = $call->get_completed" Returns a true value if the pending call has received its reply, or a timeout has occurred. .ie n .IP $call\->block 4 .el .IP \f(CW$call\fR\->block 4 .IX Item "$call->block" Block the caller until the reply is received or a timeout occurrs. .ie n .IP "my $msg = $call\->get_reply;" 4 .el .IP "my \f(CW$msg\fR = \f(CW$call\fR\->get_reply;" 4 .IX Item "my $msg = $call->get_reply;" Retrieves the \f(CW\*(C`Net::DBus::Binding::Message\*(C'\fR object associated with the complete call. .ie n .IP $call\->set_notify($coderef); 4 .el .IP \f(CW$call\fR\->set_notify($coderef); 4 .IX Item "$call->set_notify($coderef);" Sets a notification function to be invoked when the pending call completes. The callback will be passed a single argument which is this pending call object. .SH AUTHOR .IX Header "AUTHOR" Daniel P. Berrange .SH COPYRIGHT .IX Header "COPYRIGHT" Copyright (C) 2006\-2011 Daniel P. Berrange .SH "SEE ALSO" .IX Header "SEE ALSO" Net::DBus::Binding::Connection, Net::DBus::Binding::Message, Net::DBus::ASyncReply