156 lines
4.3 KiB
HTML
156 lines
4.3 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of Net::DBus::RemoteService</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>Net::DBus::RemoteService</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"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
Net::DBus::RemoteService - Access services provided on the bus
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
|
|
|
|
|
|
|
|
<PRE>
|
|
my $bus = Net::DBus->find;
|
|
my $service = $bus->get_service("org.freedesktop.DBus");
|
|
|
|
my $object = $service->get_object("/org/freedesktop/DBus");
|
|
foreach (@{$object->ListNames}) {
|
|
print "$_\n";
|
|
}
|
|
|
|
</PRE>
|
|
|
|
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
|
|
|
|
This object provides a handle to a remote service on the
|
|
bus. From this handle it is possible to access objects
|
|
associated with the service. If a service is not running,
|
|
an attempt will be made to activate it the first time a
|
|
method is called against one of its objects.
|
|
<A NAME="lbAE"> </A>
|
|
<H2>METHODS</H2>
|
|
|
|
|
|
|
|
<DL COMPACT>
|
|
<DT id="1">my $service = Net::DBus::RemoteService->new($bus, $owner, $service_name);<DD>
|
|
|
|
|
|
|
|
|
|
Creates a new handle for a remote service. The <TT>$bus</TT> parameter is an
|
|
instance of Net::DBus, <TT>$owner</TT> is the name of the client providing the
|
|
service, while <TT>$service_name</TT> is the well known name of the service on
|
|
the bus. Service names consist of two or more tokens, separated
|
|
by periods, while the tokens comprise the letters a-z, A-Z, 0-9 and _,
|
|
for example <TT>"org.freedesktop.DBus"</TT>. There is generally no need to call
|
|
this constructor, instead the <TT>"get_service"</TT> method on Net::DBus should
|
|
be used. This caches handles to remote services, eliminating repeated
|
|
retrieval of introspection data.
|
|
<DT id="2">my $bus = $service->get_bus;<DD>
|
|
|
|
|
|
|
|
|
|
Retrieves a handle for the bus to which this service is attached.
|
|
The returned object will be an instance of Net::DBus.
|
|
<DT id="3">my $service_name = $service->get_service_name<DD>
|
|
|
|
|
|
|
|
|
|
Retrieves the name of the remote service as known to the bus.
|
|
<DT id="4">my $owner_name = $service->get_owner_name;<DD>
|
|
|
|
|
|
|
|
|
|
Retrieves the name of the client owning the service at the
|
|
time it was connected to.
|
|
<DT id="5">my $object = $service->get_object($object_path[, $interface]); =item my $object = $service->get_object($object_path, \%params);<DD>
|
|
|
|
|
|
|
|
|
|
Retrieves a handle to the remote object provided by the service with
|
|
the name of <TT>$object_path</TT>. If the optional <TT>$interface</TT> parameter is
|
|
provided, the object will immediately be cast to the designated
|
|
interface. <FONT SIZE="-1">NB,</FONT> it is only necessary to cast an object to a specific
|
|
interface if there are multiple interfaces on the object providing
|
|
methods with the same name, or the remote object does support
|
|
introspection. The returned object will be an instance of Net::DBus::RemoteObject.
|
|
|
|
|
|
<P>
|
|
|
|
|
|
An alternate form of the method is available, passing a hash reference
|
|
of extra parameters. Valid keys in the hash are <TT>"interface"</TT> specifying
|
|
the interface name to cast to, and <TT>"timeout"</TT> specifying a timeout in
|
|
milliseconds
|
|
<DT id="6">my $timeout = $service->timeout(60 * 1000);<DD>
|
|
|
|
|
|
|
|
|
|
Sets or retrieves the timeout value which will be used for DBus
|
|
requests belongs to this service. The value is in milliseconds.
|
|
If the timeout for a service is undefined, then the default
|
|
timeout from the bus will apply.
|
|
</DL>
|
|
<A NAME="lbAF"> </A>
|
|
<H2>AUTHOR</H2>
|
|
|
|
|
|
|
|
Daniel Berrange <<A HREF="mailto:dan@berrange.com">dan@berrange.com</A>>
|
|
<A NAME="lbAG"> </A>
|
|
<H2>COPYRIGHT</H2>
|
|
|
|
|
|
|
|
Copright (C) 2004-2011, Daniel Berrange.
|
|
<A NAME="lbAH"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
|
|
|
|
Net::DBus::RemoteObject, Net::DBus::Service, Net::DBus
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="7"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="8"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="9"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="10"><A HREF="#lbAE">METHODS</A><DD>
|
|
<DT id="11"><A HREF="#lbAF">AUTHOR</A><DD>
|
|
<DT id="12"><A HREF="#lbAG">COPYRIGHT</A><DD>
|
|
<DT id="13"><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:49 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|