Solid

ifaces/portablemediaplayer.h
1/*
2 SPDX-FileCopyrightText: 2006 Davide Bettio <davide.bettio@kdemail.net>
3 SPDX-FileCopyrightText: 2007 Jeff Mitchell <kde-dev@emailgoeshere.com>
4
5 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
6*/
7
8#ifndef SOLID_IFACES_PORTABLEMEDIAPLAYER_H
9#define SOLID_IFACES_PORTABLEMEDIAPLAYER_H
10
11#include <solid/devices/ifaces/deviceinterface.h>
12#include <solid/portablemediaplayer.h>
13
14namespace Solid
15{
16namespace Ifaces
17{
18/**
19 * This class implements Portable Media Player device interface and represents
20 * a portable media player attached to the system.
21 * A portable media player is a portable device able to play multimedia files.
22 * Some of them have even recording capabilities.
23 * @author Davide Bettio <davide.bettio@kdemail.net>
24 */
26{
27public:
28 /**
29 * Destroys a portable media player object.
30 */
31 ~PortableMediaPlayer() override;
32
33 /**
34 * Retrieves known protocols this device can speak. This list may be dependent
35 * on installed device driver libraries.
36 *
37 * Possible protocols:
38 * * storage - filesystem-based device: can browse and play media files stored
39 * on its volume. iPod-like devices can have both storage and ipod protocol
40 * set, you should use more specific (ipod) protocol in this case.
41 * * ipod - iPod-like device where media files are stored on filesystem, but these need
42 * an entry in device database in order to be playable.
43 * * mtp - Media Transfer Protocol-compatible devices.
44 *
45 * @return a list of known protocols this device can speak
46 */
47 virtual QStringList supportedProtocols() const = 0;
48
49 /**
50 * Retrieves known installed device drivers that claim to handle this device
51 * using the requested protocol.
52 *
53 * Possible drivers:
54 * * usb - device is talked to using USB. This driver alone does not specify which
55 * particular USB service/protocol should be used.
56 * * usbmux - device supports AFC (Apple File Connection) and usbmuxd daemon is ready
57 * on /var/run/usbmuxd socket on UNIX and localhost:27015 port on Windows.
58 *
59 * @param protocol The protocol to get drivers for. Specify empty protocol to get
60 * drivers for all possible protocols.
61 * @return a list of known device drivers that can handle this device
62 */
63 virtual QStringList supportedDrivers(QString protocol = QString()) const = 0;
64
65 /**
66 * Retrieves a driver specific string allowing to access the device.
67 *
68 * For example for the "mtp" driver it will return the serial number
69 * of the device and "usbmux" driver will return 40-digit device UUID
70 *
71 * @return the driver specific data
72 */
73 virtual QVariant driverHandle(const QString &driver) const = 0;
74};
75}
76}
77
78Q_DECLARE_INTERFACE(Solid::Ifaces::PortableMediaPlayer, "org.kde.Solid.Ifaces.PortableMediaPlayer/0.1")
79
80#endif
Base interface of all the device interfaces.
This class implements Portable Media Player device interface and represents a portable media player a...
~PortableMediaPlayer() override
Destroys a portable media player object.
virtual QStringList supportedDrivers(QString protocol=QString()) const =0
Retrieves known installed device drivers that claim to handle this device using the requested protoco...
virtual QVariant driverHandle(const QString &driver) const =0
Retrieves a driver specific string allowing to access the device.
virtual QStringList supportedProtocols() const =0
Retrieves known protocols this device can speak.
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.