The ToiStorageService 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 "ToiStorageService.idl";
| typedef sequence< ToiStorageDevice::TToiStorageDeviceId > ToiStorageService::TToiStorageDeviceIdSequence |
Sequence of storage identifiers.
| void ToiEventTarget::addEventListener | ( | in long | type, |
| in ToiEventListener | listener | ||
| ) | raises (TToiInvalidArgumentException) [inherited] |
This method registers an event listener for a specific event. Multiple listeners can be added for the same event. Events are broadcast to all registered listeners.
| type | The event type of the event to subscribe to. |
| listener | The JavaScript function that will receive events. |
| TInvalidArgumentException | Raised if the event type is not supported by this object or if the listener is not a valid JavaScript function. This exception is also raised if the application calls addEventListener with the same combination of type and listener twice. |
| ToiStorageFile ToiStorageService::createFile | ( | in string | fileName, |
| in ToiStorageFile::TToiStorageFileType | fileType | ||
| ) | raises (TToiInvalidArgumentException, TToiFileException) |
Creates a file. A limited number of simultaneous ToiStorageFile 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.
| fileName | The name of the file. Note: If the filetype is ToiStorageFile::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. |
| IToiStorageFile | |
| address | The address to the ToiStorageFile instance. |
| 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. |
| ToiStorageDevice ToiStorageService::getStorageDevice | ( | in ToiStorageDevice::TToiStorageDeviceId | id | ) | raises (TToiInvalidArgumentException) |
Returns the address to the storage device handler for a given storage identifier.
| id | Storage identifier. |
| IToiStorageDevice | |
| address | Address to the ToiStorageDevice. |
| TToiStorageDeviceIdSequence ToiStorageService::getStorageDeviceIds | ( | ) |
Returns the identifiers for the currently connected storage devices.
| identifiers | The storage identifiers. |
| ToiOperationManager ToiStorageService::getStorageOperationManager | ( | ) |
Returns the operation manager that handles asynchronous operations for this storage device.
| IToiOperationManager | |
| address | Address to the ToiOperationManager. |
| void ToiEventTarget::removeEventListener | ( | in long | type, |
| in ToiEventListener | listener | ||
| ) | raises (TToiInvalidArgumentException) [inherited] |
This method removes an event listener for a specific event.
| type | The event type of the event to remove the listener from. |
| listener | The JavaScript function that was previously added as an event listener. |
| TInvalidArgumentException | Raised if the event type is not supported by this object or if the listener is not a valid JavaScript function. This exception is also raised if the listener had not previously been added. |
| const long ToiStorageService::ON_DEVICE_CONNECTED = 2600 |
This is an Event identifier for ToiStorageDeviceConnectedEvent.
This constant can also be accessed from toi.consts.ToiStorageService.ON_DEVICE_CONNECTED.
| const long ToiStorageService::ON_DEVICE_DISCONNECTED = 2601 |
This is an Event identifier for ToiStorageDeviceDisconnectedEvent.
This constant can also be accessed from toi.consts.ToiStorageService.ON_DEVICE_DISCONNECTED.
| const long ToiStorageService::ON_DEVICE_PARTITION_FULL = 2605 |
This is an Event identifier for ToiStorageDevicePartitionFullEvent.
This constant can also be accessed from toi.consts.ToiStorageService.ON_DEVICE_PARTITION_FULL.
| const long ToiStorageService::ON_DEVICE_PARTITION_MOUNT_CHANGED = 2604 |
This is an Event identifier for ToiStorageDevicePartitionMountChangedEvent.
This constant can also be accessed from toi.consts.ToiStorageService.ON_DEVICE_PARTITION_MOUNT_CHANGED.
| const long ToiStorageService::ON_DEVICE_PARTITIONS_CHANGED = 2603 |
This is an Event identifier for ToiStorageDevicePartitionsChangedEvent.
This constant can also be accessed from toi.consts.ToiStorageService.ON_DEVICE_PARTITIONS_CHANGED.
| const long ToiStorageService::ON_DEVICE_SPINNING_CHANGED = 2602 |
This is an Event identifier for ToiStorageDeviceSpinningChangedEvent.
This constant can also be accessed from toi.consts.ToiStorageService.ON_DEVICE_SPINNING_CHANGED.
| const long ToiStorageService::ON_DEVICE_TEMPERATURE_THRESHOLD_REACHED = 2606 |
This is an Event identifier for ToiStorageDeviceTemperatureThresholdReachedEvent.
This constant can also be accessed from toi.consts.ToiStorageService.ON_DEVICE_TEMPERATURE_THRESHOLD_REACHED.