From aaf658e15bb9d50d0b6be80e762da8ea9646a180 Mon Sep 17 00:00:00 2001 From: petabyt Date: Sun, 15 Sep 2024 04:09:32 +0000 Subject: [PATCH] deploy: 7c181754349589ef956cf0bcbc473d5f15d5c38e --- camlib_8h_source.html | 155 +++++++++++++++++----------------- doxygen_crawl.html | 1 - functions.html | 1 - functions_func.html | 1 - search/all_a.js | 57 ++++++------- search/functions_0.js | 29 +++---- structPtpRuntime-members.html | 45 +++++----- structPtpRuntime.html | 27 +----- 8 files changed, 141 insertions(+), 175 deletions(-) diff --git a/camlib_8h_source.html b/camlib_8h_source.html index 615cb7d..02e4d92 100644 --- a/camlib_8h_source.html +++ b/camlib_8h_source.html @@ -284,86 +284,84 @@
251
254PUB void ptp_mutex_unlock(struct PtpRuntime *r);
255
-
258PUB void ptp_mutex_unlock_thread(struct PtpRuntime *r);
-
259
-
265PUB void ptp_mutex_keep_locked(struct PtpRuntime *r);
-
266
-
269PUB void ptp_mutex_lock(struct PtpRuntime *r);
-
270
-
274PUB int ptp_device_type(struct PtpRuntime *r);
-
275
-
279PUB int ptp_check_opcode(struct PtpRuntime *r, int opcode);
-
280
-
284PUB int ptp_check_prop(struct PtpRuntime *r, int code);
-
285
-
289PUB int ptp_buffer_resize(struct PtpRuntime *r, size_t size);
-
290
-
291// Data structure functions
-
292PUB int ptp_write_unicode_string(char *dat, const char *string);
-
293PUB int ptp_read_unicode_string(char *buffer, char *dat, int max);
-
294PUB int ptp_read_utf8_string(void *dat, char *string, int max);
-
295PUB int ptp_read_string(uint8_t *dat, char *string, int max);
-
296PUB int ptp_write_string(uint8_t *dat, const char *string);
-
297PUB int ptp_write_utf8_string(void *dat, const char *string);
-
298PUB int ptp_read_uint16_array(const uint8_t *dat, uint16_t *buf, int max, int *length);
-
299PUB int ptp_read_uint16_array_s(uint8_t *bs, uint8_t *be, uint16_t *buf, int max, int *length);
-
300inline static int ptp_write_u8 (void *buf, uint8_t out) { ((uint8_t *)buf)[0] = out; return 1; }
-
301inline static int ptp_write_u16(void *buf, uint16_t out) { ((uint16_t *)buf)[0] = out; return 2; }
-
302inline static int ptp_write_u32(void *buf, uint32_t out) { ((uint32_t *)buf)[0] = out; return 4; }
-
303inline static int ptp_read_u32 (const void *buf, uint32_t *out) { *out = ((const uint32_t *)buf)[0]; return 4; }
-
304inline static int ptp_read_u16 (const void *buf, uint16_t *out) { *out = ((const uint16_t *)buf)[0]; return 2; }
-
305inline static int ptp_read_u8 (const void *buf, uint8_t *out) { *out = ((const uint8_t *)buf)[0]; return 1; }
+
259PUB void ptp_mutex_unlock_thread(struct PtpRuntime *r);
+
260
+
263PUB void ptp_mutex_lock(struct PtpRuntime *r);
+
264
+
268PUB int ptp_device_type(struct PtpRuntime *r);
+
269
+
273PUB int ptp_check_opcode(struct PtpRuntime *r, int opcode);
+
274
+
278PUB int ptp_check_prop(struct PtpRuntime *r, int code);
+
279
+
283PUB int ptp_buffer_resize(struct PtpRuntime *r, size_t size);
+
284
+
285// Data structure functions
+
286PUB int ptp_write_unicode_string(char *dat, const char *string);
+
287PUB int ptp_read_unicode_string(char *buffer, char *dat, int max);
+
288PUB int ptp_read_utf8_string(void *dat, char *string, int max);
+
289PUB int ptp_read_string(uint8_t *dat, char *string, int max);
+
290PUB int ptp_write_string(uint8_t *dat, const char *string);
+
291PUB int ptp_write_utf8_string(void *dat, const char *string);
+
292PUB int ptp_read_uint16_array(const uint8_t *dat, uint16_t *buf, int max, int *length);
+
293PUB int ptp_read_uint16_array_s(uint8_t *bs, uint8_t *be, uint16_t *buf, int max, int *length);
+
294inline static int ptp_write_u8 (void *buf, uint8_t out) { ((uint8_t *)buf)[0] = out; return 1; }
+
295inline static int ptp_write_u16(void *buf, uint16_t out) { ((uint16_t *)buf)[0] = out; return 2; }
+
296inline static int ptp_write_u32(void *buf, uint32_t out) { ((uint32_t *)buf)[0] = out; return 4; }
+
297inline static int ptp_read_u32 (const void *buf, uint32_t *out) { *out = ((const uint32_t *)buf)[0]; return 4; }
+
298inline static int ptp_read_u16 (const void *buf, uint16_t *out) { *out = ((const uint16_t *)buf)[0]; return 2; }
+
299inline static int ptp_read_u8 (const void *buf, uint8_t *out) { *out = ((const uint8_t *)buf)[0]; return 1; }
+
300
+
301// Build a new PTP/IP or PTP/USB command packet in r->data
+
302int ptp_new_cmd_packet(struct PtpRuntime *r, struct PtpCommand *cmd);
+
303
+
304// Only for PTP_USB or PTP_USB_IP use
+
305int ptp_new_data_packet(struct PtpRuntime *r, struct PtpCommand *cmd, void *data, int data_length);
306
-
307// Build a new PTP/IP or PTP/USB command packet in r->data
-
308int ptp_new_cmd_packet(struct PtpRuntime *r, struct PtpCommand *cmd);
-
309
-
310// Only for PTP_USB or PTP_USB_IP use
-
311int ptp_new_data_packet(struct PtpRuntime *r, struct PtpCommand *cmd, void *data, int data_length);
-
312
-
313// Only use for PTP_IP
-
314int ptpip_data_start_packet(struct PtpRuntime *r, int data_length);
-
315int ptpip_data_end_packet(struct PtpRuntime *r, void *data, int data_length);
+
307// Only use for PTP_IP
+
308int ptpip_data_start_packet(struct PtpRuntime *r, int data_length);
+
309int ptpip_data_end_packet(struct PtpRuntime *r, void *data, int data_length);
+
310
+
311// Used only by ptp_open_session
+
312void ptp_update_transaction(struct PtpRuntime *r, int t);
+
313
+
314// Set avail info for prop
+
315void ptp_set_prop_avail_info(struct PtpRuntime *r, int code, int memb_size, int cnt, void *data);
316
-
317// Used only by ptp_open_session
-
318void ptp_update_transaction(struct PtpRuntime *r, int t);
-
319
-
320// Set avail info for prop
-
321void ptp_set_prop_avail_info(struct PtpRuntime *r, int code, int memb_size, int cnt, void *data);
+
317void *ptp_dup_payload(struct PtpRuntime *r);
+
318
+
321int ptp_dump(struct PtpRuntime *r);
322
-
323void *ptp_dup_payload(struct PtpRuntime *r);
-
324
-
327int ptp_dump(struct PtpRuntime *r);
-
328
-
329#define CAMLIB_INCLUDE_IMPL
-
330#include "cl_data.h"
-
331#include "cl_backend.h"
-
332#include "cl_ops.h"
-
333#include "cl_enum.h"
-
334#include "cl_bind.h"
-
335
-
336// Backwards compatibility (mostly renamed functions)
-
337#ifndef CAMLIB_NO_COMPAT
-
338 #define ptp_get_last_transaction(...) ptp_get_last_transaction_id(__VA_ARGS__)
-
339 #define ptp_generic_new(...) ptp_new(__VA_ARGS__)
-
340 #define ptp_generic_close(...) ptp_close(__VA_ARGS__)
-
341 #define ptp_generic_reset(...) ptp_reset(__VA_ARGS__)
-
342 #define ptp_generic_init(...) ptp_init(__VA_ARGS__)
-
343 #define ptp_generic_send(...) ptp_send(__VA_ARGS__)
-
344 #define ptp_generic_send_data(...) ptp_send_data(__VA_ARGS__)
-
345#endif
-
346
-
347typedef void ptp_object_found_callback(struct PtpRuntime *r, struct PtpObjectInfo *oi, void *arg);
-
348
-
349// Object service api (object.c) - optional
-
350// Not documented yet
-
351struct ObjectCache *ptp_create_object_service(int *handles, int length, ptp_object_found_callback *callback, void *arg);
-
352struct PtpObjectInfo *ptp_object_service_get(struct PtpRuntime *r, struct ObjectCache *oc, int handle);
-
353struct PtpObjectInfo *ptp_object_service_get_index(struct PtpRuntime *r, struct ObjectCache *oc, int req_i);
-
354int ptp_object_service_length(struct PtpRuntime *r, struct ObjectCache *oc);
-
355int ptp_object_service_step(struct PtpRuntime *r, struct ObjectCache *oc);
-
356void ptp_object_service_add_priority(struct PtpRuntime *r, struct ObjectCache *oc, int handle);
-
357
-
358#endif
+
323#define CAMLIB_INCLUDE_IMPL
+
324#include "cl_data.h"
+
325#include "cl_backend.h"
+
326#include "cl_ops.h"
+
327#include "cl_enum.h"
+
328#include "cl_bind.h"
+
329
+
330// Backwards compatibility (mostly renamed functions)
+
331#ifndef CAMLIB_NO_COMPAT
+
332 #define ptp_get_last_transaction(...) ptp_get_last_transaction_id(__VA_ARGS__)
+
333 #define ptp_generic_new(...) ptp_new(__VA_ARGS__)
+
334 #define ptp_generic_close(...) ptp_close(__VA_ARGS__)
+
335 #define ptp_generic_reset(...) ptp_reset(__VA_ARGS__)
+
336 #define ptp_generic_init(...) ptp_init(__VA_ARGS__)
+
337 #define ptp_generic_send(...) ptp_send(__VA_ARGS__)
+
338 #define ptp_generic_send_data(...) ptp_send_data(__VA_ARGS__)
+
339#endif
+
340
+
341typedef void ptp_object_found_callback(struct PtpRuntime *r, struct PtpObjectInfo *oi, void *arg);
+
342
+
343// Object service api (object.c) - optional
+
344// Not documented yet
+
345struct ObjectCache *ptp_create_object_service(int *handles, int length, ptp_object_found_callback *callback, void *arg);
+
346struct PtpObjectInfo *ptp_object_service_get(struct PtpRuntime *r, struct ObjectCache *oc, int handle);
+
347struct PtpObjectInfo *ptp_object_service_get_index(struct PtpRuntime *r, struct ObjectCache *oc, int req_i);
+
348int ptp_object_service_length(struct PtpRuntime *r, struct ObjectCache *oc);
+
349int ptp_object_service_step(struct PtpRuntime *r, struct ObjectCache *oc);
+
350void ptp_object_service_add_priority(struct PtpRuntime *r, struct ObjectCache *oc, int handle);
+
351
+
352#endif
int ptp_dump(struct PtpRuntime *r)
Write r->data to a file called DUMP.
const char * ptp_perror(int rc)
Evaluates PtpGeneralError into string message.
PtpConnType
Tells lib what backend and packet style to use.
Definition camlib.h:97
@@ -414,11 +412,10 @@
PUB int ptp_get_return_code(struct PtpRuntime *r)
Returns the return code (RC) currently in the data buffer.
struct PtpDeviceInfo * di
Info about current connection, used to detect camera type, supported opodes, etc.
Definition camlib.h:141
uint8_t wait_for_response
Optionally wait up to 256 seconds for a response. Some PTP operations require this,...
Definition camlib.h:159
-
PUB void ptp_mutex_unlock_thread(struct PtpRuntime *r)
Completely unlock the mutex for the current thread, to ensure there isn't a deadlock.
+
PUB void ptp_mutex_unlock_thread(struct PtpRuntime *r)
Completely unlock the mutex for the current thread, to ensure there isn't a deadlock....
PUB int ptp_device_type(struct PtpRuntime *r)
Gets type of device from r->di.
uint8_t connection_type
One of enum PtpConnType.
Definition camlib.h:124
PUB int ptp_get_payload_length(struct PtpRuntime *r)
Get length of payload returned by ptp_get_payload.
-
PUB void ptp_mutex_keep_locked(struct PtpRuntime *r)
Keep the mutex locked one more time for the current thread.