File indexing completed on 2024-05-26 04:05:35
0001 /* 0002 SPDX-FileCopyrightText: 2010 Rafael Fernández López <ereslibre@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_BACKENDS_UDEV_PORTABLEMEDIAPLAYER_H 0008 #define SOLID_BACKENDS_UDEV_PORTABLEMEDIAPLAYER_H 0009 0010 #include "udevdeviceinterface.h" 0011 #include <solid/devices/ifaces/portablemediaplayer.h> 0012 0013 #include <QStringList> 0014 0015 namespace Solid 0016 { 0017 namespace Backends 0018 { 0019 namespace UDev 0020 { 0021 class UDevDevice; 0022 0023 class PortableMediaPlayer : public DeviceInterface, virtual public Solid::Ifaces::PortableMediaPlayer 0024 { 0025 Q_OBJECT 0026 Q_INTERFACES(Solid::Ifaces::PortableMediaPlayer) 0027 0028 public: 0029 PortableMediaPlayer(UDevDevice *device); 0030 ~PortableMediaPlayer() override; 0031 0032 QStringList supportedProtocols() const override; 0033 QStringList supportedDrivers(QString protocol = QString()) const override; 0034 QVariant driverHandle(const QString &driver) const override; 0035 0036 private: 0037 /** 0038 * Return full absolute path to media-player-info .mpi file, based on ID_MEDIA_PLAYER 0039 * udev property. Does not check for existence. Returns empty string in case no reasonable 0040 * file path could be determined. 0041 */ 0042 QString mediaPlayerInfoFilePath() const; 0043 }; 0044 } 0045 } 0046 } 0047 0048 #endif // SOLID_BACKENDS_UDEV_PORTABLEMEDIAPLAYER_H