Unit Storage
From Ultibo.org
Return to Unit Reference
Contents
[hide]Description
Ultibo Storage Interface unit
This unit provides the generic Storage device interface used by all storage drivers.
Constants
[Expand]
Storage specific constants
STORAGE_*
[Expand]
Storage device type
STORAGE_TYPE_*
[Expand]
Storage device state
STORAGE_STATE_*
[Expand]
Storage device flag
STORAGE_FLAG_*
[Expand]
Storage device control code
STORAGE_CONTROL_*
[Expand]
Storage logging
STORAGE_LOG_*
Type definitions
Storage enumeration callback
TStorageEnumerate = function(Storage:PStorageDevice; Data:Pointer):LongWord;
|
Storage notification callback
TStorageNotification = function(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;
|
Storage device read
TStorageDeviceRead = function(Storage:PStorageDevice; const Start,Count:Int64; Buffer:Pointer):LongWord;
|
Storage device write
TStorageDeviceWrite = function(Storage:PStorageDevice; const Start,Count:Int64; Buffer:Pointer):LongWord;
|
Storage device erase
TStorageDeviceErase = function(Storage:PStorageDevice; const Start,Count:Int64):LongWord;
|
Storage device control
TStorageDeviceControl = function(Storage:PStorageDevice; Request:Integer; Argument1:PtrUInt; var Argument2:PtrUInt):LongWord;
|
Storage device
Public variables
Storage logging
STORAGE_DEFAULT_LOG_LEVEL:LongWord = STORAGE_LOG_LEVEL_DEBUG;
|
Minimum level for Storage messages. Only messages with level greater than or equal to this will be printed. |
STORAGE_LOG_ENABLED:Boolean;
|
Function declarations
Initialization functions
Storage functions
[Expand]
function StorageDeviceRead(Storage:PStorageDevice; const Start,Count:Int64; Buffer:Pointer):LongWord;
Description: To be documented
[Expand]
function StorageDeviceWrite(Storage:PStorageDevice; const Start,Count:Int64; Buffer:Pointer):LongWord;
Description: To be documented
[Expand]
function StorageDeviceErase(Storage:PStorageDevice; const Start,Count:Int64):LongWord;
Description: To be documented
[Expand]
function StorageDeviceControl(Storage:PStorageDevice; Request:Integer; Argument1:PtrUInt; var Argument2:PtrUInt):LongWord;
Description: To be documented
[Expand]
function StorageDeviceSetState(Storage:PStorageDevice; State:LongWord):LongWord;
Description: Set the state of the specified storage and send a notification
[Expand]
function StorageDeviceStartStatus(Storage:PStorageDevice; Interval:LongWord):LongWord;
Description: Start status monitoring on the specified storage for insert/eject notifications
[Expand]
function StorageDeviceStopStatus(Storage:PStorageDevice):LongWord;
Description: Stop status monitoring on the specified storage for insert/eject notifications
[Expand]
function StorageDeviceCreateEx(Size:LongWord):PStorageDevice;
Description: Create a new Storage entry
[Expand]
function StorageDeviceDestroy(Storage:PStorageDevice):LongWord;
Description: Destroy an existing Storage entry
[Expand]
function StorageDeviceRegister(Storage:PStorageDevice):LongWord;
Description: Register a new Storage in the Storage table
[Expand]
function StorageDeviceDeregister(Storage:PStorageDevice):LongWord;
Description: Deregister a Storage from the Storage table
[Expand]
function StorageDeviceFind(StorageId:LongWord):PStorageDevice;
Description: To be documented
[Expand]
function StorageDeviceFindByDevice(Device:PDevice):PStorageDevice;
Description: Find a Storage device by the matching DeviceData property
[Expand]
function StorageDeviceFindByName(const Name:String):PStorageDevice; inline;
Description: To be documented
[Expand]
function StorageDeviceFindByDescription(const Description:String):PStorageDevice; inline;
Description: To be documented
[Expand]
function StorageDeviceEnumerate(Callback:TStorageEnumerate; Data:Pointer):LongWord;
Description: To be documented
[Expand]
function StorageDeviceNotification(Storage:PStorageDevice; Callback:TStorageNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
Description: To be documented
Storage helper functions
[Expand]
function StorageDeviceCheck(Storage:PStorageDevice):PStorageDevice;
Description: Check if the supplied Storage is in the storage table
[Expand]
function StorageDeviceTypeToString(StorageType:LongWord):String;
Description: To be documented
[Expand]
function StorageDeviceStateToString(StorageState:LongWord):String;
Description: To be documented
[Expand]
function StorageDeviceStateToNotification(State:LongWord):LongWord;
Description: Convert a Storage state value into the notification code for device notifications
[Expand]
procedure StorageLog(Level:LongWord; Storage:PStorageDevice; const AText:String);
Description: To be documented
[Expand]
procedure StorageLogInfo(Storage:PStorageDevice; const AText:String); inline;
Description: To be documented
[Expand]
procedure StorageLogWarn(Storage:PStorageDevice; const AText:String); inline;
Description: To be documented
[Expand]
procedure StorageLogError(Storage:PStorageDevice; const AText:String); inline;
Description: To be documented
[Expand]
procedure StorageLogDebug(Storage:PStorageDevice; const AText:String); inline;
Description: To be documented
Return to Unit Reference