GATE
C/C++ Framework
|
physical storage drive info and access utilities More...
Macros | |
#define | GATE_STORAGEDRIVE_TYPE_ALL 0x0000 |
#define | GATE_STORAGEDRIVE_TYPE_STANDARD 0x0001 |
#define | GATE_STORAGEDRIVE_TYPE_ROM 0x0002 |
#define | GATE_STORAGEDRIVE_TYPE_REMOVABLE 0x0004 |
#define | GATE_STORAGEDRIVE_TYPE_VIRTUAL 0x0008 |
#define | GATE_STORAGEDRIVE_ATTRIBTYPE_SMART (0x0100) |
#define | GATE_STORAGEDRIVE_ATTRIBINDEX_SMART_ID 0 |
#define | GATE_STORAGEDRIVE_ATTRIBINDEX_SMART_VALUE 1 |
#define | GATE_STORAGEDRIVE_ATTRIBINDEX_SMART_WORST 2 |
#define | GATE_STORAGEDRIVE_ATTRIBINDEX_SMART_RAW 3 |
#define | GATE_STORAGEDRIVE_ATTRIBINDEX_SMART_THRESHOLD 4 |
#define | GATE_STORAGEDRIVE_ATTRIBINDEX_SMART_DIRECTION 5 |
Typedefs | |
typedef gate_bool_t(* | gate_storagedrive_attribs_callback_t) (gate_storagedrive_t const *drive, gate_enumint_t attrib_type, gate_int64_t const *values, gate_size_t values_count, char const *const *texts, gate_size_t texts_count, void *user_param) |
Callback function type used by gate_storagedrive_queryattribs |
Functions | |
GATE_SYSTEM_API gate_result_t | gate_storagedrive_enum (gate_enumint_t drivetype, gate_storagedrive_enum_callback_t callback, void *user_param) |
List all detected storage drives and invokes a callback for each drive. | |
GATE_SYSTEM_API gate_result_t | gate_storagedrive_openstream (gate_storagedrive_t const *drive, gate_enumint_t open_flags, gate_controlstream_t **stream) |
Open a specified storage drive for direct data access. | |
GATE_SYSTEM_API gate_result_t | gate_storagedrive_find (gate_string_t const *field, gate_uint32_t field_type, gate_storagedrive_t *drive) |
Find a storage drive by a specified identifier. | |
GATE_SYSTEM_API gate_result_t | gate_storagedrive_queryattribs (gate_storagedrive_t const *drive, gate_enumint_t attrib_type, gate_storagedrive_attribs_callback_t callback, void *user_param) |
Retrieve advanced attributes from a storage drive. |
physical storage drive info and access utilities
#define GATE_STORAGEDRIVE_TYPE_ALL 0x0000 |
for enum only: return all types
#define GATE_STORAGEDRIVE_TYPE_STANDARD 0x0001 |
Standard drive, hard disk, flash drive
#define GATE_STORAGEDRIVE_TYPE_ROM 0x0002 |
Read-Only drive, CD-ROM, DVD-ROM, BluRay
#define GATE_STORAGEDRIVE_TYPE_REMOVABLE 0x0004 |
Removable storage: Floppy, flash drives, MMC
#define GATE_STORAGEDRIVE_TYPE_VIRTUAL 0x0008 |
Virtual storage: RAM-disk, emulation
#define GATE_STORAGEDRIVE_ATTRIBTYPE_SMART (0x0100) |
query disk SMART status values
#define GATE_STORAGEDRIVE_ATTRIBINDEX_SMART_ID 0 |
SMART ID field
#define GATE_STORAGEDRIVE_ATTRIBINDEX_SMART_VALUE 1 |
SMART current value field
#define GATE_STORAGEDRIVE_ATTRIBINDEX_SMART_WORST 2 |
SMART worst value field
#define GATE_STORAGEDRIVE_ATTRIBINDEX_SMART_RAW 3 |
SMART raw value field
#define GATE_STORAGEDRIVE_ATTRIBINDEX_SMART_THRESHOLD 4 |
SMART threshold value field
#define GATE_STORAGEDRIVE_ATTRIBINDEX_SMART_DIRECTION 5 |
SMART direction value field
GATE_SYSTEM_API gate_result_t gate_storagedrive_enum | ( | gate_enumint_t | drivetype, |
gate_storagedrive_enum_callback_t | callback, | ||
void * | user_param ) |
List all detected storage drives and invokes a callback for each drive.
[in] | drivetype | GATE_STORAGEDRIVE_TYPE_* value to filter for specific drive types |
[in] | callback | Callback function to be called for each detected drive |
[in] | user_param | User parameter to be attached to each callback call |
GATE_SYSTEM_API gate_result_t gate_storagedrive_openstream | ( | gate_storagedrive_t const * | drive, |
gate_enumint_t | open_flags, | ||
gate_controlstream_t ** | stream ) |
Open a specified storage drive for direct data access.
[in] | drive | Pointer to storage drive info object to be opened |
[in] | open_flags | GATE_STREAM_OPEN_* flag to indicate read or write access |
[out] | stream | Pointer to interface-pointer to be initialized with new created stream object return GATE_RESULT_* result code |
GATE_SYSTEM_API gate_result_t gate_storagedrive_find | ( | gate_string_t const * | field, |
gate_uint32_t | field_type, | ||
gate_storagedrive_t * | drive ) |
Find a storage drive by a specified identifier.
[in] | field | String to identify the requested storage drive |
[in] | field_type | GATE_STORAGEDRIVE_* value to specify which field is used for identification |
[out] | drive | Pointer to drive object to be initialized with data from found storage drive return GATE_RESULT_* result code |
GATE_SYSTEM_API gate_result_t gate_storagedrive_queryattribs | ( | gate_storagedrive_t const * | drive, |
gate_enumint_t | attrib_type, | ||
gate_storagedrive_attribs_callback_t | callback, | ||
void * | user_param ) |
Retrieve advanced attributes from a storage drive.
[in] | drive | Pointer to drive object identifying the storage drive |
[in] | attrib_type | GATE_STORAGEDRIVE_ATTRIBTYPE_* value to describe the requested attribute type |
[in] | callback | Callback function to be called for each found attribute value |
[in] | user_param | User parameter to be attached to each callback call |