Solid

imobileportablemediaplayer.cpp
1/*
2 SPDX-FileCopyrightText: 2020 MBition GmbH
3 SPDX-FileContributor: Kai Uwe Broulik <kai_uwe.broulik@mbition.io>
4
5 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
6*/
7
8#include "imobileportablemediaplayer.h"
9
10#include "imobile.h"
11#include "imobiledevice.h"
12
13using namespace Solid::Backends::IMobile;
14
15PortableMediaPlayer::PortableMediaPlayer(IMobileDevice *device)
16 : DeviceInterface(device)
17{
18}
19
20PortableMediaPlayer::~PortableMediaPlayer()
21{
22}
23
24QStringList PortableMediaPlayer::supportedProtocols() const
25{
26 return {QStringLiteral("afc")};
27}
28
29QStringList PortableMediaPlayer::supportedDrivers(QString protocol) const
30{
31 Q_UNUSED(protocol)
32 return {// libimobiledevice goes via usbmuxd
33 QStringLiteral("usbmux")};
34}
35
36QVariant PortableMediaPlayer::driverHandle(const QString &driver) const
37{
38 if (driver == QLatin1String("usbmux")) {
39 // as per docs "usbmux" should return the device UDID
40 // which we use as part of our UDI
41 return m_device->udi().mid(udiPrefix().length() + 1);
42 }
43
44 return {};
45}
46
47#include "moc_imobileportablemediaplayer.cpp"
QString mid(qsizetype position, qsizetype n) const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:01:48 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.