NAME

App::XScreenSaver::DBus::Saver - implements the "idle inhibition" protocol

VERSION

version 1.0.2

SYNOPSIS

use Net::DBus::Reactor;
use App::XScreenSaver::DBus::InhibitSleep;

my $reactor = Net::DBus::Reactor->new;
my $s = App::XScreenSaver::DBus::Saver->new(reactor => $reactor);
$s->start;

$reactor->run;

ATTRIBUTES

reactor

the event loop

bus

the DBus session bus

dbus_srv

the DBus manager DBus service

dbus_obj

the DBus manager DBus object

service

the DBus service we export

paths

the paths at which we export our DBus object

there's two of them because different applications expect this object at different paths

log

a logger

METHODS

start

Exports our object to the session bus, and starts listening for NameOwnerChanged events.

Those events are emitted when a client attaches or detaches from the bus. A client may die before releasing the idle inhibition, so we want to be notified when that happens, and release that inhibition.

AUTHOR

Gianni Ceccarelli <dakkar@thenautilus.net>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2021 by Gianni Ceccarelli <dakkar@thenautilus.net>.

This is free software, licensed under:

The GNU Affero General Public License, Version 3, November 2007