Solid

ifaces/genericinterface.h
1 /*
2  SPDX-FileCopyrightText: 2006 Kevin Ottens <[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_IFACES_GENERICINTERFACE_H
8 #define SOLID_IFACES_GENERICINTERFACE_H
9 
10 #include <QObject>
11 
12 #include <QMap>
13 #include <QVariant>
14 
15 namespace Solid
16 {
17 namespace Ifaces
18 {
29 {
30 public:
34  virtual ~GenericInterface();
35 
42  virtual QVariant property(const QString &key) const = 0;
43 
49  virtual QMap<QString, QVariant> allProperties() const = 0;
50 
57  virtual bool propertyExists(const QString &key) const = 0;
58 
59 protected:
60  //Q_SIGNALS:
69  virtual void propertyChanged(const QMap<QString, int> &changes) = 0;
70 
78  virtual void conditionRaised(const QString &condition, const QString &reason) = 0;
79 };
80 }
81 }
82 
83 Q_DECLARE_INTERFACE(Solid::Ifaces::GenericInterface, "org.kde.Solid.Ifaces.GenericInterface/0.1")
84 
85 #endif
virtual QVariant property(const QString &key) const =0
Retrieves the value of a property.
virtual ~GenericInterface()
Destroys a GenericInterface object.
virtual void conditionRaised(const QString &condition, const QString &reason)=0
This signal is emitted when an event occurred in the device.
virtual void propertyChanged(const QMap< QString, int > &changes)=0
This signal is emitted when a property is changed in the device.
Generic interface to deal with a device.
virtual bool propertyExists(const QString &key) const =0
Tests if a property exist.
The single responsibility of this class is to create arguments valid for logind Inhibit call...
virtual QMap< QString, QVariant > allProperties() const =0
Retrieves all the properties of this device.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Tue Sep 22 2020 22:50:18 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.