Net::DBus::Object - Online Linux Manual PageSection : 3pm
Updated : 2020-11-09
Source : perl v5.32.0
Note : User Contributed Perl Documentation
NAMENet::DBus::Object − Implement objects to export to the bus
SYNOPSIS # Connecting an object to the bus, under a service
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...
# Define a new package for the object we're going
# to export
package Demo::HelloWorld;
# Specify the main interface provided by our object
use Net::DBus::Exporter qw(org.example.demo.Greeter);
# We're going to be a DBus object
use base qw(Net::DBus::Object);
# Export a 'Greeting' signal taking a stringl string parameter
dbus_signal("Greeting", ["string"]);
# Export 'Hello' as a method accepting a single string
# parameter, and returning a single string value
dbus_method("Hello", ["string"], ["string"]);
sub new {
my $class = shift;
my $service = shift;
my $self = $class−>SUPER::new($service, "/org/demo/HelloWorld");
bless $self, $class;
return $self;
}
sub Hello {
my $self = shift;
my $name = shift;
$self−>emit_signal("Greeting", "Hello $name");
return "Said hello to $name";
}
# Export 'Goodbye' as a method accepting a single string
# parameter, and returning a single string, but put it
# in the 'org.exaple.demo.Farewell' interface
dbus_method("Goodbye", ["string"], ["string"], "org.example.demo.Farewell");
sub Goodbye {
my $self = shift;
my $name = shift;
$self−>emit_signal("Greeting", "Goodbye $name");
return "Said goodbye to $name";
}
DESCRIPTIONThis the base for implementing objects which are directly exported to the bus. The methods implemented in a subclass are mapped to methods on the bus. By using this class, an application is directly tieing the RPC functionality into its object model. Applications may thus prefer to use the Net::DBus::ProxyObject class which allows the RPC functionality to be maintained separately from the core object model, by proxying RPC method calls.
METHODSmy $object = Net::DBus::Object−>new($service, $path) This creates a new DBus object with an path of $path registered within the service $service. The $path parameter should be a string complying with the usual DBus requirements for object paths, while the $service parameter should be an instance of Net::DBus::Service. The latter is typically obtained by calling the export_service method on the Net::DBus object. my $object = Net::DBus::Object−>new($parentobj, $subpath) This creates a new DBus child object with an path of $subpath relative to its parent $parentobj. The $subpath parameter should be a string complying with the usual DBus requirements for object paths, while the $parentobj parameter should be an instance of Net::DBus::BaseObject or a subclass.
AUTHORDaniel P. Berrange
COPYRIGHTCopyright (C) 2005−2011 Daniel P. Berrange
SEE ALSONet::DBus, Net::DBus::Service, Net::DBus::BaseObject, Net::DBus::ProxyObject, Net::DBus::Exporter, Net::DBus::RemoteObject 0
Johanes Gumabo
Data Size : 10,101 byte
man-Net::DBus::Object.3pmBuild : 2024-12-05, 20:55 :
Visitor Screen : x
Visitor Counter ( page / site ) : 2 / 170,803
Visitor ID : :
Visitor IP : 18.191.44.145 :
Visitor Provider : AMAZON-02 :
Provider Position ( lat x lon ) : 39.962500 x -83.006100 : x
Provider Accuracy Radius ( km ) : 1000 :
Provider City : Columbus :
Provider Province : Ohio , : ,
Provider Country : United States :
Provider Continent : North America :
Visitor Recorder : Version :
Visitor Recorder : Library :
Online Linux Manual Page : Version : Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page : Library : lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page : Library : lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base : Version : Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base : Library : lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36
Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.
ERROR : Need New Coding : (parse_manual_page_|249|Net::DBus::Object.3pm|36/37|el══─{─══.|.el══─{─══. ds -- \|\(em\|
) (htmlprn|149|Net::DBus::Object.3pm|36/37|.el══─{─══. ds -- — |.el══─{─══. ds -- \|\(em\|
) (parse_manual_page_|249|Net::DBus::Object.3pm|43|br══─}─══|'br══─}─══
) (htmlprn|149|Net::DBus::Object.3pm|43|'br══─}─══ |'br══─}─══
)