LeechCraft  0.6.70-15082-g543737046d
Modular cross-platform feature rich live environment.
IRemovableDevManager Class Referenceabstract

Interface for classes providing information about removable devices. More...

#include "iremovabledevmanager.h"

Public Member Functions

virtual ~IRemovableDevManager ()
 
virtual bool SupportsDevType (LC::DeviceType type) const =0
 Checks whether the plugin can handle the device type. More...
 
virtual QAbstractItemModel * GetDevicesModel () const =0
 Returns the model describing the devices. More...
 
virtual void MountDevice (const QString &id)=0
 Tries to mount the device with the given id. More...
 

Detailed Description

Interface for classes providing information about removable devices.

This interface is to be implemented by plugins that provide information about currently connected USB Mass Storage devices or removable devices in general.

The information is provided via the model returned by the GetDevicesModel() method. Each row corresponds to a separate device or its part, like a partition for a flash drive. The model is hierarchical: for example, partitions of a flash drive are children of the row representing the flash drive itself.

Each row of the model should contain data for roles defined in the LC::CommonDevRole enum as well as LC::USBDeviceRole or LC::MassStorageRole enums, depending on the device type.

Definition at line 35 of file iremovabledevmanager.h.

Constructor & Destructor Documentation

◆ ~IRemovableDevManager()

virtual IRemovableDevManager::~IRemovableDevManager ( )
inlinevirtual

Definition at line 38 of file iremovabledevmanager.h.

Member Function Documentation

◆ GetDevicesModel()

virtual QAbstractItemModel* IRemovableDevManager::GetDevicesModel ( ) const
pure virtual

Returns the model describing the devices.

Each row of the model should contain data for roles defined in the LC::CommonDevRole enum as well as LC::USBDeviceRole or LC::MassStorageRole enums, depending on the device type.

The returned model should be flat - in other words, no hierarchy is assumed to be present.

Returns
The model describing the currently attached removable devices.

◆ MountDevice()

virtual void IRemovableDevManager::MountDevice ( const QString &  id)
pure virtual

Tries to mount the device with the given id.

This function tried to mount the device identified by id, if applicable. The id corresponds to the ID contained in the CommonDevRole::DevID role.

Parameters
[in]idThe identifier (as in CommonDevRole::DevID) of the device to mount.
See also
CommonDevRole::DevID

◆ SupportsDevType()

virtual bool IRemovableDevManager::SupportsDevType ( LC::DeviceType  type) const
pure virtual

Checks whether the plugin can handle the device type.

This function should return whether the device manager plugin recognizes the given type of the devices, like USB mass storages.

If a device type is supported, the connected devices of the corresponding type are expected to be found in the model returned by the GetDevicesModel() method.

Parameters
[in]typeThe type of the devices to check.
Returns
Whether the type is recognized and supported by the plugin.

The documentation for this class was generated from the following file: