| 1 | /* |
| 2 | SPDX-FileCopyrightText: 2006 Davide Bettio <davide.bettio@kdemail.net> |
| 3 | |
| 4 | SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL |
| 5 | */ |
| 6 | |
| 7 | #include "fakeblock.h" |
| 8 | #include <QVariant> |
| 9 | |
| 10 | using namespace Solid::Backends::Fake; |
| 11 | |
| 12 | FakeBlock::FakeBlock(FakeDevice *device) |
| 13 | : FakeDeviceInterface(device) |
| 14 | { |
| 15 | } |
| 16 | |
| 17 | FakeBlock::~FakeBlock() |
| 18 | { |
| 19 | } |
| 20 | |
| 21 | int FakeBlock::deviceMajor() const |
| 22 | { |
| 23 | return fakeDevice()->property(QStringLiteral("major" )).toInt(); |
| 24 | } |
| 25 | |
| 26 | int FakeBlock::deviceMinor() const |
| 27 | { |
| 28 | return fakeDevice()->property(QStringLiteral("minor" )).toInt(); |
| 29 | } |
| 30 | |
| 31 | QString FakeBlock::device() const |
| 32 | { |
| 33 | return fakeDevice()->property(QStringLiteral("device" )).toString(); |
| 34 | } |
| 35 | |
| 36 | #include "moc_fakeblock.cpp" |
| 37 | |