KDE 4.7 PyKDE API Reference

- KDE's Python API

# PortableMediaPlayer Class Reference

`from PyKDE4.solid import *`

Inherits: Solid.DeviceInterface → QObject
Namespace: Solid

## Detailed Description

This class implements Portable Media Player device interface and represents a portable media player attached to the system. A portable media player is a portable device able to play multimedia files. Some of them have even recording capabilities.

Author:
  Davide Bettio <davbet@aliceposta.it>

## Methods
| __init__ (self, QObject backendObject)
QVariant | driverHandle (self, QString driver)
QStringList | supportedDrivers (self, QString protocol=QString())
QStringList | supportedProtocols (self)
## Static Methods
Solid.DeviceInterface.Type | deviceInterfaceType ()

## Method Documentation

__init__ | ( | self, |
|  | QObject | backendObject
| ) |  |  |

Creates a new PortableMediaPlayer object. You generally won't need this. It's created when necessary using Device.as().

Parameters:

  | backendObject | the device interface object provided by the backend

See also:
  Solid.Device.as()

QVariant driverHandle | ( | self, |
|  | QString | driver
| ) |  |  |

Retrieves a driver specific string allowing to access the device.

For example for the "mtp" driver it will return the serial number of the device.

Returns:
  the driver specific data

QStringList supportedDrivers | ( | self, |
|  | QString | protocol=QString()
| ) |  |  |

Retrieves known installed device drivers that claim to handle this device using the requested protocol. If protocol is blank, returns a list of all drivers supporting the device.

Parameters:

  | protocol | The protocol to get drivers for.

Returns:
  a list of installed drivers meeting the criteria

QStringList supportedProtocols | ( |  | self ) |

Retrieves known protocols this device can speak. This list may be dependent on installed device driver libraries.

Returns:
  a list of known protocols this device can speak

## Static Method Documentation

Solid.DeviceInterface.Type deviceInterfaceType | ( |  | ) |

Get the Solid.DeviceInterface.Type of the PortableMediaPlayer device interface.

Returns:
  the PortableMediaPlayer device interface type

See also:
  Solid.DeviceInterface.Type