Solid

requeststatejob.h
1 /*
2  SPDX-FileCopyrightText: 2014 Alejandro Fiestas Olivares <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5 */
6 
7 #ifndef SOLID_REQUEST_STATE_JOB_H
8 #define SOLID_REQUEST_STATE_JOB_H
9 
10 #include <Solid/Job>
11 
12 #include "solid_export.h"
13 #include "power.h"
14 
15 namespace Solid
16 {
17 class RequestStateJobPrivate;
29 class SOLID_EXPORT RequestStateJob : public Job
30 {
31  Q_OBJECT
32 
33 public:
34  enum Error {
35  Unsupported = Job::UserDefinedError
36  };
37 
38  explicit RequestStateJob(QObject *parent = nullptr);
39 
40  void setState(Power::InhibitionType state);
41 
42 private Q_SLOTS:
43  void doStart() override;
44 
49 Q_SIGNALS:
50  void result(Solid::Job *);
51 
52 private:
53  Q_DECLARE_PRIVATE(RequestStateJob)
54 };
55 } //Solid namespace
56 #endif //SOLID_REQUEST_STATE_JOB_H
Tries to set the device under the state indicated via setState()
Error
Definition: job.h:46
Subclasses should define error codes starting at this value.
Definition: job.h:50
This class represents an asynchronous job performed by Solid, it is usually not used directly but ins...
Definition: job.h:36
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-2020 The KDE developers.
Generated on Wed Sep 23 2020 22:50:20 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.