man-pages/man3/Net::DBus::Service.3pm.html
2021-03-31 01:06:50 +01:00

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">&nbsp;</A>
<H2>NAME</H2>
Net::DBus::Service - Provide a service to the bus for clients to use
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<PRE>
package main;
use Net::DBus;
# Attach to the bus
my $bus = Net::DBus-&gt;find;
# Acquire a service 'org.demo.Hello'
my $service = $bus-&gt;export_service(&quot;org.demo.Hello&quot;);
# Export our object within the service
my $object = Demo::HelloWorld-&gt;new($service);
....rest of program...
</PRE>
<A NAME="lbAD">&nbsp;</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">&nbsp;</A>
<H2>METHODS</H2>
<DL COMPACT>
<DT id="1">my $service = Net::DBus::Service-&gt;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>&quot;export_service&quot;</TT> method on the Net::DBus object.
<P>
When <TT>$name</TT> is not specified or is <TT>&quot;undef&quot;</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-&gt;get_bus;<DD>
Retrieves the Net::DBus object to which this service is
attached.
<DT id="3">my $name = $service-&gt;get_service_name<DD>
Retrieves the qualified name by which this service is
known on the bus.
</DL>
<A NAME="lbAF">&nbsp;</A>
<H2>AUTHOR</H2>
Daniel P. Berrange
<A NAME="lbAG">&nbsp;</A>
<H2>COPYRIGHT</H2>
Copyright (C) 2005-2011 Daniel P. Berrange
<A NAME="lbAH">&nbsp;</A>
<H2>SEE ALSO</H2>
Net::DBus, Net::DBus::Object, Net::DBus::RemoteService
<P>
<HR>
<A NAME="index">&nbsp;</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>