KDE 4.2 PyKDE API Reference

- KDE's Python API

# StorageAccess Class Reference

`from PyKDE4.solid import *`

Inherits: Solid.DeviceInterface → QObject
Namespace: Solid

## Detailed Description

This device interface is available on volume devices.

A volume is anything that can contain data (partition, optical disc, memory card). It's a particular kind of block device.

## Signals

| accessibilityChanged (bool accessible, QString udi)
| setupDone (Solid.ErrorType error, QVariant errorData, QString udi)
| teardownDone (Solid.ErrorType error, QVariant errorData, QString udi)

## Methods

| __init__ (self, QObject backendObject)
| __init__ (self, StorageAccessPrivate dd, QObject backendObject)
| accessibilityChanged (self, bool accessible, QString udi)
QString | filePath (self)
bool | isAccessible (self)
bool | setup (self)
| setupDone (self, Solid.ErrorType error, QVariant errorData, QString udi)
bool | teardown (self)
| teardownDone (self, Solid.ErrorType error, QVariant errorData, QString udi)

## Static Methods

Solid.DeviceInterface.Type | deviceInterfaceType ()

## Method Documentation

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

Creates a new StorageAccess 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()

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

Internal:

accessibilityChanged | ( | self, |
|  | bool | accessible,
|  | QString | udi
| ) |  |  |

This signal is emitted when the accessiblity of this device has changed.

Parameters:

  | accessible | true if the volume is accessible, false otherwise
  | udi | the UDI of the volume

Signal syntax:
  `QObject.connect(source, SIGNAL("accessibilityChanged(bool, const QString&)"), target_slot)`

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

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

Returns:
  the StorageVolume device interface type

See also:
  Solid.Ifaces.Enums.DeviceInterface.Type

QString filePath | ( |  | self ) |

Retrieves the absolute path of this volume mountpoint.

Returns:
  the absolute path to the mount point if the volume is mounted, QString() otherwise

bool isAccessible | ( |  | self ) |

Indicates if this volume is mounted.

Returns:
  true if the volume is mounted

bool setup | ( |  | self ) |

Mounts the volume.

Returns:
  false if the operation is not supported, true if the operation is attempted

setupDone | ( | self, |
|  | Solid.ErrorType | error,
|  | QVariant | errorData,
|  | QString | udi
| ) |  |  |

This signal is emitted when the attempted setting up of this device is completed.

Parameters:

  | error | type of error that occurred, if any
  | errorData | more information about the error, if any
  | udi | the UDI of the volume

Signal syntax:
  `QObject.connect(source, SIGNAL("setupDone(ErrorType, QVariant, const QString&)"), target_slot)`

bool teardown | ( |  | self ) |

Unmounts the volume.

Returns:
  false if the operation is not supported, true if the operation is attempted

teardownDone | ( | self, |
|  | Solid.ErrorType | error,
|  | QVariant | errorData,
|  | QString | udi
| ) |  |  |

This signal is emitted when the attempted tearing down of this device is completed.

Parameters:

  | error | type of error that occurred, if any
  | errorData | more information about the error, if any
  | udi | the UDI of the volume

Signal syntax:
  `QObject.connect(source, SIGNAL("teardownDone(ErrorType, QVariant, const QString&)"), target_slot)`