.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings.  \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
.\" nothing in troff, for use with C<>.
.tr \(*W-
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
.    ds -- \(*W-
.    ds PI pi
.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
.    ds L" ""
.    ds R" ""
.    ds C` ""
.    ds C' ""
'br\}
.el\{\
.    ds -- \|\(em\|
.    ds PI \(*p
.    ds L" ``
.    ds R" ''
.    ds C`
.    ds C'
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\"
.\" If the F register is >0, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD.  Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.\"
.\" Avoid warning from groff about undefined register 'F'.
.de IX
..
.nr rF 0
.if \n(.g .if rF .nr rF 1
.if (\n(rF:(\n(.g==0)) \{\
.    if \nF \{\
.        de IX
.        tm Index:\\$1\t\\n%\t"\\$2"
..
.        if !\nF==2 \{\
.            nr % 0
.            nr F 2
.        \}
.    \}
.\}
.rr rF
.\" ========================================================================
.\"
.IX Title "Net::DBus::Service 3pm"
.TH Net::DBus::Service 3pm "2019-12-26" "perl v5.30.0" "User Contributed Perl Documentation"
.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH "NAME"
Net::DBus::Service \- Provide a service to the bus for clients to use
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
.Vb 1
\&  package main;
\&
\&  use Net::DBus;
\&
\&  # Attach to the bus
\&  my $bus = Net::DBus\->find;
\&
\&  # Acquire a service \*(Aqorg.demo.Hello\*(Aq
\&  my $service = $bus\->export_service("org.demo.Hello");
\&
\&  # Export our object within the service
\&  my $object = Demo::HelloWorld\->new($service);
\&
\&  ....rest of program...
.Ve
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
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.
.SH "METHODS"
.IX Header "METHODS"
.ie n .IP "my $service = Net::DBus::Service\->new($bus, $name);" 4
.el .IP "my \f(CW$service\fR = Net::DBus::Service\->new($bus, \f(CW$name\fR);" 4
.IX Item "my $service = Net::DBus::Service->new($bus, $name);"
Create a new service, attaching to the bus provided in
the \f(CW$bus\fR parameter, which should be an instance of
the Net::DBus object. The \f(CW$name\fR parameter is the
qualified service name. It is not usually necessary to
use this constructor, since services can be created via
the \f(CW\*(C`export_service\*(C'\fR method on the Net::DBus object.
.Sp
When \f(CW$name\fR is not specified or is \f(CW\*(C`undef\*(C'\fR then returned
handle to the service is identified only by the unique name
of client's connection to the bus.
.ie n .IP "my $bus = $service\->get_bus;" 4
.el .IP "my \f(CW$bus\fR = \f(CW$service\fR\->get_bus;" 4
.IX Item "my $bus = $service->get_bus;"
Retrieves the Net::DBus object to which this service is
attached.
.ie n .IP "my $name = $service\->get_service_name" 4
.el .IP "my \f(CW$name\fR = \f(CW$service\fR\->get_service_name" 4
.IX Item "my $name = $service->get_service_name"
Retrieves the qualified name by which this service is
known on the bus.
.SH "AUTHOR"
.IX Header "AUTHOR"
Daniel P. Berrange
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
Copyright (C) 2005\-2011 Daniel P. Berrange
.SH "SEE ALSO"
.IX Header "SEE ALSO"
Net::DBus, Net::DBus::Object, Net::DBus::RemoteService
