Generic interface for platform disc drive handling.
More...
#include <IDiscDriveHandler.h>
|
| virtual DriveState | GetDriveState (const std::string &devicePath)=0 |
| | Get the optical drive state provided its device path.
|
| |
| virtual TrayState | GetTrayState (const std::string &devicePath)=0 |
| | Get the optical drive tray state provided the drive device path.
|
| |
| virtual bool | EjectDriveTray (const std::string &devicePath)=0 |
| | Eject the provided drive device.
|
| |
| virtual bool | CloseDriveTray (const std::string &devicePath)=0 |
| | Close the provided drive device.
|
| |
| virtual bool | ToggleDriveTray (const std::string &devicePath)=0 |
| | Toggle the state of a given drive device.
|
| |
Generic interface for platform disc drive handling.
◆ ~IDiscDriveHandler()
| virtual IDiscDriveHandler::~IDiscDriveHandler |
( |
| ) |
|
|
protectedvirtualdefault |
◆ IDiscDriveHandler()
| IDiscDriveHandler::IDiscDriveHandler |
( |
| ) |
|
|
protecteddefault |
◆ CloseDriveTray()
| virtual bool IDiscDriveHandler::CloseDriveTray |
( |
const std::string & | devicePath | ) |
|
|
pure virtual |
Close the provided drive device.
- Note
- Some drives support closing apart from opening/eject
- Parameters
-
| devicePath | the path for the device drive (e.g. /dev/sr0) |
- Returns
- True if the tray moved
Implemented in CDiscDriveHandlerPosix, and CWin32DiscDriveHandler.
◆ CreateInstance()
Called to create platform-specific disc drive handler.
This method is used to create platform-specific disc drive handler
◆ EjectDriveTray()
| virtual bool IDiscDriveHandler::EjectDriveTray |
( |
const std::string & | devicePath | ) |
|
|
pure virtual |
◆ GetDriveState()
| virtual DriveState IDiscDriveHandler::GetDriveState |
( |
const std::string & | devicePath | ) |
|
|
pure virtual |
◆ GetTrayState()
| virtual TrayState IDiscDriveHandler::GetTrayState |
( |
const std::string & | devicePath | ) |
|
|
pure virtual |
Get the optical drive tray state provided the drive device path.
- Parameters
-
| devicePath | the path for the device drive (e.g. /dev/sr0) |
- Returns
- The drive state
Implemented in CDiscDriveHandlerPosix, and CWin32DiscDriveHandler.
◆ ToggleDriveTray()
| virtual bool IDiscDriveHandler::ToggleDriveTray |
( |
const std::string & | devicePath | ) |
|
|
pure virtual |
Toggle the state of a given drive device.
Will internally call EjectDriveTray or CloseDriveTray depending on the internal state of the drive (i.e. if open -> CloseDriveTray / if closed -> EjectDriveTray)
- Parameters
-
| devicePath | the path for the device drive (e.g. /dev/sr0) |
- Returns
- True if the tray moved
Implemented in CDiscDriveHandlerPosix, and CWin32DiscDriveHandler.
The documentation for this class was generated from the following files: