|
int | ptp_get_return_code (struct PtpRuntime *r) |
| Returns the return code (RC) currently in the data buffer.
|
|
int | ptp_get_param_length (struct PtpRuntime *r) |
| Get number of parameters in packet in data buffer.
|
|
uint32_t | ptp_get_param (struct PtpRuntime *r, int i) |
| Get parameter at index i.
|
|
int | ptp_get_last_transaction_id (struct PtpRuntime *r) |
| Get transaction ID of packet in the data buffer.
|
|
uint8_t * | ptp_get_payload (struct PtpRuntime *r) |
| Get ptr of packet payload in data buffer, after packet header.
|
|
int | ptp_get_payload_length (struct PtpRuntime *r) |
| Get length of payload returned by ptp_get_payload.
|
|
struct PtpRuntime * | ptp_new (int options) |
| Allocate new PtpRuntime based on bitfield options - see PtpConnType.
|
|
void | ptp_reset (struct PtpRuntime *r) |
| Reset all session-specific fields of PtpRuntime - both libusb and libwpd backends call this before establishing connection, so calling this is not required.
|
|
void | ptp_init (struct PtpRuntime *r) |
| Init PtpRuntime locally - uses default recommended settings (USB)
|
|
void | ptp_close (struct PtpRuntime *r) |
| Frees PtpRuntime data buffer - doesn't free the actual structure, or device info (yet)
|
|
int | ptp_send (struct PtpRuntime *r, struct PtpCommand *cmd) |
| Send a command request to the device with no data phase.
|
|
int | ptp_send_data (struct PtpRuntime *r, struct PtpCommand *cmd, void *data, int length) |
| Send a command request to the device with a data phase (thread safe)
|
|
int | ptp_get_event (struct PtpRuntime *r, struct PtpEventContainer *ec) |
| Try and get an event from the camera over int endpoint (USB-only)
|
|
void | ptp_mutex_unlock (struct PtpRuntime *r) |
| Unlock the IO mutex (unless it was kept locked)
|
|
void | ptp_mutex_keep_locked (struct PtpRuntime *r) |
| Keep the mutex locked one more time for the current thread.
|
|
void | ptp_mutex_lock (struct PtpRuntime *r) |
| Lock the IO mutex - only should be used by backend.
|
|
int | ptp_device_type (struct PtpRuntime *r) |
| Gets type of device from r->di.
|
|
int | ptp_check_opcode (struct PtpRuntime *r, int opcode) |
| Check if an opcode is supported by looking through supported props in r->di.
|
|
int | ptp_check_prop (struct PtpRuntime *r, int code) |
| Check if a property code is supported by looking through supported props in r->di.
|
|
int | ptp_buffer_resize (struct PtpRuntime *r, size_t size) |
| Mostly for internal use - realloc the data buffer.
|
|
int | ptp_set_generic_property (struct PtpRuntime *r, const char *name, int value) |
| Set a generic property - abstraction over SetDeviceProp.
|
|
int | ptp_pre_take_picture (struct PtpRuntime *r) |
| Call before taking a picture - this is generally for 'focusing' On some cameras this does nothing.
|
|
int | ptp_take_picture (struct PtpRuntime *r) |
| Call after calling ptp_pre_take_picture - this time a picture will be taken.
|
|
int | ptp_open_session (struct PtpRuntime *r) |
| Open a new session - required for most commands.
|
|
int | ptp_close_session (struct PtpRuntime *r) |
|
int | ptp_get_device_info (struct PtpRuntime *r, struct PtpDeviceInfo *di) |
|
int | ptp_init_capture (struct PtpRuntime *r, int storage_id, int object_format) |
|
int | ptp_init_open_capture (struct PtpRuntime *r, int storage_id, int object_format) |
|
int | ptp_terminate_open_capture (struct PtpRuntime *r, int trans) |
|
int | ptp_get_storage_info (struct PtpRuntime *r, int id, struct PtpStorageInfo *si) |
|
int | ptp_send_object_info (struct PtpRuntime *r, int storage_id, int handle, struct PtpObjectInfo *oi) |
|
int | ptp_get_prop_value (struct PtpRuntime *r, int code) |
|
int | ptp_set_prop_value (struct PtpRuntime *r, int code, int value) |
|
int | ptp_set_prop_value_data (struct PtpRuntime *r, int code, void *data, int length) |
|
int | ptp_get_prop_desc (struct PtpRuntime *r, int code, struct PtpPropDesc *pd) |
|
int | ptp_get_object_handles (struct PtpRuntime *r, int id, int format, int in, struct PtpArray **a) |
| Gets a list of object handles in a storage device or folder.
|
|
int | ptp_get_object_info (struct PtpRuntime *r, uint32_t handle, struct PtpObjectInfo *oi) |
|
int | ptp_move_object (struct PtpRuntime *r, int storage_id, int handle, int folder) |
|
int | ptp_delete_object (struct PtpRuntime *r, int handle, int format_code) |
|
int | ptp_get_thumbnail (struct PtpRuntime *r, int handle) |
| Raw JPEG data is accessible from ptp_get_payload()
|
|
int | ptp_get_partial_object (struct PtpRuntime *r, uint32_t handle, int offset, int max) |
|
int | ptp_get_object (struct PtpRuntime *r, int handle) |
| Download an object.
|
|
int | ptp_download_object (struct PtpRuntime *r, int handle, FILE *stream, size_t max) |
| Download an object from handle, to a local file (uses GetPartialObject)
|
|
int | ptp_get_all_known (struct PtpRuntime *r, struct PtpGenericEvent **s, int *length) |
| Recieve a generic list of all properties received in DeviceInfo This is similar to getting all events, but for first startup when you know nothing. Some vendors do this, but this gets all the properties manually.
|
|
int | ptpip_init_events (struct PtpRuntime *r) |
|
int | ptpip_init_command_request (struct PtpRuntime *r, char *device_name) |
|
Holds all camlib instance info.