| 1 | /* |
| 2 | SPDX-FileCopyrightText: 2010 Pino Toscano <pino@kde.org> |
| 3 | |
| 4 | SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL |
| 5 | */ |
| 6 | |
| 7 | #include "udevblock.h" |
| 8 | |
| 9 | using namespace Solid::Backends::UDev; |
| 10 | |
| 11 | Block::Block(UDevDevice *device) |
| 12 | : DeviceInterface(device) |
| 13 | { |
| 14 | } |
| 15 | |
| 16 | Block::~Block() |
| 17 | { |
| 18 | } |
| 19 | |
| 20 | int Block::deviceMajor() const |
| 21 | { |
| 22 | return m_device->property(QStringLiteral("MAJOR" )).toInt(); |
| 23 | } |
| 24 | |
| 25 | int Block::deviceMinor() const |
| 26 | { |
| 27 | return m_device->property(QStringLiteral("MINOR" )).toInt(); |
| 28 | } |
| 29 | |
| 30 | QString Block::device() const |
| 31 | { |
| 32 | return m_device->property(QStringLiteral("DEVNAME" )).toString(); |
| 33 | } |
| 34 | |
| 35 | #include "moc_udevblock.cpp" |
| 36 | |