Solid

dummyinhibitionjob.cpp
1/*
2 SPDX-FileCopyrightText: 2014 Alejandro Fiestas Olivares <afiestas@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5*/
6
7#include "dummyinhibitionjob.h"
8#include "dummyinhibition.h"
9
10using namespace Solid;
11
12DummyInhibitionJob::DummyInhibitionJob(Power::InhibitionTypes inhibitions, const QString &description, QObject *parent)
13 : AbstractInhibitionJob(parent)
14 , m_inhibitions(inhibitions)
15 , m_description(description)
16{
17}
18
19void DummyInhibitionJob::doStart()
20{
21 emitResult();
22}
23
24Inhibition *DummyInhibitionJob::inhibition()
25{
26 auto dummyInhibition = new DummyInhibition;
27 dummyInhibition->inhibitions = m_inhibitions;
28 dummyInhibition->description = m_description;
29
30 return new Inhibition(dummyInhibition);
31}
32
33#include "moc_dummyinhibitionjob.cpp"
Holds an inhibition.
Definition inhibition.h:27
void emitResult()
Utility function to emit the result signal, and suicide this job.
Definition job.cpp:36
The single responsibility of this class is to create arguments valid for logind Inhibit call.
Definition fakebattery.h:16
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:17:12 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.