|
USBIP C library 0.7.0
Virtual USB devices & host drivers over USB/IP
|
Collaboration diagram for MTP - Media Transfer Protocol:Files | |
| file | mtp.h |
| USB MTP (Media Transfer Protocol) v1.1 device class. | |
Data Structures | |
| struct | mtp_opts |
| MTP configuration: device identity + one or more storage backends. More... | |
Macros | |
| #define | MTP_MAX_STORAGES |
| Maximum number of storages a device may expose. | |
Typedefs | |
| typedef struct mtp_func | mtp_func |
| One MTP function: a single instance of the class on a device. | |
| typedef void(* | mtp_emit) (void *ctx, const char *name) |
| Callback used by mtp_opts::listdir to report one directory entry. | |
Functions | |
| mtp_func * | mtp_add (usbip_device *dev, const mtp_opts *opts) |
| Add an MTP interface to a device. | |
Variables | |
| const usbip_device_class | usbip_device_mtp |
| The MTP class, for usbip_device_add_class() | |
| #define MTP_MAX_STORAGES |
Maximum number of storages a device may expose.
One MTP function: a single instance of the class on a device.
Opaque - create one with mtp_add() and use the functions below. Distinct from the other classes' handles, so mixing them up is a compile error rather than a misread state block.
| typedef void(* mtp_emit) (void *ctx, const char *name) |
Callback used by mtp_opts::listdir to report one directory entry.
| ctx | the opaque pointer that listdir() was handed. |
| name | the entry's name (a single path component, not a full path). |
| mtp_func * mtp_add | ( | usbip_device * | dev, |
| const mtp_opts * | opts | ||
| ) |
Add an MTP interface to a device.
| dev | the device. |
| opts | device identity + one or more storage backends (see mtp_opts). |
NULL on error.
|
extern |
The MTP class, for usbip_device_add_class()