Solid

frontend/genericinterface.h
1 /*
2  SPDX-FileCopyrightText: 2006-2007 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_GENERICINTERFACE_H
8 #define SOLID_GENERICINTERFACE_H
9 
10 #include <QMap>
11 #include <QVariant>
12 
13 #include <solid/solid_export.h>
14 #include <solid/deviceinterface.h>
15 
16 namespace Solid
17 {
18 class GenericInterfacePrivate;
19 class Device;
20 
30 class SOLID_EXPORT GenericInterface : public DeviceInterface
31 {
32  Q_OBJECT
33  Q_DECLARE_PRIVATE(GenericInterface)
34  friend class Device;
35 
36 public:
45  enum PropertyChange { PropertyModified, PropertyAdded, PropertyRemoved };
46  Q_ENUM(PropertyChange)
47 
48 private:
57  explicit GenericInterface(QObject *backendObject);
58 
59 public:
63  virtual ~GenericInterface();
64 
72  {
73  return DeviceInterface::GenericInterface;
74  }
75 
88  QVariant property(const QString &key) const;
89 
100  QMap<QString, QVariant> allProperties() const;
101 
114  bool propertyExists(const QString &key) const;
115 
116 Q_SIGNALS:
125  void propertyChanged(const QMap<QString, int> &changes);
126 
134  void conditionRaised(const QString &condition, const QString &reason);
135 };
136 }
137 
138 #endif
This class allows applications to deal with devices available in the underlying system.
Base class of all the device interfaces.
Type
This enum type defines the type of device interface that a Device can have.
The single responsibility of this class is to create arguments valid for logind Inhibit call...
PropertyChange
This enum type defines the type of change that can occur to a GenericInterface property.
Generic interface to deal with a device.
static Type deviceInterfaceType()
Get the Solid::DeviceInterface::Type of the GenericInterface device interface.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat Sep 19 2020 22:49:46 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.