| 1 | /* |
| 2 | SPDX-FileCopyrightText: 2006-2007 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 | #ifndef SOLID_CAMERA_H |
| 8 | #define SOLID_CAMERA_H |
| 9 | |
| 10 | #include <solid/solid_export.h> |
| 11 | |
| 12 | #include <solid/deviceinterface.h> |
| 13 | |
| 14 | #include <QStringList> |
| 15 | #include <QVariant> |
| 16 | |
| 17 | namespace Solid |
| 18 | { |
| 19 | class CameraPrivate; |
| 20 | class Device; |
| 21 | |
| 22 | /*! |
| 23 | * \class Solid::Camera |
| 24 | * \inheaderfile Solid/Camera |
| 25 | * \inmodule Solid |
| 26 | * |
| 27 | * \brief This device interface is available on digital camera devices. |
| 28 | * |
| 29 | * A digital camera is a device used to transform images into |
| 30 | * data. Nowaday most digital cameras are multifunctional and |
| 31 | * able to take photographs, video or sound. On the system side |
| 32 | * they are a particular type of device holding data, the access |
| 33 | * method can be different from the typical storage device, hence |
| 34 | * why it's a separate device interface. |
| 35 | */ |
| 36 | class SOLID_EXPORT Camera : public DeviceInterface |
| 37 | { |
| 38 | Q_OBJECT |
| 39 | |
| 40 | /*! |
| 41 | * \property Solid::Camera::supportedProtocols |
| 42 | */ |
| 43 | Q_PROPERTY(QStringList supportedProtocols READ supportedProtocols) |
| 44 | |
| 45 | /*! |
| 46 | * \property Solid::Camera::supportedDrivers |
| 47 | */ |
| 48 | Q_PROPERTY(QStringList supportedDrivers READ supportedDrivers) |
| 49 | |
| 50 | Q_DECLARE_PRIVATE(Camera) |
| 51 | friend class Device; |
| 52 | |
| 53 | private: |
| 54 | /*! |
| 55 | * \internal |
| 56 | * Creates a new Camera object. |
| 57 | * You generally won't need this. It's created when necessary using |
| 58 | * Device::as(). |
| 59 | * |
| 60 | * \a backendObject the device interface object provided by the backend |
| 61 | * \sa Solid::Device::as() |
| 62 | */ |
| 63 | SOLID_NO_EXPORT explicit Camera(QObject *backendObject); |
| 64 | |
| 65 | public: |
| 66 | ~Camera() override; |
| 67 | |
| 68 | /*! |
| 69 | * Get the Solid::DeviceInterface::Type of the Camera device interface. |
| 70 | * |
| 71 | * Returns the Camera device interface type |
| 72 | * \sa Solid::DeviceInterface::Type |
| 73 | */ |
| 74 | static Type deviceInterfaceType() |
| 75 | { |
| 76 | return DeviceInterface::Camera; |
| 77 | } |
| 78 | |
| 79 | /*! |
| 80 | * Returns known protocols this device can speak. |
| 81 | * |
| 82 | * This list may be dependent |
| 83 | * on installed device driver libraries. |
| 84 | */ |
| 85 | QStringList supportedProtocols() const; |
| 86 | |
| 87 | /*! |
| 88 | * Retrieves known installed device drivers that claim to handle this device |
| 89 | * using the requested protocol. |
| 90 | * |
| 91 | * If protocol is blank, returns a list of |
| 92 | * all drivers supporting the device. |
| 93 | * |
| 94 | * \a protocol The protocol to get drivers for. |
| 95 | * |
| 96 | * Returns a list of installed drivers meeting the criteria |
| 97 | */ |
| 98 | QStringList supportedDrivers(QString protocol = QString()) const; |
| 99 | |
| 100 | /*! |
| 101 | * Retrieves a \a driver specific string allowing to access the device. |
| 102 | * |
| 103 | * For example for the "gphoto" driver it will return a list of the |
| 104 | * form '("usb", vendor_id, product_id)'. |
| 105 | * |
| 106 | * Returns the driver specific data |
| 107 | */ |
| 108 | QVariant driverHandle(const QString &driver) const; |
| 109 | }; |
| 110 | } |
| 111 | |
| 112 | #endif |
| 113 | |