| 1 | /* |
| 2 | SPDX-FileCopyrightText: 2006 Kevin Ottens <ervin@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 "fakecamera.h" |
| 8 | #include <QVariant> |
| 9 | |
| 10 | using namespace Solid::Backends::Fake; |
| 11 | |
| 12 | FakeCamera::FakeCamera(FakeDevice *device) |
| 13 | : FakeDeviceInterface(device) |
| 14 | { |
| 15 | } |
| 16 | |
| 17 | FakeCamera::~FakeCamera() |
| 18 | { |
| 19 | } |
| 20 | |
| 21 | QStringList FakeCamera::supportedProtocols() const |
| 22 | { |
| 23 | QString method = fakeDevice()->property(QStringLiteral("accessMethod" )).toString(); |
| 24 | |
| 25 | return {method}; |
| 26 | } |
| 27 | |
| 28 | QStringList FakeCamera::supportedDrivers(QString /*protocol*/) const |
| 29 | { |
| 30 | if (fakeDevice()->property(QStringLiteral("gphotoSupport" )).toBool()) { |
| 31 | return {QStringLiteral("gphoto" )}; |
| 32 | } |
| 33 | |
| 34 | return {}; |
| 35 | } |
| 36 | |
| 37 | QVariant Solid::Backends::Fake::FakeCamera::driverHandle(const QString &driver) const |
| 38 | { |
| 39 | Q_UNUSED(driver); |
| 40 | return QVariant(); |
| 41 | } |
| 42 | |
| 43 | #include "moc_fakecamera.cpp" |
| 44 | |