File indexing completed on 2024-05-12 04:01:52
0001 /* 0002 SPDX-FileCopyrightText: 2006 Kevin Ottens <ervin@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0005 */ 0006 0007 #ifndef SOLID_IFACES_CAMERA_H 0008 #define SOLID_IFACES_CAMERA_H 0009 0010 #include <solid/devices/ifaces/deviceinterface.h> 0011 0012 #include <QStringList> 0013 0014 namespace Solid 0015 { 0016 namespace Ifaces 0017 { 0018 /** 0019 * This device interface is available on digital camera devices. 0020 * 0021 * A digital camera is a device used to transform images into 0022 * data. Nowaday most digital cameras are multifunctional and 0023 * able to take photographs, video or sound. On the system side 0024 * they are a particular type of device holding data, the access 0025 * method can be different from the typical storage device, hence 0026 * why it's a separate device interface. 0027 */ 0028 class Camera : virtual public DeviceInterface 0029 { 0030 public: 0031 /** 0032 * Destroys a Camera object. 0033 */ 0034 ~Camera() override; 0035 0036 /** 0037 * Retrieves known protocols this device can speak. This list may be dependent 0038 * on installed device driver libraries. 0039 * 0040 * @return a list of known protocols this device can speak 0041 */ 0042 virtual QStringList supportedProtocols() const = 0; 0043 0044 /** 0045 * Retrieves known installed device drivers that claim to handle this device 0046 * using the requested protocol. 0047 * 0048 * @param protocol The protocol to get drivers for. 0049 * @return a list of known device drivers that can handle this device 0050 */ 0051 virtual QStringList supportedDrivers(QString protocol = QString()) const = 0; 0052 0053 /** 0054 * Retrieves a driver specific string allowing to access the device. 0055 * 0056 * For example for the "gphoto" driver it will return a list of the 0057 * form '("usb", vendor_id, product_id)'. 0058 * 0059 * @return the driver specific data 0060 */ 0061 virtual QVariant driverHandle(const QString &driver) const = 0; 0062 }; 0063 } 0064 } 0065 0066 Q_DECLARE_INTERFACE(Solid::Ifaces::Camera, "org.kde.Solid.Ifaces.Camera/0.1") 0067 0068 #endif