The ToiStorageDevice interface provides access to a storage device.
import "ToiStorageDevice.idl";
Public Member Functions | |
| ToiStorageDeviceStorageInfo | getStorageInfo () |
| ToiStorageDevicePartitionInfo | getPartitionInfo (in TToiPartitionId partitionId) raises (TToiInvalidArgumentException, TToiInvalidPreconditionException) |
| void | mountPartition (in ToiOperationManager::TToiOperationId operationId, in TToiPartitionId partitionId, in string mountPoint) raises (TToiInvalidArgumentException, TToiInvalidPreconditionException) |
| void | unmountPartition (in ToiOperationManager::TToiOperationId operationId, in TToiPartitionId partitionId) raises (TToiInvalidArgumentException, TToiInvalidPreconditionException) |
| void | runPerformanceCheck (in ToiOperationManager::TToiOperationId operationId, in TToiPartitionId partitionId, in TToiPropertySequence properties) raises (TToiInvalidArgumentException, TToiInvalidPreconditionException, TToiOperationNotSupportedException) |
| TToiPropertySequence | getPropertyResult (in ToiOperationManager::TToiOperationId operationId) raises (TToiInvalidArgumentException, TToiNoDataException) |
| void | setEnabledFeatures (in TToiPartitionId partitionId, in long features) raises (TToiInvalidArgumentException, TToiInvalidPreconditionException, TToiOperationNotSupportedException) |
| void | reformat (in ToiOperationManager::TToiOperationId operationId) raises (TToiInvalidArgumentException, TToiInvalidPreconditionException, TToiOperationNotSupportedException) |
| void | scheduleReformatOnNextReboot (in TToiPartitionId partitionId) raises (TToiOperationNotSupportedException, TToiInvalidArgumentException) |
| void | scheduleFileSystemRepairOnNextReboot (in TToiPartitionId partitionId) raises (TToiOperationNotSupportedException, TToiInvalidArgumentException) |
| void | spinDown () raises (TToiInvalidPreconditionException) |
| void | spinUp () raises (TToiInvalidPreconditionException) |
Public Attributes | |
| const TToiPropertyId | PROPERTY_BITRATE = 1 |
TToiFileSystemStatus | |
| const TToiFileSystemStatus | FS_STATUS_OK = 0 |
| const TToiFileSystemStatus | FS_STATUS_ERRORS_CORRECTED = 1 |
| const TToiFileSystemStatus | FS_STATUS_ERRORS_LEFT_UNCORRECTED = 2 |
| const TToiFileSystemStatus | FS_STATUS_MAJOR_FAILURE = 3 |
TToiPartitionFeature | |
| const TToiPartitionFeature | PARTITION_FEATURE_DVR = 0x1 |
| const TToiPartitionFeature | PARTITION_FEATURE_TIMESHIFT = 0x2 |
| const TToiPartitionFeature | PARTITION_FEATURE_ACCESS_USER_CONTENT = 0x4 |
Operation results | |
The result types defined for storage device operation. See ToiOperationManager for generic result types. | |
| const ToiOperationManager::TToiOperationResult | OP_RESULT_PROPERTY = 1 |
Public Types | |
| typedef unsigned long | TToiStorageDeviceId |
| typedef unsigned long | TToiPartitionId |
| typedef sequence< TToiPartitionId > | TToiPartitionIdSequence |
| typedef long | TToiFileSystemStatus |
| typedef long | TToiPartitionFeature |
| typedef TToiFileSystemStatus | TFileSystemStatus |
| typedef long | TToiPropertyId |
| typedef string | TToiPropertyValue |
| typedef sequence < ToiStorageDeviceProperty > | TToiPropertySequence |
Typedef for backward compatibility when corrected naming typo of previous enum TFileSystemStatus.
| typedef long ToiStorageDevice::TToiFileSystemStatus |
The different kind of file system status values.
| typedef long ToiStorageDevice::TToiPartitionFeature |
| typedef unsigned long ToiStorageDevice::TToiPartitionId |
Type for partition identifier.
| typedef sequence< TToiPartitionId > ToiStorageDevice::TToiPartitionIdSequence |
The sequence of partition identifiers.
| typedef long ToiStorageDevice::TToiPropertyId |
| typedef sequence< ToiStorageDeviceProperty > ToiStorageDevice::TToiPropertySequence |
| typedef string ToiStorageDevice::TToiPropertyValue |
| typedef unsigned long ToiStorageDevice::TToiStorageDeviceId |
Type for storage identifier.
| ToiStorageDevicePartitionInfo ToiStorageDevice::getPartitionInfo | ( | in TToiPartitionId | partitionId | ) | raises (TToiInvalidArgumentException, TToiInvalidPreconditionException) |
Returns partition info for a partition.
| partitionId | Partition identifier. |
| info | The partition info. |
| TToiInvalidArgumentException | Raised if the partitionId is wrong. |
| TToiInvalidPreconditionException | Raised if the storage is disconnected. |
| TToiPropertySequence ToiStorageDevice::getPropertyResult | ( | in ToiOperationManager::TToiOperationId | operationId | ) | raises (TToiInvalidArgumentException, TToiNoDataException) |
| operationId | The operation identifier used when calling ToiStorageDevice::runPerformanceCheck(). |
| results | The result properties. |
| TToiInvalidArgumentException | Raised if the operation identifier is invalid |
| TToiNoDataException | Raised if no result is available. |
| ToiStorageDeviceStorageInfo ToiStorageDevice::getStorageInfo | ( | ) |
Returns storage info for this device.
| info | The storage info. |
| void ToiStorageDevice::mountPartition | ( | in ToiOperationManager::TToiOperationId | operationId, |
| in TToiPartitionId | partitionId, | ||
| in string | mountPoint | ||
| ) | raises (TToiInvalidArgumentException, TToiInvalidPreconditionException) |
Mounts a partition at a specified path.
| operationId | Operation identifier for this operation. |
| partitionId | Partition identifier. |
| mountPoint | Mount point path. |
| TToiInvalidArgumentException | Raised if the operationId or partitionId is wrong. |
| TToiInvalidPreconditionException | Raised if the partition is already mounted or the storage is disconnected. |
| void ToiStorageDevice::reformat | ( | in ToiOperationManager::TToiOperationId | operationId | ) | raises (TToiInvalidArgumentException, TToiInvalidPreconditionException, TToiOperationNotSupportedException) |
Reformat a device. This operation is only supported for external storage devices.
| operationId | Operation identifier for this operation. |
| TToiInvalidArgumentException | Raised if the operationId is wrong. |
| TToiInvalidPreconditionException | Raised if the storage is disconnected. |
| TToiOperationNotSupportedException | Raised if the operation is not supported on this device. |
| void ToiStorageDevice::runPerformanceCheck | ( | in ToiOperationManager::TToiOperationId | operationId, |
| in TToiPartitionId | partitionId, | ||
| in TToiPropertySequence | properties | ||
| ) | raises (TToiInvalidArgumentException, TToiInvalidPreconditionException, TToiOperationNotSupportedException) |
| operationId | Operation identifier for this operation. |
| partitionId | Partition identifier. |
| properties | Property sequence, like which capability to check or requested bitrate. |
| TToiInvalidArgumentException | Raised if the partitionId is wrong or operationId is invalid. Raised if an unsupported property is provided. |
| TToiInvalidPreconditionException | Raised if the storage is disconnected or partition not mounted. |
| TToiOperationNotSupportedException | Raised if performance test functionality not supported. |
| void ToiStorageDevice::scheduleFileSystemRepairOnNextReboot | ( | in TToiPartitionId | partitionId | ) | raises (TToiOperationNotSupportedException, TToiInvalidArgumentException) |
Schedule a forced file system check of a partition and repair it at next reboot. This operation is only supported for internal storage devices.
| partitionId | The partition to be checked and repaired. |
| TToiInvalidArgumentException | Raised if the partition does not exist. |
| TToiOperationNotSupportedException | Raised if the operation is not supported on this device. |
| void ToiStorageDevice::scheduleReformatOnNextReboot | ( | in TToiPartitionId | partitionId | ) | raises (TToiOperationNotSupportedException, TToiInvalidArgumentException) |
Schedule a reformat of a partition at next reboot. This operation is only supported for internal storage devices.
| partitionId | The partition to format. |
| TToiInvalidArgumentException | Raised if the partition does not exist. |
| TToiOperationNotSupportedException | Raised if the operation is not supported on this device. |
| void ToiStorageDevice::setEnabledFeatures | ( | in TToiPartitionId | partitionId, |
| in long | features | ||
| ) | raises (TToiInvalidArgumentException, TToiInvalidPreconditionException, TToiOperationNotSupportedException) |
| partitionId | Partition identifier. |
| features | The list of features (ToiStorageDevice::TToiPartitionFeature) |
| TToiInvalidArgumentException | Raised if the partitionId is wrong. Raised if any of the features are wrong. |
| TToiInvalidPreconditionException | Raised if the storage is disconnected. |
| TToiOperationNotSupportedException | Raised if the partition does not support one of the feature. |
| void ToiStorageDevice::spinDown | ( | ) | raises (TToiInvalidPreconditionException) |
Requests a spin down of a disk device. The platform may decide not to do this if the disk is used by platform.
| TToiInvalidPreconditionException | Raised if the storage is disconnected, already in spindown mode or if the device is not approved. |
| void ToiStorageDevice::spinUp | ( | ) | raises (TToiInvalidPreconditionException) |
Spins up a disk device.
| TToiInvalidPreconditionException | Raised if the storage is disconnected, already in spinup mode or if the device is not approved. |
| void ToiStorageDevice::unmountPartition | ( | in ToiOperationManager::TToiOperationId | operationId, |
| in TToiPartitionId | partitionId | ||
| ) | raises (TToiInvalidArgumentException, TToiInvalidPreconditionException) |
Unmounts a partition.
| operationId | Operation identifier for this operation. |
| partitionId | Partition identifier. |
| TToiInvalidArgumentException | Raised if the operationId or partitionId is wrong. |
| TToiInvalidPreconditionException | Raised if the partition has not been mounted or the storage is disconnected. |
The file system had errors but they have been corrected (jfs_fsck return code 1 or 2).
This constant can also be accessed from toi.consts.ToiStorageDevice.FS_STATUS_ERRORS_CORRECTED.
The file system had errors that could not be corrected (jfs_fsck return code 4). A reformat is required to get the file system working.
This constant can also be accessed from toi.consts.ToiStorageDevice.FS_STATUS_ERRORS_LEFT_UNCORRECTED.
The file system is completely broken (all other return codes from jfs_fsck). Could also be that the partition has another file system than jfs. If the internal storage device has this status is should be reformated to get it working.
This constant can also be accessed from toi.consts.ToiStorageDevice.FS_STATUS_MAJOR_FAILURE.
No errors discovered on the file system (jfs_fsck return code 0).
This constant can also be accessed from toi.consts.ToiStorageDevice.FS_STATUS_OK.
This constant can also be accessed from toi.consts.ToiStorageDevice.OP_RESULT_PROPERTY.
Enable access to user data on external storage.
This constant can also be accessed from toi.consts.ToiStorageDevice.PARTITION_FEATURE_ACCESS_USER_CONTENT.
DVR support for external storage.
This constant can also be accessed from toi.consts.ToiStorageDevice.PARTITION_FEATURE_DVR.
Timeshift support for external storage.
This constant can also be accessed from toi.consts.ToiStorageDevice.PARTITION_FEATURE_TIMESHIFT.
This constant can also be accessed from toi.consts.ToiStorageDevice.PROPERTY_BITRATE.