man-pages/man3/Net::DBus::Binding::PendingCall.3pm.html
2021-03-31 01:06:50 +01:00

136 lines
3.0 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of Net::DBus::Binding::PendingCall</TITLE>
</HEAD><BODY>
<H1>Net::DBus::Binding::PendingCall</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">&nbsp;</A>
<H2>NAME</H2>
Net::DBus::Binding::PendingCall - A handler for pending method replies
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<PRE>
my $call = Net::DBus::Binding::PendingCall-&gt;new(method_call =&gt; $call,
pending_call =&gt; $reply);
# Wait for completion
$call-&gt;block;
# And get the reply message
my $msg = $call-&gt;get_reply;
</PRE>
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
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.
<A NAME="lbAE">&nbsp;</A>
<H2>METHODS</H2>
<DL COMPACT>
<DT id="1">my $call = Net::DBus::Binding::PendingCall-&gt;new(method_call =&gt; $method_call, pending_call =&gt; $pending_call);<DD>
Creates a new pending call object, with the <TT>&quot;method_call&quot;</TT> parameter
being a reference to the <TT>&quot;Net::DBus::Binding::Message::MethodCall&quot;</TT>
object whose reply is being waiting for. The <TT>&quot;pending_call&quot;</TT> parameter
is a reference to the raw C pending call object.
<DT id="2">$call-&gt;cancel<DD>
Cancel the pending call, causing any reply that is later received
to be discarded.
<DT id="3">my $boolean = $call-&gt;get_completed<DD>
Returns a true value if the pending call has received its reply,
or a timeout has occurred.
<DT id="4">$call-&gt;block<DD>
Block the caller until the reply is received or a timeout
occurrs.
<DT id="5">my $msg = $call-&gt;get_reply;<DD>
Retrieves the <TT>&quot;Net::DBus::Binding::Message&quot;</TT> object associated
with the complete call.
<DT id="6">$call-&gt;set_notify($coderef);<DD>
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.
</DL>
<A NAME="lbAF">&nbsp;</A>
<H2>AUTHOR</H2>
Daniel P. Berrange
<A NAME="lbAG">&nbsp;</A>
<H2>COPYRIGHT</H2>
Copyright (C) 2006-2011 Daniel P. Berrange
<A NAME="lbAH">&nbsp;</A>
<H2>SEE ALSO</H2>
Net::DBus::Binding::Connection, Net::DBus::Binding::Message, Net::DBus::ASyncReply
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="7"><A HREF="#lbAB">NAME</A><DD>
<DT id="8"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="9"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="10"><A HREF="#lbAE">METHODS</A><DD>
<DT id="11"><A HREF="#lbAF">AUTHOR</A><DD>
<DT id="12"><A HREF="#lbAG">COPYRIGHT</A><DD>
<DT id="13"><A HREF="#lbAH">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>