Solid

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