Solid
9#ifndef UDISKSDEVICEBACKEND_H
10#define UDISKSDEVICEBACKEND_H
12#include <QDBusObjectPath>
15#include <QThreadStorage>
25class DeviceBackend :
public QObject
30 static DeviceBackend *backendForUDI(
const QString &udi,
bool create =
true);
31 static void destroyBackend(
const QString &udi);
33 DeviceBackend(
const QString &udi);
34 ~DeviceBackend()
override;
36 QVariant prop(
const QString &key)
const;
37 bool propertyExists(
const QString &key)
const;
38 QVariantMap allProperties()
const;
40 QStringList interfaces()
const;
41 const QString &udi()
const;
43 void invalidateProperties();
45 void propertyChanged(
const QMap<QString, int> &changeMap);
49 void slotInterfacesAdded(
const QDBusObjectPath &object_path,
const VariantMapMap &interfaces_and_properties);
50 void slotInterfacesRemoved(
const QDBusObjectPath &object_path,
const QStringList &interfaces);
51 void slotPropertiesChanged(
const QString &ifaceName,
const QVariantMap &changedProps,
const QStringList &invalidatedProps);
54 void initInterfaces();
55 QString introspect()
const;
56 void checkCache(
const QString &key)
const;
57 void cacheProperty(
const QString &key,
const QVariant &value)
const;
60 mutable QVariantMap m_propertyCache;
61 QStringList m_interfaces;
64 static QThreadStorage<QMap<QString, DeviceBackend *>> s_backends;
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:47:11 by
doxygen 1.13.2 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.