View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Jens Rehsack > Net-Radio-oFono-0.001 > Net::Radio::oFono::Roles::Properties



Annotate this POD

View/Report Bugs
Module Version: 0.001   Source  


Net::Radio::oFono::Roles::Properties - generic property access for remote oFono objects


This package provides a role for being added to classes which need to access properties of remote dbus objects of oFono. Currently no separate role for read-only access is available.


    package Net::Radio::oFono::NewInterface;

    use base qw(Net::Radio::oFono::Helpers::EventMgr? Net::Radio::oFono::Roles::RemoteObj Net::Radio::oFono::Roles::Properties ...);

    use Net::DBus qw(:typing);

    sub new
        my ( $class, %events ) = @_;

        my $self = $class->SUPER::new(%events); # SUPER::new finds first - so EventMgr::new

        bless( $self, $class );


        return $self;

    sub _init
        my $self = $_[0];

        # initialize roles
        $self->Net::Radio::oFono::Roles::RemoteObj::_init( "/modem_0", "org.ofono.NewInterface" ); # must be first one


    sub DESTROY
        my $self = $_[0];

        # destroy roles
        $self->Net::Radio::oFono::Roles::Properties::DESTROY(); # must be last one
        $self->Net::Radio::oFono::Roles::RemoteObj::DESTROY(); # must be last one

        # destroy base class



Following events are triggered by this role:


Triggered when a property has been changed. Submits the name of the changed property to the listener.

ON_PEROPERTY_ . uc($property_name) . _CHANGED

Triggered when a property has been changed. Submits the value of the changed property to the listener.



Initializes the properties api (connects to PropertyChanged signal of remote object).


Callback method used when the signal PropertyChanged is received. Can be overwritten to implement other or enhanced behavior.


Returns the properties of the remote object.

When invoked with a true value as first argument, the properties are refreshed from the remote object.

Returns the properties hash in array more and the reference to the properties hash in scalar mode.


Return cloned properties to avoid dirtying the local cache ...


Returns the requested property of the remote object.

When invoked with a true value as second argument, the properties are refreshed from the remote object.


Sets the specified property of the remote object to the specified value. Note that some values needs special encapsulation using dbus_type(). The property name is automatically encapsulated using dbus_string.

See the appropriate interface documentation in oFono to learn the types to use.


Sets all specified properties using "SetProperty".


Please report any bugs or feature requests to bug-net-radio-ofono at, or through the web interface at I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

If you think you've found a bug then please read "How to Report Bugs Effectively" by Simon Tatham:


You can find documentation for this module with the perldoc command.

    perldoc Net::Radio::oFono

You can also look for information at:

Where can I go for help with a concrete version?

Bugs and feature requests are accepted against the latest version only. To get patches for earlier versions, you need to get an agreement with a developer of your choice - who may or not report the issue and a suggested fix upstream (depends on the license you have chosen).

Business support and maintenance

For business support you can contact Jens via his CPAN email address Please keep in mind that business support is neither available for free nor are you eligible to receive any support based on the license distributed with this package.


At first the guys from the oFono-Team shall be named: Marcel Holtmann and Denis Kenzior, the maintainers and all the people named in ofono/AUTHORS. Without their effort, there would no need for a Net::Radio::oFono module.

Further, Peter "ribasushi" Rabbitson helped a lot by providing hints and support how to make this API accessor a valuable CPAN module.


Jens Rehsack, <rehsack at>


Copyright 2012 Jens Rehsack.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See for more information.

syntax highlighting: