Net::DBus::RemoteService Methods

From Alteeve Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

 AN!Tools :: Net::DBus Binding Tutorial :: Net::DBus::RemoteService Methods

my $bus=Net::DBus->find;
my $service_name="org.tle-bu.demo";

 

new

Usage:

my $owner="";
my $service=Net::DBus::RemoteService->new($bus, $owner, $service_name);

This creates a handle called '$service' to a remote '$service_name' on the given '$bus', owned by '$owner'.

You should not need to call this method directly as this is handled by the get_service method. This way, handles to remote services are cached, preventing repeated retrieval of introspect data.

get_bus

Usage:

my $bus=$service->get_bus;

This returns a handle to the '$bus' that the '$service' is attached to.

get_service_name

Usage:

my $service_name=$service->get_service_name;

This returns the '$service_name' associated with the '$service' handle.

get_owner_name

Usage:

my $owner=$service->get_owner_name;

This returns the '$owner' associated with the '$service' handle.

get_object

Usage:

my $object_path="/path/to/object";
my $interface="";      # Optional, if not the default interface. Do not use below if not set.
my $object=$service->get_object($object_path[, $interface]);

This provides a handle to the remote '$object' at the given '$object_path' provided by the '$service'. When there are multiple interfaces with similar object paths, you can specify which interface to use by providing the optional '$interface' parameter. You will also need to specify an interface if the remote service does not provide introspect data.

 

Any questions, feedback, advice, complaints or meanderings are welcome.
Alteeve's Niche! Enterprise Support:
Alteeve Support
Community Support
© Alteeve's Niche! Inc. 1997-2024   Anvil! "Intelligent Availability®" Platform
legal stuff: All info is provided "As-Is". Do not use anything here unless you are willing and able to take responsibility for your own actions.