IToiStorageDevice Interface Reference


Description

The IToiStorageDevice interface provides access to a storage device.

import "IToiStorageDevice.idl";

List of all members.

Public Member Functions

void GetStorageInfo (out TToiStorageInfo info)
void GetPartitionInfo (in TToiPartitionId partitionId, out TToiPartitionInfo info) raises (TToiInvalidArgumentException, TToiInvalidPreconditionException)
void MountPartition (in IToiOperationManager::TToiOperationId operationId, in TToiPartitionId partitionId, in string mountPoint) raises (TToiInvalidArgumentException, TToiInvalidPreconditionException)
void UnmountPartition (in IToiOperationManager::TToiOperationId operationId, in TToiPartitionId partitionId) raises (TToiInvalidArgumentException, TToiInvalidPreconditionException)
void Reformat (in IToiOperationManager::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)

Classes

struct  TToiPartitionInfo
struct  TToiStorageInfo

Public Types

enum  TToiFileSystemStatus { FS_STATUS_OK, FS_STATUS_ERRORS_CORRECTED, FS_STATUS_ERRORS_LEFT_UNCORRECTED, FS_STATUS_MAJOR_FAILURE }
typedef unsigned long TToiStorageDeviceId
typedef unsigned long TToiPartitionId
typedef sequence< TToiPartitionIdTToiPartitionIdSequence
typedef TToiFileSystemStatus TFileSystemStatus

Member Typedef Documentation

Typedef for backward compatibility when corrected naming typo of previous enum TFileSystemStatus.

typedef unsigned long IToiStorageDevice::TToiPartitionId

Type for partition identifier.

The sequence of partition identifiers.

Type for storage identifier.


Member Enumeration Documentation

The different kind of file system status values.

Enumerator:
FS_STATUS_OK 

No errors discovered on the file system (jfs_fsck return code 0).

FS_STATUS_ERRORS_CORRECTED 

The file system had errors but they have been corrected (jfs_fsck return code 1 or 2).

FS_STATUS_ERRORS_LEFT_UNCORRECTED 

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.

FS_STATUS_MAJOR_FAILURE 

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.


Member Function Documentation

void IToiStorageDevice::GetPartitionInfo ( in TToiPartitionId  partitionId,
out TToiPartitionInfo  info 
) raises (TToiInvalidArgumentException, TToiInvalidPreconditionException)

Returns partition info for a partition.

Parameters:
partitionId Partition identifier.
Return values:
info The partition info.
Exceptions:
TToiInvalidArgumentException Raised if the partitionId is wrong.
TToiInvalidPreconditionException Raised if the storage is disconnected.
void IToiStorageDevice::GetStorageInfo ( out TToiStorageInfo  info  ) 

Returns storage info for this device.

Return values:
info The storage info.
void IToiStorageDevice::MountPartition ( in IToiOperationManager::TToiOperationId  operationId,
in TToiPartitionId  partitionId,
in string  mountPoint 
) raises (TToiInvalidArgumentException, TToiInvalidPreconditionException)

Mounts a partition at a specified path.

Parameters:
operationId Operation identifier for this operation.
partitionId Partition identifier.
mountPoint Mount point path.
Exceptions:
TToiInvalidArgumentException Raised if the operationId or partitionId is wrong.
TToiInvalidPreconditionException Raised if the partition is already mounted or the storage is disconnected.

Reformat a device. This operation is only supported for external storage devices.

Parameters:
operationId Operation identifier for this operation.
Exceptions:
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 IToiStorageDevice::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.

Parameters:
partitionId The partition to be checked and repaired.
Exceptions:
TToiInvalidArgumentException Raised if the partition does not exist.
TToiOperationNotSupportedException Raised if the operation is not supported on this device.
void IToiStorageDevice::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.

Parameters:
partitionId The partition to format.
Exceptions:
TToiInvalidArgumentException Raised if the partition does not exist.
TToiOperationNotSupportedException Raised if the operation is not supported on this device.
void IToiStorageDevice::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.

Exceptions:
TToiInvalidPreconditionException Raised if the storage is disconnected, already in spindown mode or if the device is not approved.
void IToiStorageDevice::SpinUp (  )  raises (TToiInvalidPreconditionException)

Spins up a disk device.

Exceptions:
TToiInvalidPreconditionException Raised if the storage is disconnected, already in spinup mode or if the device is not approved.
void IToiStorageDevice::UnmountPartition ( in IToiOperationManager::TToiOperationId  operationId,
in TToiPartitionId  partitionId 
) raises (TToiInvalidArgumentException, TToiInvalidPreconditionException)

Unmounts a partition.

Parameters:
operationId Operation identifier for this operation.
partitionId Partition identifier.
Exceptions:
TToiInvalidArgumentException Raised if the operationId or partitionId is wrong.
TToiInvalidPreconditionException Raised if the partition has not been mounted or the storage is disconnected.