pict
Documentation for pict is still a work-in-progress
Toggle main menu visibility
Loading...
Searching...
No Matches
cl_bind.h
Go to the documentation of this file.
1
2
// Bindings for usage in IPC, etc. Niche and not very well supported or implemented.
3
#ifndef CL_BIND_H
4
#define CL_BIND_H
5
6
// Recommended buffer size for bind_run
7
#define PTP_BIND_DEFAULT_SIZE 5000000
8
9
#define BIND_MAX_NAME 64
10
11
struct
BindReq
{
12
// @brief Argument passed to out or out_bytes
13
void
*arg;
14
// @brief Output JSON data
15
int (*out)(
struct
BindReq
*bind,
char
*fmt, ...);
17
int (*
out_bytes
)(
struct
BindReq
*bind,
void
*
bytes
,
size_t
length);
18
20
char
name
[BIND_MAX_NAME];
21
24
int
params
[5];
25
int
params_length;
27
char
*
string
;
29
uint8_t *
bytes
;
30
int
bytes_length;
31
};
32
33
// @brief Run a binding directly from an instance of struct BindReq
34
int
bind_run_req(
struct
PtpRuntime
*r,
struct
BindReq
*bind);
35
36
#endif
BindReq
Definition
cl_bind.h:11
BindReq::out_bytes
int(* out_bytes)(struct BindReq *bind, void *bytes, size_t length)
Output raw binary data.
Definition
cl_bind.h:17
BindReq::params
int params[5]
Parameters for command.
Definition
cl_bind.h:24
BindReq::bytes
uint8_t * bytes
Data argument, NULL for none.
Definition
cl_bind.h:29
BindReq::string
char * string
String argument, NULL for none.
Definition
cl_bind.h:27
BindReq::name
char name[BIND_MAX_NAME]
Name of command to be run.
Definition
cl_bind.h:20
PtpRuntime
Represents a single device connection.
Definition
libpict.h:104
src
cl_bind.h
Generated by
1.17.0