The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Protocol::DBus::Client::AnyEvent - D-Bus with AnyEvent

SYNOPSIS

The following creates a D-Bus connection, sends two messages, waits for their responses, then ends:

    use experimental 'signatures';

    my $dbus = Protocol::DBus::Client::AnyEvent::system();

    my $cv = AnyEvent->condvar();

    $dbus->initialize()->then(
        sub ($msgr) {
            my $a = $msgr->send_call( .. )->then( sub ($resp) {
                # ..
            } );

            my $b = $msgr->send_call( .. )->then( sub ($resp) {
                # ..
            } );

            return Promise::ES6->all( [$a, $b] );
        },
    )->finally($cv);

    $cv->recv();

DESCRIPTION

This module provides an AnyEvent interface on top of Protocol::DBus::Client. It subclasses Protocol::DBus::Client::EventBase.

STATIC FUNCTIONS

This module provides system() and login_session() functions that parallel their equivalents in Protocol::DBus::Client but return an instance of this class instead.

SEE ALSO

AnyEvent::DBus is an AnyEvent wrapper for Net::DBus.