Solid

frontend/portablemediaplayer.h
1/*
2 SPDX-FileCopyrightText: 2006 Davide Bettio <davide.bettio@kdemail.net>
3 SPDX-FileCopyrightText: 2007 Kevin Ottens <ervin@kde.org>
4 SPDX-FileCopyrightText: 2007 Jeff Mitchell <kde-dev@emailgoeshere.com>
5
6 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
7*/
8
9#ifndef SOLID_PORTABLEMEDIAPLAYER_H
10#define SOLID_PORTABLEMEDIAPLAYER_H
11
12#include <QStringList>
13#include <QVariant>
14
15#include <solid/solid_export.h>
16
17#include <solid/deviceinterface.h>
18
19namespace Solid
20{
21class PortableMediaPlayerPrivate;
22class Device;
23
24/**
25 * @class Solid::PortableMediaPlayer portablemediaplayer.h <Solid/PortableMediaPlayer>
26 *
27 * This class implements Portable Media Player device interface and represents
28 * a portable media player attached to the system.
29 * A portable media player is a portable device able to play multimedia files.
30 * Some of them have even recording capabilities.
31 * @author Davide Bettio <davide.bettio@kdemail.net>
32 */
33class SOLID_EXPORT PortableMediaPlayer : public DeviceInterface
34{
35 Q_OBJECT
36 Q_PROPERTY(QStringList supportedProtocols READ supportedProtocols)
37 Q_PROPERTY(QStringList supportedDrivers READ supportedDrivers)
38 Q_DECLARE_PRIVATE(PortableMediaPlayer)
39 friend class Device;
40
41public:
42private:
43 /**
44 * Creates a new PortableMediaPlayer 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 PortableMediaPlayer(QObject *backendObject);
52
53public:
54 /**
55 * Destroys a portable media player object.
56 */
57 ~PortableMediaPlayer() override;
58
59 /**
60 * Get the Solid::DeviceInterface::Type of the PortableMediaPlayer device interface.
61 *
62 * @return the PortableMediaPlayer device interface type
63 * @see Solid::DeviceInterface::Type
64 */
66 {
67 return DeviceInterface::PortableMediaPlayer;
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 "mtp" driver it will return the serial number
92 * of the device.
93 *
94 * @return the driver specific data
95 */
96 QVariant driverHandle(const QString &driver) const;
97};
98}
99
100#endif
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 class implements Portable Media Player device interface and represents a portable media player a...
static Type deviceInterfaceType()
Get the Solid::DeviceInterface::Type of the PortableMediaPlayer device interface.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:14:22 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.