|
CardSight 0.1.0
C API reference for the CardSight firmware and application
|
Public interface of the exFAT proxy view. More...
Go to the source code of this file.
Data Structures | |
| struct | storage_proxy_config |
| What the caller wants the proxy to expose. More... | |
| struct | storage_proxy_partition_info |
| One source partition as found by a scan of the card. More... | |
Macros | |
| #define | STORAGE_PROXY_MAX_PARTITIONS 8U |
| Number of source partitions the view can expose. | |
Functions | |
| int | storage_proxy_start (const char *source_disk) |
| Start the view over every partition found on the disk. | |
| int | storage_proxy_start_config (const struct storage_proxy_config *config) |
| Start the view with an explicit partition selection. | |
| int | storage_proxy_scan (const char *source_disk, struct storage_proxy_partition_info *partitions, size_t capacity, size_t *count) |
| Describe the partitions of a disk without starting the view. | |
| void | storage_proxy_stop (void) |
| Stop the view and release everything it holds. | |
| void | storage_proxy_source_lost (void) |
| Mark the source card as gone so the view only fails until it is stopped. | |
| bool | storage_proxy_running (void) |
| Report whether the view is running. | |
| bool | storage_proxy_read_only (void) |
| Report whether the view refuses writes. | |
| const char * | storage_proxy_device_name (void) |
| Return the block device name the view is registered under. | |
| size_t | storage_proxy_entry_count (void) |
| Return the number of index nodes the view currently holds. | |
| int | storage_proxy_partition_status (uint32_t partition) |
| Return the probe status of one source partition. | |
Public interface of the exFAT proxy view.
The proxy synthesises one exFAT volume whose partition folders are backed by the mounted source file systems, and exposes it as block device cardview0 for the USB mass storage gadget.
| const char * storage_proxy_device_name | ( | void | ) |
Return the block device name the view is registered under.
| size_t storage_proxy_entry_count | ( | void | ) |
Return the number of index nodes the view currently holds.
| int storage_proxy_partition_status | ( | uint32_t | partition | ) |
Return the probe status of one source partition.
| [in] | partition | Zero-based partition index. |
| bool storage_proxy_read_only | ( | void | ) |
Report whether the view refuses writes.
| bool storage_proxy_running | ( | void | ) |
Report whether the view is running.
| int storage_proxy_scan | ( | const char * | source_disk, |
| struct storage_proxy_partition_info * | partitions, | ||
| size_t | capacity, | ||
| size_t * | count ) |
Describe the partitions of a disk without starting the view.
| [in] | source_disk | Whole-disk block device name. |
| [out] | partitions | Array receiving one entry per present partition. |
| [in] | capacity | Number of entries partitions can hold. |
| [out] | count | Number of entries filled. |
| int storage_proxy_start | ( | const char * | source_disk | ) |
Start the view over every partition found on the disk.
| [in] | source_disk | Block device name of the whole disk. |
| int storage_proxy_start_config | ( | const struct storage_proxy_config * | config | ) |
Start the view with an explicit partition selection.
| [in] | config | Source disk and selection mask. |