IToiStorageService Interface Reference


Description

The IToiStorageService interface provides access to any internal and external storage devices.

For an internal HDD the temperature can be monitored, while USB connected devices do not support this feature.

import "IToiStorageService.idl";

List of all members.

Public Member Functions

void GetStorageOperationManager (out string address)
void GetStorageDeviceIds (out TToiStorageDeviceIdSequence identifiers)
void GetStorageDevice (in IToiStorageDevice::TToiStorageDeviceId id, out string address) raises (TToiInvalidArgumentException)
void Copy (in IToiOperationManager::TToiOperationId operationId, in string source, in string target) raises (TToiInvalidArgumentException)
void Move (in IToiOperationManager::TToiOperationId operationId, in string source, in string target) raises (TToiInvalidArgumentException)
void CreateFile (in IToiApplicationService::TToiApplicationId applicationId, in string fileName, in IToiStorageFile::TToiStorageFileType fileType, out string address) raises (TToiInvalidArgumentException, TToiFileException)
void RegisterObserver (in IToiApplicationService::TToiApplicationId applicationId, in string address) raises (TToiInvalidArgumentException)
void ReleaseObserver (in string address) raises (TToiInvalidArgumentException)

Public Types

typedef sequence
< IToiStorageDevice::TToiStorageDeviceId
TToiStorageDeviceIdSequence

Member Typedef Documentation


Member Function Documentation

void IToiStorageService::Copy ( in IToiOperationManager::TToiOperationId  operationId,
in string  source,
in string  target 
) raises (TToiInvalidArgumentException)

Copies a file from source to target.

Parameters:
operationId Operation identifier, created by the operation manager.
source Source file path.
target Target path.
Exceptions:
TToiInvalidArgumentException Raised if the operationId is illegal.
void IToiStorageService::CreateFile ( in IToiApplicationService::TToiApplicationId  applicationId,
in string  fileName,
in IToiStorageFile::TToiStorageFileType  fileType,
out string  address 
) raises (TToiInvalidArgumentException, TToiFileException)

Creates a file. A limited number of simultaneous IToiStorageFile objects are allowed. This functionality is primarily interesting for non C++ appliations (such as portal) that do not have access to the file system directly.

Parameters:
applicationId The identifier of the calling application.
fileName The name of the file. Note: If the filetype is IToiStorageFile::FILE_TYPE_TEMPORARY, a unique random string is automatically added to the end of the filename (but before any extension). The purpose of the filename in such case would merely be to describe its file-extension (e.g. '.jpeg').
fileType The type of file to be created.
Return values:
address The address to the IToiStorageFile instance.
Exceptions:
TToiInvalidArgumentException Raised if the fileType is invalid.
TToiFileException Raised if files cannot be created, i.e. no internal drive, no directory set up for temporary files, or the maximum number of simultaneous file objects is exceeded.
void IToiStorageService::GetStorageDevice ( in IToiStorageDevice::TToiStorageDeviceId  id,
out string  address 
) raises (TToiInvalidArgumentException)

Returns the address to the storage device handler for a given storage identifier.

Parameters:
id Storage identifier.
Return values:
address Address to the IToiStorageDevice.
void IToiStorageService::GetStorageDeviceIds ( out TToiStorageDeviceIdSequence  identifiers  ) 

Returns the identifiers for the currently connected storage devices.

Return values:
identifiers The storage identifiers.
void IToiStorageService::GetStorageOperationManager ( out string  address  ) 

Returns the operation manager that handles asynchronous operations for this storage device.

Return values:
address Address to the IToiOperationManager.
void IToiStorageService::Move ( in IToiOperationManager::TToiOperationId  operationId,
in string  source,
in string  target 
) raises (TToiInvalidArgumentException)

Moves a file from source to target.

Parameters:
operationId Operation identifier, created by operation manager.
source Source file path.
target Target path.
Exceptions:
TToiInvalidArgumentException Raised if the operationId is illegal.
void IToiStorageService::RegisterObserver ( in IToiApplicationService::TToiApplicationId  applicationId,
in string  address 
) raises (TToiInvalidArgumentException)

Register an observer of type IToiStorageObserver. The observer will receive events sent by this IToiStorageService instance.

Parameters:
applicationId The identifier of the observing application.
address The address where the IToiStorageService can find an IToiStorageObserver interface.
Exceptions:
TToiInvalidArgumentException Raised if the specified address is invalid or if the application has already registered itself as an observer with the same address.
See also:
IToiStorageObserver
void IToiStorageService::ReleaseObserver ( in string  address  )  raises (TToiInvalidArgumentException)

Release an observer previously registered with RegisterObserver.

Parameters:
address The address where the IToiStorageService can find the registered IToiStorageObserver interface.
Exceptions:
TToiInvalidArgumentException Raised if the specified address is invalid.
See also:
IToiStorageObserver