Net::DB...teObject(3)
π¦ NAME π¦
Net::DBus::RemoteObject β Access objects provided on the bus
okay bestie, this is the User Contributed Perl Documentation page for Net::DB...teObject(3) β yes, the title is doing its little truncated thing and we are obsessed. It's the manual for Net::DBus::RemoteObject, aka your cute little handle to remote objects on the bus. π¦
β¨ SYNOPSIS β¨
my $service = $bus->get_service("org.freedesktop.DBus");
my $object = $service->get_object("/org/freedesktop/DBus");
print "Names on the bus {\n";
foreach my $name (sort @{$object->ListNames}) {
print " ", $name, "\n";
}
print "}\n";
πΈ DESCRIPTION πΈ
This module provides the API for accessing remote objects available on the bus. It uses the autoloader to fake the presence of methods based on the API of the remote object. There is also support for setting callbacks against signals, and accessing properties of the object. slay. π
π METHODS π
my $object = Net::DBus::RemoteObject->new($service, $object_path[, $interface], \%params);β Creates a new handle to a remote object. The$serviceparameter is an instance of theNet::DBus::RemoteServicemethod, and$object_pathis the identifier of an object exported by this service, for example"/org/freedesktop/DBus". For remote objects which implement more than one interface it is possible to specify an optional name of an interface as the third parameter. This is only really required, however, if two interfaces in the object provide methods with the same name, since introspection data can be used to automatically resolve the correct interface to call cases where method names are unique. Rather than using this constructor directly, it is preferable to use the"get_object"method onNet::DBus::RemoteService, since this caches handles to remote objects, eliminating unnecessary introspection data lookups.
The %params parameter contains extra configuration parameters for the object. Currently a single parameter is supported, "timeout" which takes a value in milliseconds to use as the timeout for method calls on the object.
my $object = $object->as_interface($interface);β Casts the object to a specific interface, returning a new instance ofNet::DBus::RemoteObjectspecialized to the desired interface. It is only necessary to cast objects to a specific interface, if two interfaces export methods or signals with the same name, or the remote object does not support introspection. πͺmy $service = $object->get_serviceβ Retrieves a handle for the remote service on which this object is attached. The returned object is an instance ofNet::DBus::RemoteService. β¨my $path = $object->get_object_pathβ Retrieves the unique path identifier for this object within the service. π«Άmy $object = $object->get_child_object($subpath, [$interface])β Retrieves a handle to a child of this object, identified by the relative path$subpath. The returned object is an instance of"Net::DBus::RemoteObject". The optional$interfaceparameter can be used to immediately cast the object to a specific type. π§my $sigid = $object->connect_to_signal($name, $coderef);β Connects a callback to a signal emitted by the object. The$nameparameter is the name of the signal within the object, and$coderefis a reference to an anonymous subroutine. When the signal$nameis emitted by the remote object, the subroutine$coderefwill be invoked, and passed the parameters from the signal. A unique$sigidwill be returned, which can be later passed to"disconnect_from_signal"to remove the handler. π₯$object->disconnect_from_signal($name, $sigid);β Disconnects from a signal emitted by the object. The$nameparameter is the name of the signal within the object. The$sigidmust be the unique signal handler ID returned by a previous"connect_to_signal"method call. π
π AUTHOR π
Daniel Berrange <dan@berrange.com>
π COPYRIGHT π
Copright (C) 2004-2011, Daniel Berrange.
yes, it says Copright with the little typo, and we are preserving it exactly β no cap. π
π SEE ALSO π
Net::DBus::RemoteServiceNet::DBus::ObjectNet::DBus::Annotation
okay that's the whole page, bestie! π This cutie was served from perl v5.42.0, dated 2019-12-17, and it's the Net::DB...teObject(3) manual page. bye, go call some bus objects responsibly π«Άβ¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-Net-DBus 1.2.0-160000.2.2 Β· GPL-2.0-or-later
- opensuse-leap 16.0: perl-Net-DBus 1.2.0-160000.2.2 Β· GPL-2.0-or-later
- opensuse-leap 16.0: perl-Net-DBus 1.2.0-160000.2.2 Β· GPL-2.0-or-later
- opensuse-leap 16.0: perl-Net-DBus 1.2.0-160000.2.2 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms