From 542dec17eb84192a15d9b64d90f8cdd55cf401b8 Mon Sep 17 00:00:00 2001 From: petabyt Date: Sun, 24 Mar 2024 02:39:59 +0000 Subject: [PATCH] deploy: d57699400cffa069f876ef9ff3228e56ad95f0b6 --- camlib_8h_source.html | 105 ++++++++++++++++++++---------------------- 1 file changed, 51 insertions(+), 54 deletions(-) diff --git a/camlib_8h_source.html b/camlib_8h_source.html index f9b250b..dc0be29 100644 --- a/camlib_8h_source.html +++ b/camlib_8h_source.html @@ -291,65 +291,62 @@
253void ptp_write_uint8(void *dat, uint8_t b);
254int ptp_write_uint32(void *dat, uint32_t b);
255
-
256//void ptp_read_string(void *dat, char *string, int max);
-
257//int ptp_read_uint16_array(void *dat, uint16_t *buf, int max);
-
258//int ptp_write_string(void *dat, char *string);
-
259int ptp_write_unicode_string(char *dat, char *string);
-
260int ptp_read_unicode_string(char *buffer, char *dat, int max);
-
261int ptp_read_utf8_string(void *dat, char *string, int max);
-
262
-
263int ptp_read_string(uint8_t *dat, char *string, int max);
-
264int ptp_write_string(uint8_t *dat, char *string);
-
265int ptp_write_utf8_string(void *dat, char *string);
-
266int ptp_read_uint16_array(uint8_t *dat, uint16_t *buf, int max, int *length);
-
267
-
268inline static int ptp_write_u8 (void *buf, uint8_t out) { ((uint8_t *)buf)[0] = out; return 1; }
-
269inline static int ptp_write_u16(void *buf, uint16_t out) { ((uint16_t *)buf)[0] = out; return 2; }
-
270inline static int ptp_write_u32(void *buf, uint32_t out) { ((uint32_t *)buf)[0] = out; return 4; }
-
271inline static int ptp_read_u32 (void *buf, uint32_t *out) { *out = ((uint32_t *)buf)[0]; return 4; }
-
272inline static int ptp_read_u16 (void *buf, uint16_t *out) { *out = ((uint16_t *)buf)[0]; return 2; }
-
273inline static int ptp_read_u8 (void *buf, uint8_t *out) { *out = ((uint8_t *)buf)[0]; return 1; }
+
256int ptp_write_unicode_string(char *dat, char *string);
+
257int ptp_read_unicode_string(char *buffer, char *dat, int max);
+
258int ptp_read_utf8_string(void *dat, char *string, int max);
+
259
+
260int ptp_read_string(uint8_t *dat, char *string, int max);
+
261int ptp_write_string(uint8_t *dat, char *string);
+
262int ptp_write_utf8_string(void *dat, char *string);
+
263int ptp_read_uint16_array(uint8_t *dat, uint16_t *buf, int max, int *length);
+
264
+
265inline static int ptp_write_u8 (void *buf, uint8_t out) { ((uint8_t *)buf)[0] = out; return 1; }
+
266inline static int ptp_write_u16(void *buf, uint16_t out) { ((uint16_t *)buf)[0] = out; return 2; }
+
267inline static int ptp_write_u32(void *buf, uint32_t out) { ((uint32_t *)buf)[0] = out; return 4; }
+
268inline static int ptp_read_u32 (void *buf, uint32_t *out) { *out = ((uint32_t *)buf)[0]; return 4; }
+
269inline static int ptp_read_u16 (void *buf, uint16_t *out) { *out = ((uint16_t *)buf)[0]; return 2; }
+
270inline static int ptp_read_u8 (void *buf, uint8_t *out) { *out = ((uint8_t *)buf)[0]; return 1; }
+
271
+
272// Build a new PTP/IP or PTP/USB command packet in r->data
+
273int ptp_new_cmd_packet(struct PtpRuntime *r, struct PtpCommand *cmd);
274
-
275// Build a new PTP/IP or PTP/USB command packet in r->data
-
276int ptp_new_cmd_packet(struct PtpRuntime *r, struct PtpCommand *cmd);
+
275// Only for PTP_USB or PTP_USB_IP use
+
276int ptp_new_data_packet(struct PtpRuntime *r, struct PtpCommand *cmd, void *data, int data_length);
277
-
278// Only for PTP_USB or PTP_USB_IP use
-
279int ptp_new_data_packet(struct PtpRuntime *r, struct PtpCommand *cmd, void *data, int data_length);
-
280
-
281// Only use for PTP_IP
-
282int ptpip_data_start_packet(struct PtpRuntime *r, int data_length);
-
283int ptpip_data_end_packet(struct PtpRuntime *r, void *data, int data_length);
+
278// Only use for PTP_IP
+
279int ptpip_data_start_packet(struct PtpRuntime *r, int data_length);
+
280int ptpip_data_end_packet(struct PtpRuntime *r, void *data, int data_length);
+
281
+
282// Used only by ptp_open_session
+
283void ptp_update_transaction(struct PtpRuntime *r, int t);
284
-
285// Used only by ptp_open_session
-
286void ptp_update_transaction(struct PtpRuntime *r, int t);
+
285// Set avail info for prop
+
286void ptp_set_prop_avail_info(struct PtpRuntime *r, int code, int memb_size, int cnt, void *data);
287
-
288// Set avail info for prop
-
289void ptp_set_prop_avail_info(struct PtpRuntime *r, int code, int memb_size, int cnt, void *data);
-
290
-
291void *ptp_dup_payload(struct PtpRuntime *r);
+
288void *ptp_dup_payload(struct PtpRuntime *r);
+
289
+
290// Write r->data to a file called DUMP
+
291int ptp_dump(struct PtpRuntime *r);
292
-
293// Write r->data to a file called DUMP
-
294int ptp_dump(struct PtpRuntime *r);
-
295
-
296#define CAMLIB_INCLUDE_IMPL
-
297#include "cl_data.h"
-
298#include "cl_backend.h"
-
299#include "cl_ops.h"
-
300#include "cl_enum.h"
-
301#include "cl_bind.h"
-
302
-
303// Backwards compatibility (mostly renamed functions)
-
304#ifndef CAMLIB_NO_COMPAT
-
305 #define ptp_get_last_transaction(...) ptp_get_last_transaction_id(__VA_ARGS__)
-
306 #define ptp_generic_new(...) ptp_new(__VA_ARGS__)
-
307 #define ptp_generic_close(...) ptp_close(__VA_ARGS__)
-
308 #define ptp_generic_reset(...) ptp_reset(__VA_ARGS__)
-
309 #define ptp_generic_init(...) ptp_init(__VA_ARGS__)
-
310 #define ptp_generic_send(...) ptp_send(__VA_ARGS__)
-
311 #define ptp_generic_send_data(...) ptp_send_data(__VA_ARGS__)
-
312#endif
-
313
-
314#endif
+
293#define CAMLIB_INCLUDE_IMPL
+
294#include "cl_data.h"
+
295#include "cl_backend.h"
+
296#include "cl_ops.h"
+
297#include "cl_enum.h"
+
298#include "cl_bind.h"
+
299
+
300// Backwards compatibility (mostly renamed functions)
+
301#ifndef CAMLIB_NO_COMPAT
+
302 #define ptp_get_last_transaction(...) ptp_get_last_transaction_id(__VA_ARGS__)
+
303 #define ptp_generic_new(...) ptp_new(__VA_ARGS__)
+
304 #define ptp_generic_close(...) ptp_close(__VA_ARGS__)
+
305 #define ptp_generic_reset(...) ptp_reset(__VA_ARGS__)
+
306 #define ptp_generic_init(...) ptp_init(__VA_ARGS__)
+
307 #define ptp_generic_send(...) ptp_send(__VA_ARGS__)
+
308 #define ptp_generic_send_data(...) ptp_send_data(__VA_ARGS__)
+
309#endif
+
310
+
311#endif
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 es...
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)