7#include "powerbackendloader.h"
8#include "backends/abstractacpluggedjob.h"
9#include "backends/dummy/dummyacpluggedjob.h"
10#include "backends/dummy/dummyinhibitionjob.h"
11#include "backends/dummy/dummypowernotifier.h"
12#include "backends/dummy/dummyrequeststatejob.h"
13#include "backends/dummy/dummystatesjob.h"
14#include "backends/freedesktop/fdacpluggedjob.h"
15#include "backends/freedesktop/fdinhibitionjob.h"
16#include "backends/freedesktop/fdpowernotifier.h"
20AbstractAcPluggedJob *PowerBackendLoader::AcPluggedJob()
22 if (qgetenv(
"SOLID_POWER_BACKEND") ==
"DUMMY") {
23 return new DummyAcPluggedJob();
25 return new FDAcPluggedJob();
30 if (qgetenv(
"SOLID_POWER_BACKEND") ==
"DUMMY") {
31 return new DummyInhibitionJob(inhibitions, description);
33 return new FdInhibitionJob(inhibitions, description);
36AbstractStatesJob *PowerBackendLoader::statesJob()
38 return new DummyStatesJob();
41AbstractRequestStateJob *PowerBackendLoader::requestState()
43 return new DummyRequestStateJob();
46PowerNotifier *PowerBackendLoader::notifier()
48 if (qgetenv(
"SOLID_POWER_BACKEND") ==
"DUMMY") {
49 return new DummyPowerNotifier();
51 return new FDPowerNotifier();
The single responsibility of this class is to create arguments valid for logind Inhibit call.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 11 2024 12:08:14 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.