Solid

solid-hardware.h
1/* This file is part of the KDE project
2 SPDX-FileCopyrightText: 2006 Kevin Ottens <ervin@kde.org>
3 SPDX-FileCopyrightText: 2014 Alejandro Fiestas Olivares <afiestas@kde.org>
4
5 SPDX-License-Identifier: LGPL-2.1-or-later
6*/
7
8#ifndef SOLID_HARDWARE_H
9#define SOLID_HARDWARE_H
10
11#include <QCoreApplication>
12#include <QEventLoop>
13
14#include <solid/storageaccess.h>
15
17class SolidHardware : public QCoreApplication
18{
20public:
21 SolidHardware(int &argc, char **argv)
22 : QCoreApplication(argc, argv)
23 , m_error(0)
24 {
25 }
26
27 bool hwList(bool interfaces, bool system);
28 bool hwCapabilities(const QString &udi);
29 bool hwProperties(const QString &udi);
30 bool hwQuery(const QString &parentUdi, const QString &query);
31 bool listen();
32 bool monitor(const QString &udi);
33
34 enum VolumeCallType { Mount, Unmount, Eject, CanCheck, Check, CanRepair, Repair };
35 bool hwVolumeCall(VolumeCallType type, const QString &udi);
36
37private:
38 QEventLoop m_loop;
39 int m_error;
40 QString m_errorString;
41
42private Q_SLOTS:
43 void slotStorageResult(Solid::ErrorType error, const QVariant &errorData);
44 void deviceAdded(const QString &udi);
45 void deviceRemoved(const QString &udi);
46};
47
48#endif // SOLID_HARDWARE_H
Q_OBJECTQ_OBJECT
Q_SLOTSQ_SLOTS
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.