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
26 * \inheaderfile Solid/PortableMediaPlayer
27 * \inmodule Solid
28 *
29 * \brief This class implements Portable Media Player device interface and represents
30 * a portable media player attached to the system.
31 *
32 * A portable media player is a portable device able to play multimedia files.
33 *
34 * Some of them have even recording capabilities.
35 */
36class SOLID_EXPORT PortableMediaPlayer : public DeviceInterface
37{
38 Q_OBJECT
39
40 /*!
41 * \property Solid::PortableMediaPlayer::supportedProtocols
42 */
43 Q_PROPERTY(QStringList supportedProtocols READ supportedProtocols)
44
45 /*!
46 * \property Solid::PortableMediaPlayer::supportedDrivers
47 */
48 Q_PROPERTY(QStringList supportedDrivers READ supportedDrivers)
49
50 Q_DECLARE_PRIVATE(PortableMediaPlayer)
51 friend class Device;
52
53public:
54private:
55 /*!
56 * \internal
57 * Creates a new PortableMediaPlayer object.
58 * You generally won't need this. It's created when necessary using
59 * Device::as().
60 *
61 * \a backendObject the device interface object provided by the backend
62 * \sa Solid::Device::as()
63 */
64 SOLID_NO_EXPORT explicit PortableMediaPlayer(QObject *backendObject);
65
66public:
67 ~PortableMediaPlayer() override;
68
69 /*!
70 * Get the Solid::DeviceInterface::Type of the PortableMediaPlayer device interface.
71 *
72 * Returns the PortableMediaPlayer device interface type
73 * \sa Solid::DeviceInterface::Type
74 */
75 static Type deviceInterfaceType()
76 {
77 return DeviceInterface::PortableMediaPlayer;
78 }
79
80 /*!
81 * Retrieves known protocols this device can speak. This list may be dependent
82 * on installed device driver libraries.
83 *
84 * Returns a list of known protocols this device can speak
85 */
86 QStringList supportedProtocols() const;
87
88 /*!
89 * Retrieves known installed device drivers that claim to handle this device
90 * using the requested protocol. If protocol is blank, returns a list of
91 * all drivers supporting the device.
92 *
93 * \a protocol The protocol to get drivers for.
94 *
95 * Returns a list of installed drivers meeting the criteria
96 */
97 QStringList supportedDrivers(QString protocol = QString()) const;
98
99 /*!
100 * Retrieves a \a driver specific string allowing to access the device.
101 *
102 * For example for the "mtp" driver it will return the serial number
103 * of the device.
104 *
105 * Returns the \a driver specific data
106 */
107 QVariant driverHandle(const QString &driver) const;
108};
109}
110
111#endif
112

source code of solid/src/solid/devices/frontend/portablemediaplayer.h