Layer over OS-dependent I/O interface. More...
Classes | |
| struct | PtpDeviceEntry |
| Linked-list entry for a single USB device. More... | |
Functions | |
| struct PtpDeviceEntry * | ptpusb_device_list (struct PtpRuntime *r) |
| Get a linked list of USB or PTP Devices. | |
| void | ptpusb_free_device_list (struct PtpDeviceEntry *e) |
| Frees the device entry linked list. | |
| int | ptp_device_open (struct PtpRuntime *r, struct PtpDeviceEntry *entry) |
| Open and connect to a device from the PtpDeviceEntry structure. | |
| int | ptp_device_connect (struct PtpRuntime *r) |
| Connects to the first PTP device it finds. | |
| int | ptp_cmd_write (struct PtpRuntime *r, void *to, unsigned int length) |
| Send data over the raw command endpoint for USB backend. | |
| int | ptp_cmd_read (struct PtpRuntime *r, void *to, unsigned int length) |
| Receive raw data over the command endpoint for USB backend. | |
| int | ptp_device_reset (struct PtpRuntime *r) |
| Reset the USB endpoints if possible. | |
| int | ptp_send_packet (struct PtpRuntime *r, unsigned int length) |
| Send packets in r->data. | |
| int | ptp_receive_all_packets (struct PtpRuntime *r) |
| Receive all packets into r->data. | |
| int | ptp_read_int (struct PtpRuntime *r, void *to, unsigned int length) |
| Poll the interrupt endpoint. | |
| int | ptp_device_close (struct PtpRuntime *r) |
| Disconnect from the current device. | |
| int | ptpip_connect (struct PtpRuntime *r, const char *addr, int port, int extra_tmout) |
| Connect to a TCP port on the default network adapter. | |
| int | ptpip_cmd_write (struct PtpRuntime *r, void *data, unsigned int size) |
| Send data over the raw command endpoint for USB backend. | |
| int | ptpip_cmd_read (struct PtpRuntime *r, void *data, unsigned int size) |
| Receive raw data over the command endpoint for USB backend. | |
| int | ptpip_connect_events (struct PtpRuntime *r, const char *addr, int port) |
| Connect PTP/IP event socket. Port depends on implementation. | |
| int | ptpip_event_send (struct PtpRuntime *r, void *data, unsigned int size) |
| int | ptpip_event_read (struct PtpRuntime *r, void *data, unsigned int size) |
| int | ptpip_device_close (struct PtpRuntime *r) |
| Disconnect from a PTP/IP device. | |
| void | ptpusb_free_device_list_entry (void *) |
| Backend must implement this to free the device_handle_ptr field in each device entry. | |
| int | ptpusb_get_status (struct PtpRuntime *r) |
| Get status of currently connected device This is a quick and cheap way to check if the connection is still established, which can be used if there isn't a vendor event polling mechanism. | |
| int | ptp_comm_init (struct PtpRuntime *r) |
| Initializes backend context. | |
| void | ptp_comm_deinit (struct PtpRuntime *r) |
| Deinits backend and frees all memory. | |
| __attribute__ ((deprecated)) __attribute__((unused)) static int ptp_device_init(struct PtpRuntime *r) | |
Layer over OS-dependent I/O interface.
| __attribute__ | ( | (deprecated) | ) |
Definition at line 93 of file cl_backend.h.
| int ptp_comm_init | ( | struct PtpRuntime * | r | ) |
Initializes backend context.
| int ptp_device_open | ( | struct PtpRuntime * | r, |
| struct PtpDeviceEntry * | entry ) |
Open and connect to a device from the PtpDeviceEntry structure.
| int ptpip_connect | ( | struct PtpRuntime * | r, |
| const char * | addr, | ||
| int | port, | ||
| int | extra_tmout ) |
Connect to a TCP port on the default network adapter.
| struct PtpDeviceEntry * ptpusb_device_list | ( | struct PtpRuntime * | r | ) |
Get a linked list of USB or PTP Devices.