Backend reading a PFS file.
More...
|
| bool | gb_storage_file_setup (GetBytesStorage *storage, GetBytesObjectType object_type, GetBytesStorageInfo *info) |
| | Set up the storage, see gb_storage_setup().
|
| |
| GetBytesInfoErrorCode | gb_storage_file_get_size (GetBytesStorage *storage, uint32_t *size) |
| | Get the object size, see gb_storage_get_size().
|
| |
| bool | gb_storage_file_read_next_chunk (GetBytesStorage *storage, uint8_t *buffer, uint32_t len) |
| | Read the next chunk, see gb_storage_read_next_chunk().
|
| |
| void | gb_storage_file_cleanup (GetBytesStorage *storage, bool successful) |
| | Release the storage, see gb_storage_cleanup().
|
| |
Backend reading a PFS file.
◆ gb_storage_file_cleanup()
| void gb_storage_file_cleanup |
( |
GetBytesStorage * |
storage, |
|
|
bool |
successful |
|
) |
| |
Release the storage, see gb_storage_cleanup().
Closes the file.
- Parameters
-
| storage | Storage. |
| successful | The whole object was sent. |
◆ gb_storage_file_get_size()
◆ gb_storage_file_read_next_chunk()
| bool gb_storage_file_read_next_chunk |
( |
GetBytesStorage * |
storage, |
|
|
uint8_t * |
buffer, |
|
|
uint32_t |
len |
|
) |
| |
Read the next chunk, see gb_storage_read_next_chunk().
- Parameters
-
| storage | Storage. |
| [out] | buffer | Destination. |
| len | Number of bytes to read. |
- Returns
- true on success.
◆ gb_storage_file_setup()
Set up the storage, see gb_storage_setup().
Opens the file for reading.
- Parameters
-
| [out] | storage | Storage. |
| object_type | Object type. |
| info | Request parameters. |
- Returns
- true on success.