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

129 lines
3.2 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of Net::DBus::Annotation</TITLE>
</HEAD><BODY>
<H1>Net::DBus::Annotation</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::Annotation - annotations for changing behaviour of APIs
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<PRE>
use Net::DBus::Annotation qw(:call);
my $object = $service-&gt;get_object(&quot;/org/example/systemMonitor&quot;);
# Block until processes are listed
my $processes = $object-&gt;list_processes(&quot;someuser&quot;);
# Just throw away list of processes, pretty pointless
# in this example, but useful if the method doesn't have
# a return value
$object-&gt;list_processes(dbus_call_noreply, &quot;someuser&quot;);
# List processes &amp; get on with other work until
# the list is returned.
my $asyncreply = $object-&gt;list_processes(dbus_call_async, &quot;someuser&quot;);
... some time later...
my $processes = $asyncreply-&gt;get_data;
# List processes, with a shorter 10 second timeout, instead of
# the default 60 seconds
my $object-&gt;list_processes(dbus_call_timeout, 10 * 1000, &quot;someuser&quot;);
</PRE>
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
This module provides a number of annotations which will be useful
when dealing with the DBus APIs. There are annotations for switching
remote calls between sync, async and no-reply mode. More annotations
may be added over time.
<A NAME="lbAE">&nbsp;</A>
<H2>METHODS</H2>
<DL COMPACT>
<DT id="1">dbus_call_sync<DD>
Requests that a method call be performed synchronously, waiting
for the reply or error return to be received before continuing.
<DT id="2">dbus_call_async<DD>
Requests that a method call be performed a-synchronously, returning
a pending call object, which will collect the reply when it eventually
arrives.
<DT id="3">dbus_call_noreply<DD>
Requests that a method call be performed a-synchronously, discarding
any possible reply or error message.
<DT id="4">dbus_call_timeout<DD>
Indicates that the next parameter for the method call will specify
the time to wait for a reply in milliseconds. If omitted, then the
default timeout for the object will be used
</DL>
<A NAME="lbAF">&nbsp;</A>
<H2>AUTHOR</H2>
Daniel Berrange &lt;<A HREF="mailto:dan@berrange.com">dan@berrange.com</A>&gt;
<A NAME="lbAG">&nbsp;</A>
<H2>COPYRIGHT</H2>
Copright (C) 2006-2011, Daniel Berrange.
<A NAME="lbAH">&nbsp;</A>
<H2>SEE ALSO</H2>
Net::DBus, Net::DBus::RemoteObject
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="5"><A HREF="#lbAB">NAME</A><DD>
<DT id="6"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="7"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="8"><A HREF="#lbAE">METHODS</A><DD>
<DT id="9"><A HREF="#lbAF">AUTHOR</A><DD>
<DT id="10"><A HREF="#lbAG">COPYRIGHT</A><DD>
<DT id="11"><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>