Solid

upowermanager.h
1/*
2 SPDX-FileCopyrightText: 2010 Michael Zanetti <mzanetti@kde.org>
3 SPDX-FileCopyrightText: 2010 Lukas Tinkl <ltinkl@redhat.com>
4
5 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
6
7*/
8
9#ifndef UPOWERMANAGER_H
10#define UPOWERMANAGER_H
11
12#include "solid/devices/ifaces/devicemanager.h"
13#include "upowerdbusinterface.h"
14
15#include <QSet>
16
17namespace Solid
18{
19namespace Backends
20{
21namespace UPower
22{
23class UPowerManager : public Solid::Ifaces::DeviceManager
24{
26
27public:
28 UPowerManager(QObject *parent);
29 ~UPowerManager() override;
30 QObject *createDevice(const QString &udi) override;
31 QStringList devicesFromQuery(const QString &parentUdi, Solid::DeviceInterface::Type type) override;
32 QStringList allDevices() override;
33 QSet<Solid::DeviceInterface::Type> supportedInterfaces() const override;
34 QString udiPrefix() const override;
35
36private Q_SLOTS:
37 void onDeviceAdded(const QDBusObjectPath &path);
38 void onDeviceRemoved(const QDBusObjectPath &path);
39
40private:
41 QSet<Solid::DeviceInterface::Type> m_supportedInterfaces;
42 UPower::DBusInterface m_manager;
43 QStringList m_knownDevices;
44};
45
46}
47}
48}
49#endif // UPOWERMANAGER_H
Type
This enum type defines the type of device interface that a Device can have.
This class specifies the interface a backend will have to implement in order to be used in the system...
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 Sat Dec 21 2024 17:03:23 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.