Solid

statesjob.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_STATES_JOB_H
8#define SOLID_STATES_JOB_H
9
10#include "power.h"
11#include "solid_export.h"
12
13#include <Solid/Job>
14
15namespace Solid
16{
17class StatesJobPrivate;
18/**
19 * Returns the states supported on the device
20 *
21 * Different devices and different operating systems support
22 * a different set of states such Sleep or Hibernation.
23 *
24 */
25class SOLID_EXPORT StatesJob : public Job
26{
27 Q_OBJECT
28
29public:
30 explicit StatesJob(QObject *parent = nullptr);
31
32 /**
33 * Once the job is finished, returns the supported Power::InhibitionTypes
34 */
35 Power::InhibitionTypes states() const;
36
37private Q_SLOTS:
38 void doStart() override;
39
40 /**
41 * We have to re-declare the signal because
42 * if not, Q_PROPERTY wouldn't work.
43 */
44Q_SIGNALS:
45 void result(Solid::Job *job);
46
47private:
48 Q_DECLARE_PRIVATE(StatesJob)
49};
50} // Solid namespace
51#endif // SOLID_STATES_JOB_H
This class represents an asynchronous job performed by Solid, it is usually not used directly but ins...
Definition job.h:37
Returns the states supported on the device.
Definition statesjob.h:26
void result(Solid::Job *job)
We have to re-declare the signal because if not, Q_PROPERTY wouldn't work.
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.