Solid

frontend/camera.h
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
17namespace Solid
18{
19class CameraPrivate;
20class Device;
21
22/**
23 * @class Solid::Camera camera.h <Solid/Camera>
24 *
25 * This device interface is available on digital camera devices.
26 *
27 * A digital camera is a device used to transform images into
28 * data. Nowaday most digital cameras are multifunctional and
29 * able to take photographs, video or sound. On the system side
30 * they are a particular type of device holding data, the access
31 * method can be different from the typical storage device, hence
32 * why it's a separate device interface.
33 */
34class SOLID_EXPORT Camera : public DeviceInterface
35{
36 Q_OBJECT
37 Q_PROPERTY(QStringList supportedProtocols READ supportedProtocols)
38 Q_PROPERTY(QStringList supportedDrivers READ supportedDrivers)
39 Q_DECLARE_PRIVATE(Camera)
40 friend class Device;
41
42private:
43 /**
44 * Creates a new Camera object.
45 * You generally won't need this. It's created when necessary using
46 * Device::as().
47 *
48 * @param backendObject the device interface object provided by the backend
49 * @see Solid::Device::as()
50 */
51 SOLID_NO_EXPORT explicit Camera(QObject *backendObject);
52
53public:
54 /**
55 * Destroys a Camera object.
56 */
57 ~Camera() override;
58
59 /**
60 * Get the Solid::DeviceInterface::Type of the Camera device interface.
61 *
62 * @return the Camera device interface type
63 * @see Solid::DeviceInterface::Type
64 */
66 {
67 return DeviceInterface::Camera;
68 }
69
70 /**
71 * Retrieves known protocols this device can speak. This list may be dependent
72 * on installed device driver libraries.
73 *
74 * @return a list of known protocols this device can speak
75 */
76 QStringList supportedProtocols() const;
77
78 /**
79 * Retrieves known installed device drivers that claim to handle this device
80 * using the requested protocol. If protocol is blank, returns a list of
81 * all drivers supporting the device.
82 *
83 * @param protocol The protocol to get drivers for.
84 * @return a list of installed drivers meeting the criteria
85 */
86 QStringList supportedDrivers(QString protocol = QString()) const;
87
88 /**
89 * Retrieves a driver specific string allowing to access the device.
90 *
91 * For example for the "gphoto" driver it will return a list of the
92 * form '("usb", vendor_id, product_id)'.
93 *
94 * @return the driver specific data
95 */
96 QVariant driverHandle(const QString &driver) const;
97};
98}
99
100#endif
This device interface is available on digital camera devices.
static Type deviceInterfaceType()
Get the Solid::DeviceInterface::Type of the Camera device interface.
Base class of all the device interfaces.
Type
This enum type defines the type of device interface that a Device can have.
This class allows applications to deal with devices available in the underlying system.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 11:47:35 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.