GATE
C/C++ Framework
Loading...
Searching...
No Matches
storagevolumes.h File Reference

logical storage volume info and access utilities More...

Macros

#define GATE_STORAGEVOLUME_PATH   0x0001
#define GATE_STORAGEVOLUME_UID   0x0002
#define GATE_STORAGEVOLUME_NAME   0x0004

Functions

GATE_SYSTEM_API gate_result_t gate_storagevolume_enum (gate_storagevolume_enum_callback_t callback, void *user_param)
 Lists all detected storage volumes by calling a enumation callback function.
GATE_SYSTEM_API char const * gate_storagevolume_print_type (gate_enumint_t volume_type)
 Returns a static human-readable string for each supported volume type.
GATE_SYSTEM_API gate_result_t gate_storagevolume_find (gate_string_t const *field, gate_enumint_t field_type, gate_storagevolume_t *volume)
 Finds a volume by a given identifier.
GATE_SYSTEM_API gate_result_t gate_storagevolume_openstream (gate_storagevolume_t const *drive, gate_enumint_t open_flags, gate_controlstream_t **stream)
 Open a volume for direct data access.

Detailed Description

logical storage volume info and access utilities

Macro Definition Documentation

◆ GATE_STORAGEVOLUME_PATH

#define GATE_STORAGEVOLUME_PATH   0x0001

identify volume by path field

◆ GATE_STORAGEVOLUME_UID

#define GATE_STORAGEVOLUME_UID   0x0002

identify volume by UID field

◆ GATE_STORAGEVOLUME_NAME

#define GATE_STORAGEVOLUME_NAME   0x0004

identify volume by name field

Function Documentation

◆ gate_storagevolume_enum()

GATE_SYSTEM_API gate_result_t gate_storagevolume_enum ( gate_storagevolume_enum_callback_t callback,
void * user_param )

Lists all detected storage volumes by calling a enumation callback function.

Parameters
[in]callbackcallback function to be called for each detected storage volume
[in]user_paramoptional user parameter attached to each callback call
Returns
GATE_RESULT_* result code

◆ gate_storagevolume_print_type()

GATE_SYSTEM_API char const * gate_storagevolume_print_type ( gate_enumint_t volume_type)

Returns a static human-readable string for each supported volume type.

Parameters
[in]GATE_STORAGEVOLUME_TYPE_*value
Returns
string representing the given volume_type value

◆ gate_storagevolume_find()

GATE_SYSTEM_API gate_result_t gate_storagevolume_find ( gate_string_t const * field,
gate_enumint_t field_type,
gate_storagevolume_t * volume )

Finds a volume by a given identifier.

Parameters
[in]fieldstring identifying the volume
[in]field_typetype of field string from GATE_STORAGEVOLUME_*
[out]volumepointer to volume to be initialized with data from found volume
Returns
GATE_RESULT_* result code

◆ gate_storagevolume_openstream()

GATE_SYSTEM_API gate_result_t gate_storagevolume_openstream ( gate_storagevolume_t const * drive,
gate_enumint_t open_flags,
gate_controlstream_t ** stream )

Open a volume for direct data access.

Parameters
[in]drivepointer to storage volume descriptor to identify volume
[in]open_flagsopen-access flags from GATE_STREAM_OPEN_*
[out]streampointer to interface-pointer to be initialized with new stream object
Returns
GATE_RESULT_* result code