Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

net::dbus::callback(3pm) [debian man page]

Net::DBus::Callback(3pm)				User Contributed Perl Documentation				  Net::DBus::Callback(3pm)

NAME
Net::DBus::Callback - a callback for receiving reactor events SYNOPSIS
use Net::DBus::Callback; # Assume we have a 'terminal' object and its got a method # to be invoked everytime there is input on its terminal. # # To create a callback to invoke this method one might use my $cb = Net::DBus::Callback->new(object => $terminal, method => "handle_stdio"); # Whatever is monitoring the stdio channel, would then # invoke the callback, perhaps passing in a parameter with # some 'interesting' data, such as number of bytes available $cb->invoke($nbytes) #... which results in a call to # $terminal->handle_stdio($nbytes) DESCRIPTION
This module provides a simple container for storing details about a callback to be invoked at a later date. It is used when registering to receive events from the Net::DBus::Reactor class. NB use of this module in application code is no longer neccessary and it remains purely for backwards compatability. Instead you can simply pass a subroutine code reference in any place where a callback is desired. METHODS
my $cb = Net::DBus::Callback->new(method => $name, [args => @args]) Creates a new callback object, for invoking a plain old function. The "method" parameter should be the fully qualified function name to invoke, including the package name. The optional "args" parameter is an array reference of parameters to be pass to the callback, in addition to those passed into the "invoke" method. my $cb = Net::DBus::Callback->new(object => $object, method => $name, [args => @args]) Creates a new callback object, for invoking a method on an object. The "method" parameter should be the name of the method to invoke, while the "object" parameter should be a blessed object on which the method will be invoked. The optional "args" parameter is an array reference of parameters to be pass to the callback, in addition to those passed into the "invoke" method. $cb->invoke(@args) Invokes the callback. The argument list passed to the callback is a combination of the arguments supplied in the callback constructor, followed by the arguments supplied in the "invoke" method. AUTHOR
Daniel P. Berrange. COPYRIGHT
Copyright (C) 2004-2011 Daniel P. Berrange SEE ALSO
Net::DBus::Reactor perl v5.14.2 2011-06-30 Net::DBus::Callback(3pm)

Check Out this Related Man Page

Net::DBus::RemoteService(3pm)				User Contributed Perl Documentation			     Net::DBus::RemoteService(3pm)

NAME
Net::DBus::RemoteService - Access services provided on the bus SYNOPSIS
my $bus = Net::DBus->find; my $service = $bus->get_service("org.freedesktop.DBus"); my $object = $service->get_object("/org/freedesktop/DBus"); foreach (@{$object->ListNames}) { print "$_ "; } DESCRIPTION
This object provides a handle to a remote service on the bus. From this handle it is possible to access objects associated with the service. If a service is not running, an attempt will be made to activate it the first time a method is called against one of its objects. METHODS
my $service = Net::DBus::RemoteService->new($bus, $owner, $service_name); Creates a new handle for a remote service. The $bus parameter is an instance of Net::DBus, $owner is the name of the client providing the service, while $service_name is the well known name of the service on the bus. Service names consist of two or more tokens, separated by periods, while the tokens comprise the letters a-z, A-Z, 0-9 and _, for example "org.freedesktop.DBus". There is generally no need to call this constructor, instead the "get_service" method on Net::DBus should be used. This caches handles to remote services, eliminating repeated retrieval of introspection data. my $bus = $service->get_bus; Retrieves a handle for the bus to which this service is attached. The returned object will be an instance of Net::DBus. my $service_name = $service->get_service_name Retrieves the name of the remote service as known to the bus. my $owner_name = $service->get_owner_name; Retrieves the name of the client owning the service at the time it was connected to. my $object = $service->get_object($object_path[, $interface]); Retrieves a handle to the remote object provided by the service with the name of $object_path. If the optional $interface parameter is provided, the object will immediately be cast to the designated interface. NB, it is only neccessary to cast an object to a specific interface if there are multiple interfaces on the object providing methods with the same name, or the remote object does support introspection. The returned object will be an instance of Net::DBus::RemoteObject. AUTHOR
Daniel Berrange <dan@berrange.com> COPYRIGHT
Copright (C) 2004-2011, Daniel Berrange. SEE ALSO
Net::DBus::RemoteObject, Net::DBus::Service, Net::DBus perl v5.14.2 2011-06-30 Net::DBus::RemoteService(3pm)
Man Page