130 lines
2.7 KiB
HTML
130 lines
2.7 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of Net::DBus::Service</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>Net::DBus::Service</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::Service - Provide a service to the bus for clients to use
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
|
|
|
|
|
|
|
|
<PRE>
|
|
package main;
|
|
|
|
use Net::DBus;
|
|
|
|
# Attach to the bus
|
|
my $bus = Net::DBus->find;
|
|
|
|
# Acquire a service 'org.demo.Hello'
|
|
my $service = $bus->export_service("org.demo.Hello");
|
|
|
|
# Export our object within the service
|
|
my $object = Demo::HelloWorld->new($service);
|
|
|
|
....rest of program...
|
|
|
|
</PRE>
|
|
|
|
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
|
|
|
|
This module represents a service which is exported to the message
|
|
bus. Once a service has been exported, it is possible to create
|
|
and export objects to the bus.
|
|
<A NAME="lbAE"> </A>
|
|
<H2>METHODS</H2>
|
|
|
|
|
|
|
|
<DL COMPACT>
|
|
<DT id="1">my $service = Net::DBus::Service->new($bus, $name);<DD>
|
|
|
|
|
|
|
|
|
|
Create a new service, attaching to the bus provided in
|
|
the <TT>$bus</TT> parameter, which should be an instance of
|
|
the Net::DBus object. The <TT>$name</TT> parameter is the
|
|
qualified service name. It is not usually necessary to
|
|
use this constructor, since services can be created via
|
|
the <TT>"export_service"</TT> method on the Net::DBus object.
|
|
|
|
|
|
<P>
|
|
|
|
|
|
When <TT>$name</TT> is not specified or is <TT>"undef"</TT> then returned
|
|
handle to the service is identified only by the unique name
|
|
of client's connection to the bus.
|
|
<DT id="2">my $bus = $service->get_bus;<DD>
|
|
|
|
|
|
|
|
|
|
Retrieves the Net::DBus object to which this service is
|
|
attached.
|
|
<DT id="3">my $name = $service->get_service_name<DD>
|
|
|
|
|
|
|
|
|
|
Retrieves the qualified name by which this service is
|
|
known on the bus.
|
|
</DL>
|
|
<A NAME="lbAF"> </A>
|
|
<H2>AUTHOR</H2>
|
|
|
|
|
|
|
|
Daniel P. Berrange
|
|
<A NAME="lbAG"> </A>
|
|
<H2>COPYRIGHT</H2>
|
|
|
|
|
|
|
|
Copyright (C) 2005-2011 Daniel P. Berrange
|
|
<A NAME="lbAH"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
|
|
|
|
Net::DBus, Net::DBus::Object, Net::DBus::RemoteService
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="4"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="5"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="6"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="7"><A HREF="#lbAE">METHODS</A><DD>
|
|
<DT id="8"><A HREF="#lbAF">AUTHOR</A><DD>
|
|
<DT id="9"><A HREF="#lbAG">COPYRIGHT</A><DD>
|
|
<DT id="10"><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>
|