.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" 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 .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . 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 2024-03-07 "perl v5.38.2" "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