| 1 | /* |
| 2 | SPDX-FileCopyrightText: 2010 Rafael Fernández López <ereslibre@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_BACKENDS_UDEV_PORTABLEMEDIAPLAYER_H |
| 8 | #define SOLID_BACKENDS_UDEV_PORTABLEMEDIAPLAYER_H |
| 9 | |
| 10 | #include "udevdeviceinterface.h" |
| 11 | #include <solid/devices/ifaces/portablemediaplayer.h> |
| 12 | |
| 13 | #include <QStringList> |
| 14 | |
| 15 | namespace Solid |
| 16 | { |
| 17 | namespace Backends |
| 18 | { |
| 19 | namespace UDev |
| 20 | { |
| 21 | class UDevDevice; |
| 22 | |
| 23 | class PortableMediaPlayer : public DeviceInterface, virtual public Solid::Ifaces::PortableMediaPlayer |
| 24 | { |
| 25 | Q_OBJECT |
| 26 | Q_INTERFACES(Solid::Ifaces::PortableMediaPlayer) |
| 27 | |
| 28 | public: |
| 29 | PortableMediaPlayer(UDevDevice *device); |
| 30 | ~PortableMediaPlayer() override; |
| 31 | |
| 32 | QStringList supportedProtocols() const override; |
| 33 | QStringList supportedDrivers(QString protocol = QString()) const override; |
| 34 | QVariant driverHandle(const QString &driver) const override; |
| 35 | |
| 36 | private: |
| 37 | /*! |
| 38 | * Return full absolute path to media-player-info .mpi file, based on ID_MEDIA_PLAYER |
| 39 | * udev property. Does not check for existence. Returns empty string in case no reasonable |
| 40 | * file path could be determined. |
| 41 | */ |
| 42 | QString mediaPlayerInfoFilePath() const; |
| 43 | }; |
| 44 | } |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | #endif // SOLID_BACKENDS_UDEV_PORTABLEMEDIAPLAYER_H |
| 49 | |