Net::DB...notation(3)

πŸ’– Net::DBus::Annotation(3) β€” User Contributed Perl Documentation πŸ’–

okay so bestie, this is the manual page for Net::DBus::Annotation, straight outta the User Contributed Perl Documentation. It's giving annotation magic for DBus APIs, and we're gonna read it together fr fr πŸ’…


✨ NAME ✨

Net::DBus::Annotation β€” annotations for changing behaviour of APIs. That's the whole name, no cap.

πŸ¦‹ SYNOPSIS πŸ¦‹

okay so here's the group-chat demo, copied exactly because commands are sacred:

use Net::DBus::Annotation qw(:call);

my $object = $service->get_object("/org/example/systemMonitor");

# Block until processes are listed
my $processes = $object->list_processes("someuser");

# Just throw away list of processes, pretty pointless
# in this example, but useful if the method doesn't have
# a return value
$object->list_processes(dbus_call_noreply, "someuser");

# List processes & get on with other work until
# the list is returned.
my $asyncreply = $object->list_processes(dbus_call_async, "someuser");

... some time later...
my $processes = $asyncreply->get_data;

# List processes, with a shorter 10 second timeout, instead of
# the default 60 seconds
my $object->list_processes(dbus_call_timeout, 10 * 1000, "someuser");

like, dbus_call_noreply says "don't wait for a reply, bestie", dbus_call_async hands you a pending thingy, and dbus_call_timeout lets you set the wait in milliseconds. The code comments said it better, so yeah πŸ’–

🌸 DESCRIPTION 🌸

This module hands you a bunch of annotations that are lowkey useful when you're dealing with the DBus APIs. There are annotations for flipping remote calls between sync, async, and no-reply mode. More annotations may be added over time β€” the devs left the door open, periodt.

πŸ’… METHODS πŸ’…

dbus_call_sync

Requests that a method call be performed synchronously, waiting for the reply or error return to be received before continuing. like, it actually waits, bestie.

dbus_call_async

Requests that a method call be performed a-synchronously, returning a pending call object, which will collect the reply when it eventually arrives. it's giving "go do your thing, I'll catch the reply later" energy.

dbus_call_noreply

Requests that a method call be performed a-synchronously, discarding any possible reply or error message. no reply, no error, no stress β€” just yeet it into the void.

dbus_call_timeout

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. so 10 * 1000 in the synopsis is literally 10 seconds, and the default is 60 seconds β€” the code comments said that, not me.

πŸ‘‘ AUTHOR πŸ‘‘

Daniel Berrange <dan@berrange.com> β€” the author, slay.

Copright (C) 2006-2011, Daniel Berrange. β€” yep, spell it like the original, bestie, typo and all πŸ’€

🌈 SEE ALSO 🌈

  • Net::DBus
  • Net::DBus::RemoteObject

go read those too, bestie, they're literally right there 🫢


πŸ’– cute sign-off: this page came from perl v5.42.0, dated 2019-12-17, and the manual name is Net::DBus::Annotation(3). that's the whole thing β€” bye bestie, go annotate responsibly πŸŽ€βœ¨