Solid

fdinhibition.h
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#ifndef SOLID_FD_INHIBITION_H
8#define SOLID_FD_INHIBITION_H
9
10#include "backends/abstractinhibition.h"
11#include "inhibition.h"
12#include "solid/power.h"
13
14#include <QDBusMessage>
15#include <qglobal.h>
16
17namespace Solid
18{
19class FdInhibition : public AbstractInhibition
20{
22public:
23 explicit FdInhibition(Power::InhibitionTypes inhibitions, const QString &description, QObject *parent = nullptr);
24 virtual ~FdInhibition();
25
26 void start() override;
27 void stop() override;
28 Inhibition::State state() const override;
29
30 void setDescription(const QString &description);
31
32private Q_SLOTS:
33 void slotDBusReply(const QDBusMessage &msg);
34 void slotDBusError(const QDBusError &error);
35
36private:
37 void setState(const Inhibition::State &state);
38
39 int m_fd;
40 Inhibition::State m_state;
41 QString m_description;
42 Power::InhibitionTypes m_inhibitions;
43};
44}
45
46#endif // SOLID_FD_INHIBITION_H
The single responsibility of this class is to create arguments valid for logind Inhibit call.
Definition fakebattery.h:16
Q_OBJECTQ_OBJECT
Q_SLOTSQ_SLOTS
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 24 2024 11:56:28 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.