Solid

udisksstoragedrive.h
1/*
2 SPDX-FileCopyrightText: 2010 Michael Zanetti <mzanetti@kde.org>
3 SPDX-FileCopyrightText: 2010-2012 Lukáš 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#ifndef UDISKSSTORAGEDRIVE_H
9#define UDISKSSTORAGEDRIVE_H
10
11#include <QDateTime>
12#include <ifaces/storagedrive.h>
13
14#include "../shared/udevqt.h"
15#include <config-solid.h>
16
17#include "udisksblock.h"
18
19namespace Solid
20{
21namespace Backends
22{
23namespace UDisks2
24{
25class StorageDrive : public Block, virtual public Solid::Ifaces::StorageDrive
26{
29
30public:
31 StorageDrive(Device *dev);
32 ~StorageDrive() override;
33
34 qulonglong size() const override;
35 bool isHotpluggable() const override;
36 bool isRemovable() const override;
37 Solid::StorageDrive::DriveType driveType() const override;
38 Solid::StorageDrive::Bus bus() const override;
39 QDateTime timeDetected() const override;
40 QDateTime timeMediaDetected() const override;
41
42private:
43#if UDEV_FOUND
44 UdevQt::Device m_udevDevice;
45#endif
46};
47
48}
49}
50}
51
52#endif // UDISKSSTORAGEDRIVE_H
This device interface is available on storage devices.
DriveType
This enum type defines the type of drive a storage device can be.
Bus
This enum type defines the type of bus a storage device is attached to.
Q_INTERFACES(...)
Q_OBJECTQ_OBJECT
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.