1Net::DBus::Annotation(3U)ser Contributed Perl DocumentatiNoent::DBus::Annotation(3)
2
3
4
6 Net::DBus::Annotation - annotations for changing behaviour of APIs
7
9 use Net::DBus::Annotation qw(:call);
10
11 my $object = $service->get_object("/org/example/systemMonitor");
12
13 # Block until processes are listed
14 my $processes = $object->list_processes("someuser");
15
16 # Just throw away list of processes, pretty pointless
17 # in this example, but useful if the method doesn't have
18 # a return value
19 $object->list_processes(dbus_call_noreply, "someuser");
20
21 # List processes & get on with other work until
22 # the list is returned.
23 my $asyncreply = $object->list_processes(dbus_call_async, "someuser");
24
25 ... some time later...
26 my $processes = $asyncreply->get_data;
27
28
29 # List processes, with a shorter 10 second timeout, instead of
30 # the default 60 seconds
31 my $object->list_processes(dbus_call_timeout, 10 * 1000, "someuser");
32
34 This module provides a number of annotations which will be useful when
35 dealing with the DBus APIs. There are annotations for switching remote
36 calls between sync, async and no-reply mode. More annotations may be
37 added over time.
38
40 dbus_call_sync
41 Requests that a method call be performed synchronously, waiting for
42 the reply or error return to be received before continuing.
43
44 dbus_call_async
45 Requests that a method call be performed a-synchronously, returning
46 a pending call object, which will collect the reply when it
47 eventually arrives.
48
49 dbus_call_noreply
50 Requests that a method call be performed a-synchronously,
51 discarding any possible reply or error message.
52
53 dbus_call_timeout
54 Indicates that the next parameter for the method call will specify
55 the time to wait for a reply in milliseconds. If omitted, then the
56 default timeout for the object will be used
57
59 Daniel Berrange <dan@berrange.com>
60
62 Copright (C) 2006-2011, Daniel Berrange.
63
65 Net::DBus, Net::DBus::RemoteObject
66
67
68
69perl v5.32.1 2021-01-27 Net::DBus::Annotation(3)