| 1 | /* |
| 2 | SPDX-FileCopyrightText: 2005-2007 Kevin Ottens <ervin@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_DEVICENOTIFIER_H |
| 8 | #define SOLID_DEVICENOTIFIER_H |
| 9 | |
| 10 | #include <QObject> |
| 11 | |
| 12 | #include <solid/solid_export.h> |
| 13 | |
| 14 | namespace Solid |
| 15 | { |
| 16 | /*! |
| 17 | * \class Solid::DeviceNotifier |
| 18 | * \inheaderfile Solid/DeviceNotifier |
| 19 | * \inmodule Solid |
| 20 | * |
| 21 | * \brief This class allow to query the underlying system to obtain information |
| 22 | * about the hardware available. |
| 23 | * |
| 24 | * It's the unique entry point for hardware discovery. Applications should use |
| 25 | * it to find devices, or to be notified about hardware changes. |
| 26 | * |
| 27 | * Note that it's implemented as a singleton and encapsulates the backend logic. |
| 28 | */ |
| 29 | class SOLID_EXPORT DeviceNotifier : public QObject // krazy:exclude=dpointer (interface class) |
| 30 | { |
| 31 | Q_OBJECT |
| 32 | public: |
| 33 | /*! |
| 34 | * |
| 35 | */ |
| 36 | static DeviceNotifier *instance(); |
| 37 | |
| 38 | Q_SIGNALS: |
| 39 | /*! |
| 40 | * This signal is emitted when a new device appears in the underlying system. |
| 41 | * |
| 42 | * \a udi the new device UDI |
| 43 | */ |
| 44 | void deviceAdded(const QString &udi); |
| 45 | |
| 46 | /*! |
| 47 | * This signal is emitted when a device disappears from the underlying system. |
| 48 | * |
| 49 | * \a udi the old device UDI |
| 50 | */ |
| 51 | void deviceRemoved(const QString &udi); |
| 52 | }; |
| 53 | } |
| 54 | |
| 55 | #endif |
| 56 | |