1
2#![allow(non_upper_case_globals)]
3#![allow(non_camel_case_types)]
4#![allow(non_snake_case)]
5#![allow(dead_code)]
6#![allow(clippy::type_complexity)]
7
8unsafe impl Send for ThCommon {}
9unsafe impl Sync for ThCommon {}
10
11
12unsafe impl Send for ThInsGlobal {}
13unsafe impl Sync for ThInsGlobal {}
14
15
16
17
18
19
20
21
22pub const _STDINT_H: u32 = 1;
23pub const _FEATURES_H: u32 = 1;
24pub const _DEFAULT_SOURCE: u32 = 1;
25pub const __GLIBC_USE_ISOC2X: u32 = 0;
26pub const __USE_ISOC11: u32 = 1;
27pub const __USE_ISOC99: u32 = 1;
28pub const __USE_ISOC95: u32 = 1;
29pub const __USE_POSIX_IMPLICITLY: u32 = 1;
30pub const _POSIX_SOURCE: u32 = 1;
31pub const _POSIX_C_SOURCE: u32 = 200809;
32pub const __USE_POSIX: u32 = 1;
33pub const __USE_POSIX2: u32 = 1;
34pub const __USE_POSIX199309: u32 = 1;
35pub const __USE_POSIX199506: u32 = 1;
36pub const __USE_XOPEN2K: u32 = 1;
37pub const __USE_XOPEN2K8: u32 = 1;
38pub const _ATFILE_SOURCE: u32 = 1;
39pub const __USE_MISC: u32 = 1;
40pub const __USE_ATFILE: u32 = 1;
41pub const __USE_FORTIFY_LEVEL: u32 = 0;
42pub const __GLIBC_USE_DEPRECATED_GETS: u32 = 0;
43pub const __GLIBC_USE_DEPRECATED_SCANF: u32 = 0;
44pub const _STDC_PREDEF_H: u32 = 1;
45pub const __STDC_IEC_559__: u32 = 1;
46pub const __STDC_IEC_559_COMPLEX__: u32 = 1;
47pub const __STDC_ISO_10646__: u32 = 201706;
48pub const __GNU_LIBRARY__: u32 = 6;
49pub const __GLIBC__: u32 = 2;
50pub const __GLIBC_MINOR__: u32 = 31;
51pub const _SYS_CDEFS_H: u32 = 1;
52pub const __glibc_c99_flexarr_available: u32 = 1;
53pub const __WORDSIZE: u32 = 64;
54pub const __WORDSIZE_TIME64_COMPAT32: u32 = 1;
55pub const __SYSCALL_WORDSIZE: u32 = 64;
56pub const __LONG_DOUBLE_USES_FLOAT128: u32 = 0;
57pub const __HAVE_GENERIC_SELECTION: u32 = 1;
58pub const __GLIBC_USE_LIB_EXT2: u32 = 0;
59pub const __GLIBC_USE_IEC_60559_BFP_EXT: u32 = 0;
60pub const __GLIBC_USE_IEC_60559_BFP_EXT_C2X: u32 = 0;
61pub const __GLIBC_USE_IEC_60559_FUNCS_EXT: u32 = 0;
62pub const __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X: u32 = 0;
63pub const __GLIBC_USE_IEC_60559_TYPES_EXT: u32 = 0;
64pub const _BITS_TYPES_H: u32 = 1;
65pub const __TIMESIZE: u32 = 64;
66pub const _BITS_TYPESIZES_H: u32 = 1;
67pub const __OFF_T_MATCHES_OFF64_T: u32 = 1;
68pub const __INO_T_MATCHES_INO64_T: u32 = 1;
69pub const __RLIM_T_MATCHES_RLIM64_T: u32 = 1;
70pub const __STATFS_MATCHES_STATFS64: u32 = 1;
71pub const __FD_SETSIZE: u32 = 1024;
72pub const _BITS_TIME64_H: u32 = 1;
73pub const _BITS_WCHAR_H: u32 = 1;
74pub const _BITS_STDINT_INTN_H: u32 = 1;
75pub const _BITS_STDINT_UINTN_H: u32 = 1;
76pub const INT8_MIN: i32 = -128;
77pub const INT16_MIN: i32 = -32768;
78pub const INT32_MIN: i32 = -2147483648;
79pub const INT8_MAX: u32 = 127;
80pub const INT16_MAX: u32 = 32767;
81pub const INT32_MAX: u32 = 2147483647;
82pub const UINT8_MAX: u32 = 255;
83pub const UINT16_MAX: u32 = 65535;
84pub const UINT32_MAX: u32 = 4294967295;
85pub const INT_LEAST8_MIN: i32 = -128;
86pub const INT_LEAST16_MIN: i32 = -32768;
87pub const INT_LEAST32_MIN: i32 = -2147483648;
88pub const INT_LEAST8_MAX: u32 = 127;
89pub const INT_LEAST16_MAX: u32 = 32767;
90pub const INT_LEAST32_MAX: u32 = 2147483647;
91pub const UINT_LEAST8_MAX: u32 = 255;
92pub const UINT_LEAST16_MAX: u32 = 65535;
93pub const UINT_LEAST32_MAX: u32 = 4294967295;
94pub const INT_FAST8_MIN: i32 = -128;
95pub const INT_FAST16_MIN: i64 = -9223372036854775808;
96pub const INT_FAST32_MIN: i64 = -9223372036854775808;
97pub const INT_FAST8_MAX: u32 = 127;
98pub const INT_FAST16_MAX: u64 = 9223372036854775807;
99pub const INT_FAST32_MAX: u64 = 9223372036854775807;
100pub const UINT_FAST8_MAX: u32 = 255;
101pub const UINT_FAST16_MAX: i32 = -1;
102pub const UINT_FAST32_MAX: i32 = -1;
103pub const INTPTR_MIN: i64 = -9223372036854775808;
104pub const INTPTR_MAX: u64 = 9223372036854775807;
105pub const UINTPTR_MAX: i32 = -1;
106pub const PTRDIFF_MIN: i64 = -9223372036854775808;
107pub const PTRDIFF_MAX: u64 = 9223372036854775807;
108pub const SIG_ATOMIC_MIN: i32 = -2147483648;
109pub const SIG_ATOMIC_MAX: u32 = 2147483647;
110pub const SIZE_MAX: i32 = -1;
111pub const WINT_MIN: u32 = 0;
112pub const WINT_MAX: u32 = 4294967295;
113pub const TH_GITHASH: &[u8; 8] = b"ea1f4ec\0";
114pub const TH_COMPILE_DATE: &[u8; 9] = b"20251229\0";
115pub const TH_COMMON_ETCFN_APICALL: &[u8; 9] = b"api_call\0";
116pub type wchar_t = ::std::os::raw::c_int;
117#[repr(C)]
118#[repr(align(16))]
119#[derive(Debug, Default, Copy, Clone, PartialEq)]
120pub struct max_align_t {
121 pub __clang_max_align_nonce1: ::std::os::raw::c_longlong,
122 pub __bindgen_padding_0: u64,
123 pub __clang_max_align_nonce2: u128,
124}
125pub type __u_char = ::std::os::raw::c_uchar;
126pub type __u_short = ::std::os::raw::c_ushort;
127pub type __u_int = ::std::os::raw::c_uint;
128pub type __u_long = ::std::os::raw::c_ulong;
129pub type __int8_t = ::std::os::raw::c_schar;
130pub type __uint8_t = ::std::os::raw::c_uchar;
131pub type __int16_t = ::std::os::raw::c_short;
132pub type __uint16_t = ::std::os::raw::c_ushort;
133pub type __int32_t = ::std::os::raw::c_int;
134pub type __uint32_t = ::std::os::raw::c_uint;
135pub type __int64_t = ::std::os::raw::c_long;
136pub type __uint64_t = ::std::os::raw::c_ulong;
137pub type __int_least8_t = __int8_t;
138pub type __uint_least8_t = __uint8_t;
139pub type __int_least16_t = __int16_t;
140pub type __uint_least16_t = __uint16_t;
141pub type __int_least32_t = __int32_t;
142pub type __uint_least32_t = __uint32_t;
143pub type __int_least64_t = __int64_t;
144pub type __uint_least64_t = __uint64_t;
145pub type __quad_t = ::std::os::raw::c_long;
146pub type __u_quad_t = ::std::os::raw::c_ulong;
147pub type __intmax_t = ::std::os::raw::c_long;
148pub type __uintmax_t = ::std::os::raw::c_ulong;
149pub type __dev_t = ::std::os::raw::c_ulong;
150pub type __uid_t = ::std::os::raw::c_uint;
151pub type __gid_t = ::std::os::raw::c_uint;
152pub type __ino_t = ::std::os::raw::c_ulong;
153pub type __ino64_t = ::std::os::raw::c_ulong;
154pub type __mode_t = ::std::os::raw::c_uint;
155pub type __nlink_t = ::std::os::raw::c_ulong;
156pub type __off_t = ::std::os::raw::c_long;
157pub type __off64_t = ::std::os::raw::c_long;
158pub type __pid_t = ::std::os::raw::c_int;
159#[repr(C)]
160#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
161pub struct __fsid_t {
162 pub __val: [::std::os::raw::c_int; 2usize],
163}
164pub type __clock_t = ::std::os::raw::c_long;
165pub type __rlim_t = ::std::os::raw::c_ulong;
166pub type __rlim64_t = ::std::os::raw::c_ulong;
167pub type __id_t = ::std::os::raw::c_uint;
168pub type __time_t = ::std::os::raw::c_long;
169pub type __useconds_t = ::std::os::raw::c_uint;
170pub type __suseconds_t = ::std::os::raw::c_long;
171pub type __daddr_t = ::std::os::raw::c_int;
172pub type __key_t = ::std::os::raw::c_int;
173pub type __clockid_t = ::std::os::raw::c_int;
174pub type __timer_t = *mut ::std::os::raw::c_void;
175pub type __blksize_t = ::std::os::raw::c_long;
176pub type __blkcnt_t = ::std::os::raw::c_long;
177pub type __blkcnt64_t = ::std::os::raw::c_long;
178pub type __fsblkcnt_t = ::std::os::raw::c_ulong;
179pub type __fsblkcnt64_t = ::std::os::raw::c_ulong;
180pub type __fsfilcnt_t = ::std::os::raw::c_ulong;
181pub type __fsfilcnt64_t = ::std::os::raw::c_ulong;
182pub type __fsword_t = ::std::os::raw::c_long;
183pub type __ssize_t = ::std::os::raw::c_long;
184pub type __syscall_slong_t = ::std::os::raw::c_long;
185pub type __syscall_ulong_t = ::std::os::raw::c_ulong;
186pub type __loff_t = __off64_t;
187pub type __caddr_t = *mut ::std::os::raw::c_char;
188pub type __intptr_t = ::std::os::raw::c_long;
189pub type __socklen_t = ::std::os::raw::c_uint;
190pub type __sig_atomic_t = ::std::os::raw::c_int;
191pub type int_least8_t = __int_least8_t;
192pub type int_least16_t = __int_least16_t;
193pub type int_least32_t = __int_least32_t;
194pub type int_least64_t = __int_least64_t;
195pub type uint_least8_t = __uint_least8_t;
196pub type uint_least16_t = __uint_least16_t;
197pub type uint_least32_t = __uint_least32_t;
198pub type uint_least64_t = __uint_least64_t;
199pub type int_fast8_t = ::std::os::raw::c_schar;
200pub type int_fast16_t = ::std::os::raw::c_long;
201pub type int_fast32_t = ::std::os::raw::c_long;
202pub type int_fast64_t = ::std::os::raw::c_long;
203pub type uint_fast8_t = ::std::os::raw::c_uchar;
204pub type uint_fast16_t = ::std::os::raw::c_ulong;
205pub type uint_fast32_t = ::std::os::raw::c_ulong;
206pub type uint_fast64_t = ::std::os::raw::c_ulong;
207pub type intmax_t = __intmax_t;
208pub type uintmax_t = __uintmax_t;
209pub const TH_DATATYPE_TH_DT_VIDEO: TH_DATATYPE = 0;
210pub const TH_DATATYPE_TH_DT_AUDIO: TH_DATATYPE = 1;
211pub const TH_DATATYPE_TH_DT_PRIV1: TH_DATATYPE = 2;
212pub const TH_DATATYPE_TH_DT_RTP: TH_DATATYPE = 3;
213pub const TH_DATATYPE_TH_DT_COM: TH_DATATYPE = 4;
214pub const TH_DATATYPE_TH_DT_PS: TH_DATATYPE = 5;
215pub const TH_DATATYPE_TH_DT_DHAV: TH_DATATYPE = 6;
216pub const TH_DATATYPE_TH_DT_DATA: TH_DATATYPE = 7;
217pub const TH_DATATYPE_TH_DT_TS: TH_DATATYPE = 8;
218pub const TH_DATATYPE_TH_DT_EXTRA_VIDEO: TH_DATATYPE = 9;
219pub const TH_DATATYPE_TH_DT_EXTRA_AUDIO: TH_DATATYPE = 10;
220pub const TH_DATATYPE_TH_DT_RTP_FULL: TH_DATATYPE = 11;
221pub const TH_DATATYPE_TH_DT_FLV: TH_DATATYPE = 12;
222pub const TH_DATATYPE_TH_DT_FMP4: TH_DATATYPE = 13;
223pub const TH_DATATYPE_TH_DT_SDP: TH_DATATYPE = 14;
224pub type TH_DATATYPE = ::std::os::raw::c_uint;
225pub const TH_VIDEOCODECTYPE_TH_VCT_UNKOWN: TH_VIDEOCODECTYPE = 0;
226pub const TH_VIDEOCODECTYPE_TH_VCT_H264: TH_VIDEOCODECTYPE = 1;
227pub const TH_VIDEOCODECTYPE_TH_VCT_H265: TH_VIDEOCODECTYPE = 2;
228pub const TH_VIDEOCODECTYPE_TH_VCT_SVAC: TH_VIDEOCODECTYPE = 3;
229pub const TH_VIDEOCODECTYPE_TH_VCT_MPEG4: TH_VIDEOCODECTYPE = 4;
230pub const TH_VIDEOCODECTYPE_TH_VCT_OTHER: TH_VIDEOCODECTYPE = 5;
231pub const TH_VIDEOCODECTYPE_TH_VCT_SVAC3: TH_VIDEOCODECTYPE = 6;
232pub const TH_VIDEOCODECTYPE_TH_VCT_YUV: TH_VIDEOCODECTYPE = 7;
233pub const TH_VIDEOCODECTYPE_TH_VCT_JPEG: TH_VIDEOCODECTYPE = 8;
234pub const TH_VIDEOCODECTYPE_TH_VCT_YUV_NV12: TH_VIDEOCODECTYPE = 9;
235pub type TH_VIDEOCODECTYPE = ::std::os::raw::c_uint;
236pub const TH_AUDIOCODECTYPE_TH_ACT_UNKOWN: TH_AUDIOCODECTYPE = 0;
237pub const TH_AUDIOCODECTYPE_TH_ACT_G711: TH_AUDIOCODECTYPE = 1;
238pub const TH_AUDIOCODECTYPE_TH_ACT_AAC: TH_AUDIOCODECTYPE = 2;
239pub const TH_AUDIOCODECTYPE_TH_ACT_MP3: TH_AUDIOCODECTYPE = 3;
240pub const TH_AUDIOCODECTYPE_TH_ACT_OTHER: TH_AUDIOCODECTYPE = 4;
241pub type TH_AUDIOCODECTYPE = ::std::os::raw::c_uint;
242pub const TH_PRIVCODECTYPE_TH_PCT_UNKOWN: TH_PRIVCODECTYPE = 0;
243pub const TH_PRIVCODECTYPE_TH_PCT_PRIV1: TH_PRIVCODECTYPE = 1;
244pub type TH_PRIVCODECTYPE = ::std::os::raw::c_uint;
245pub const TH_VIDEOFRAMETYPE_TH_FT_I_FRAME: TH_VIDEOFRAMETYPE = 0;
246pub const TH_VIDEOFRAMETYPE_TH_FT_P_FRAME: TH_VIDEOFRAMETYPE = 1;
247pub const TH_VIDEOFRAMETYPE_TH_FT_B_FRAME: TH_VIDEOFRAMETYPE = 2;
248pub type TH_VIDEOFRAMETYPE = ::std::os::raw::c_uint;
249#[repr(C)]
250#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
251pub struct TH_ESStreamInfo {
252 pub streamType: ::std::os::raw::c_uint,
253 pub vCodecType: ::std::os::raw::c_uint,
254 pub aCodecType: ::std::os::raw::c_uint,
255 pub pCodecType: ::std::os::raw::c_uint,
256 pub frameType: ::std::os::raw::c_uint,
257 pub timestamp: ::std::os::raw::c_ulonglong,
258 pub frameRate: ::std::os::raw::c_uchar,
259 pub dts: i64,
260 pub pts: i64,
261 pub timebase_den: ::std::os::raw::c_int,
262 pub timebase_num: ::std::os::raw::c_int,
263 pub video_height: ::std::os::raw::c_int,
264 pub video_width: ::std::os::raw::c_int,
265 pub aSampleRate: ::std::os::raw::c_int,
266 pub aChannels: ::std::os::raw::c_int,
267 pub aSampleBits: ::std::os::raw::c_int,
268 pub ssrc: u64,
269 pub codecType: u64,
270 pub rela_count: u64,
271 pub rela_info: u64,
272 pub rela_data: u64,
273 pub rela_data_len: u64,
274}
275pub const TH_INS_TYPE_TH_INS_GLOBAL: TH_INS_TYPE = 1;
276pub const TH_INS_TYPE_TH_INS_ACCESS: TH_INS_TYPE = 2;
277pub const TH_INS_TYPE_TH_INS_RELAYGROUP: TH_INS_TYPE = 3;
278pub const TH_INS_TYPE_TH_INS_DEVICE: TH_INS_TYPE = 4;
279pub const TH_INS_TYPE_TH_INS_RELAY: TH_INS_TYPE = 5;
280pub const TH_INS_TYPE_TH_INS_FILTER: TH_INS_TYPE = 6;
281pub const TH_INS_TYPE_TH_INS_LOGGER: TH_INS_TYPE = 100;
282pub const TH_INS_TYPE_TH_INS_API: TH_INS_TYPE = 101;
283pub const TH_INS_TYPE_TH_INS_CENTER_AUTH: TH_INS_TYPE = 102;
284pub const TH_INS_TYPE_TH_INS_CENTER_CONFIG: TH_INS_TYPE = 103;
285pub const TH_INS_TYPE_TH_INS_CENTER_REG: TH_INS_TYPE = 104;
286pub const TH_INS_TYPE_TH_INS_HOOK: TH_INS_TYPE = 105;
287pub type TH_INS_TYPE = ::std::os::raw::c_uint;
288pub const TH_LOG_LEVEL_TH_LEVEL_TRACE: TH_LOG_LEVEL = 0;
289pub const TH_LOG_LEVEL_TH_LEVEL_DEBUG: TH_LOG_LEVEL = 1;
290pub const TH_LOG_LEVEL_TH_LEVEL_INFO: TH_LOG_LEVEL = 2;
291pub const TH_LOG_LEVEL_TH_LEVEL_WARN: TH_LOG_LEVEL = 3;
292pub const TH_LOG_LEVEL_TH_LEVEL_ERROR: TH_LOG_LEVEL = 4;
293pub const TH_LOG_LEVEL_TH_LEVEL_CRITICAL: TH_LOG_LEVEL = 5;
294pub const TH_LOG_LEVEL_TH_LEVEL_OFF: TH_LOG_LEVEL = 6;
295pub type TH_LOG_LEVEL = ::std::os::raw::c_uint;
296#[repr(C)]
297#[derive(Debug, PartialEq, Eq)]
298pub struct TH_LogLine {
299 pub code: *const ::std::os::raw::c_char,
300 pub body: *const ::std::os::raw::c_char,
301 pub level: ::std::os::raw::c_uint,
302 pub date: u64,
303 pub line: *const ::std::os::raw::c_char,
304 pub file: *const ::std::os::raw::c_char,
305 pub span_pair: *const ::std::os::raw::c_char,
306 pub span_parsed: ::std::os::raw::c_uint,
307}
308impl Default for TH_LogLine {
309 fn default() -> Self {
310 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
311 unsafe {
312 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
313 s.assume_init()
314 }
315 }
316}
317#[repr(C)]
318#[derive(Debug, PartialEq, Eq)]
319pub struct TH_ConfigCenterCbMsg {
320 pub config: *const ::std::os::raw::c_char,
321 pub dif: *const ::std::os::raw::c_char,
322}
323impl Default for TH_ConfigCenterCbMsg {
324 fn default() -> Self {
325 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
326 unsafe {
327 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
328 s.assume_init()
329 }
330 }
331}
332pub type TH_ConfigCenterCb = TH_ConfigCenterCbMsg;
333#[doc = " # ThEvent:\n\n - `event_type`:\n ## event_type:\n ### Access event (0, 100)\n - 1: Exception, access_id, hint(optional), Note: lead to access remove\n - 2: MediaEof, access_id, hint(optional), Note: Post this event when your\n what to override the `embed-eof of download-access`, Most of\n the time you don't need this event because `download-access` have post it\n\n ### Relay event [100, 200)\n - 100: Relay++, source_id, relay_id, full_url, meta, peer_addr(optional)\n - 101: Exception, source_id, relay_id, hint(optional)\n - 102: Relay--, source_id, relay_id, full_url, meta, peer_addr(optional),\n hint(optional)\n\n\n ### RelayGroup event [200, 300)\n - 200: Relay++, source_id, peer_addr, full_url, meta,\n scheme(optional)\n - 201: Relay--, source_id, peer_addr, full_url, meta,\n scheme(optional), hint(optional), hint(optional)\n - 202: RelayGroup idle, source_id\n - 203: Exception, source_id\n - 204: Other\n\n ### Device event [300, 400)\n - 300: Device state change, loginHandle, state, pluginName\n\n * ### AuthCenter event [400, 500)\n - 400: Auth offline\n - 401: Auth reconnect\n ```"]
334pub type ThEvent = *const ::std::os::raw::c_char;
335pub type ThEventCallback =
336 ::std::option::Option<unsafe extern "C" fn(event: ThEvent, user_data: ::std::os::raw::c_longlong)>;
337pub type ThResultCallback = ::std::option::Option<
338 unsafe extern "C" fn(
339 ret: ::std::os::raw::c_int,
340 result: *const ::std::os::raw::c_char,
341 result_len: usize,
342 user_data: ::std::os::raw::c_longlong,
343 ),
344>;
345pub type ThResultCallbackEx = ::std::option::Option<
346 unsafe extern "C" fn(
347 ret: ::std::os::raw::c_int,
348 result: *const ::std::os::raw::c_void,
349 result_len: usize,
350 user_data: *mut ::std::os::raw::c_void,
351 ),
352>;
353pub type DoEtcFn = ::std::option::Option<
354 unsafe extern "C" fn(
355 ctx: *mut ::std::os::raw::c_void,
356 json_data: *const ::std::os::raw::c_char,
357 result_cb: ThResultCallback,
358 user_data: ::std::os::raw::c_longlong,
359 ),
360>;
361pub type DoEtcFnEx = ::std::option::Option<
362 unsafe extern "C" fn(
363 ctx: *mut ::std::os::raw::c_void,
364 data: *const ::std::os::raw::c_void,
365 result_cb: ThResultCallbackEx,
366 result_cb_ctx: *mut ::std::os::raw::c_void,
367 ),
368>;
369pub type FilterCb = ::std::option::Option<
370 unsafe extern "C" fn(
371 ctx: *mut ::std::os::raw::c_void,
372 data: *const u8,
373 data_len: usize,
374 info: *const TH_ESStreamInfo,
375 ),
376>;
377#[repr(C)]
378#[derive(Debug, Copy, Clone)]
379pub struct ThCommon {
380 pub ctx: *mut ::std::os::raw::c_void,
381 pub print_log: ::std::option::Option<
382 unsafe extern "C" fn(
383 ctx: *mut ::std::os::raw::c_void,
384 level: TH_LOG_LEVEL,
385 log: *const ::std::os::raw::c_char,
386 log_len: usize,
387 ) -> *const ::std::os::raw::c_char,
388 >,
389 pub get_soul_scope_ex: ::std::option::Option<
390 unsafe extern "C" fn(
391 ctx: *mut ::std::os::raw::c_void,
392 scope: *const ::std::os::raw::c_char,
393 result_cb: ThResultCallback,
394 user_data: ::std::os::raw::c_longlong,
395 ),
396 >,
397 pub data_cb: ::std::option::Option<
398 unsafe extern "C" fn(
399 ctx: *mut ::std::os::raw::c_void,
400 access_id: *const ::std::os::raw::c_char,
401 data: *const u8,
402 data_len: usize,
403 info: *const TH_ESStreamInfo,
404 ) -> ::std::os::raw::c_int,
405 >,
406 pub event_cb: ::std::option::Option<
407 unsafe extern "C" fn(ctx: *mut ::std::os::raw::c_void, event: ThEvent) -> ::std::os::raw::c_int,
408 >,
409 pub do_etc_ex: DoEtcFn,
410 pub print_log_ex: ::std::option::Option<
411 unsafe extern "C" fn(
412 ctx: *mut ::std::os::raw::c_void,
413 log_line: *const TH_LogLine,
414 ) -> *const ::std::os::raw::c_char,
415 >,
416}
417#[repr(C)]
418#[derive(Debug)]
419pub struct ThInsGlobal {
420 pub ctx: *mut ::std::os::raw::c_void,
421 pub init: ::std::option::Option<
422 unsafe extern "C" fn(
423 ctx: *mut ::std::os::raw::c_void,
424 common: *const ThCommon,
425 err_out: *mut ::std::os::raw::c_char,
426 err_out_max: usize,
427 ) -> ::std::os::raw::c_int,
428 >,
429 pub version: ::std::option::Option<
430 unsafe extern "C" fn(
431 ctx: *mut ::std::os::raw::c_void,
432 out: *mut ::std::os::raw::c_char,
433 out_max: usize,
434 ) -> ::std::os::raw::c_int,
435 >,
436 pub uninit: ::std::option::Option<unsafe extern "C" fn(ctx: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int>,
437 pub do_etc_ex: DoEtcFn,
438}
439impl Default for ThInsGlobal {
440 fn default() -> Self {
441 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
442 unsafe {
443 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
444 s.assume_init()
445 }
446 }
447}
448#[repr(C)]
449#[derive(Debug)]
450pub struct ThInsLogger {
451 pub ctx: *mut ::std::os::raw::c_void,
452 pub init: ::std::option::Option<
453 unsafe extern "C" fn(
454 ctx: *mut ::std::os::raw::c_void,
455 yaml_data: *const ::std::os::raw::c_char,
456 err_out: *mut ::std::os::raw::c_char,
457 err_out_max: usize,
458 ) -> ::std::os::raw::c_int,
459 >,
460 pub print_log: ::std::option::Option<
461 unsafe extern "C" fn(
462 ctx: *mut ::std::os::raw::c_void,
463 log_line: *const TH_LogLine,
464 result_cb: ThResultCallback,
465 user_data: ::std::os::raw::c_longlong,
466 ),
467 >,
468 pub do_etc_ex: DoEtcFn,
469}
470impl Default for ThInsLogger {
471 fn default() -> Self {
472 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
473 unsafe {
474 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
475 s.assume_init()
476 }
477 }
478}
479#[repr(C)]
480#[derive(Debug)]
481pub struct ThInsApi {
482 pub ctx: *mut ::std::os::raw::c_void,
483 pub init: ::std::option::Option<
484 unsafe extern "C" fn(
485 ctx: *mut ::std::os::raw::c_void,
486 yaml_data: *const ::std::os::raw::c_char,
487 proc_: DoEtcFnEx,
488 proc_ctx: *mut ::std::os::raw::c_void,
489 err_out: *mut ::std::os::raw::c_char,
490 err_out_max: usize,
491 ) -> ::std::os::raw::c_int,
492 >,
493 pub shutdown: ::std::option::Option<unsafe extern "C" fn(ctx: *mut ::std::os::raw::c_void)>,
494 pub wait_for_shutdown: ::std::option::Option<unsafe extern "C" fn(ctx: *mut ::std::os::raw::c_void)>,
495 pub get_ip: ::std::option::Option<
496 unsafe extern "C" fn(
497 ctx: *const ::std::os::raw::c_void,
498 out: *mut ::std::os::raw::c_char,
499 out_max: usize,
500 ) -> ::std::os::raw::c_int,
501 >,
502 pub get_port:
503 ::std::option::Option<unsafe extern "C" fn(ctx: *const ::std::os::raw::c_void) -> ::std::os::raw::c_int>,
504 pub get_url: ::std::option::Option<
505 unsafe extern "C" fn(
506 ctx: *const ::std::os::raw::c_void,
507 out: *mut ::std::os::raw::c_char,
508 out_max: usize,
509 ) -> ::std::os::raw::c_int,
510 >,
511}
512impl Default for ThInsApi {
513 fn default() -> Self {
514 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
515 unsafe {
516 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
517 s.assume_init()
518 }
519 }
520}
521#[repr(C)]
522#[derive(Debug)]
523pub struct ThInsCenterAuth {
524 pub ctx: *mut ::std::os::raw::c_void,
525 pub init: ::std::option::Option<
526 unsafe extern "C" fn(
527 ctx: *mut ::std::os::raw::c_void,
528 yaml_data: *const ::std::os::raw::c_char,
529 err_out: *mut ::std::os::raw::c_char,
530 err_out_max: usize,
531 ) -> ::std::os::raw::c_int,
532 >,
533 pub auth: ::std::option::Option<
534 unsafe extern "C" fn(
535 ctx: *mut ::std::os::raw::c_void,
536 who: *const ::std::os::raw::c_char,
537 result_cb: ThResultCallback,
538 user_data: ::std::os::raw::c_longlong,
539 ),
540 >,
541}
542impl Default for ThInsCenterAuth {
543 fn default() -> Self {
544 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
545 unsafe {
546 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
547 s.assume_init()
548 }
549 }
550}
551#[repr(C)]
552#[derive(Debug)]
553pub struct ThInsCenterConfig {
554 pub ctx: *mut ::std::os::raw::c_void,
555 pub init: ::std::option::Option<
556 unsafe extern "C" fn(
557 ctx: *mut ::std::os::raw::c_void,
558 yaml_data: *const ::std::os::raw::c_char,
559 change_cb: DoEtcFnEx,
560 change_cb_ctx: *mut ::std::os::raw::c_void,
561 err_out: *mut ::std::os::raw::c_char,
562 err_out_max: usize,
563 ) -> ::std::os::raw::c_int,
564 >,
565 pub get_config: ::std::option::Option<
566 unsafe extern "C" fn(
567 ctx: *mut ::std::os::raw::c_void,
568 json_data: *const ::std::os::raw::c_char,
569 result_cb: ThResultCallbackEx,
570 result_cb_ctx: *mut ::std::os::raw::c_void,
571 ),
572 >,
573 pub get_link: ::std::option::Option<
574 unsafe extern "C" fn(
575 ctx: *mut ::std::os::raw::c_void,
576 json_data: *const ::std::os::raw::c_char,
577 result_cb: ThResultCallbackEx,
578 result_cb_ctx: *mut ::std::os::raw::c_void,
579 ),
580 >,
581}
582impl Default for ThInsCenterConfig {
583 fn default() -> Self {
584 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
585 unsafe {
586 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
587 s.assume_init()
588 }
589 }
590}
591#[repr(C)]
592#[derive(Debug)]
593pub struct ThInsCenterRegister {
594 pub ctx: *mut ::std::os::raw::c_void,
595 pub init: ::std::option::Option<
596 unsafe extern "C" fn(
597 ctx: *mut ::std::os::raw::c_void,
598 yaml_data: *const ::std::os::raw::c_char,
599 err_out: *mut ::std::os::raw::c_char,
600 err_out_max: usize,
601 ) -> ::std::os::raw::c_int,
602 >,
603 pub do_register: ::std::option::Option<
604 unsafe extern "C" fn(
605 ctx: *mut ::std::os::raw::c_void,
606 json_data: *const ::std::os::raw::c_char,
607 result_cb: ThResultCallbackEx,
608 result_cb_ctx: *mut ::std::os::raw::c_void,
609 ),
610 >,
611 pub de_register: ::std::option::Option<
612 unsafe extern "C" fn(
613 ctx: *mut ::std::os::raw::c_void,
614 json_data: *const ::std::os::raw::c_char,
615 result_cb: ThResultCallbackEx,
616 result_cb_ctx: *mut ::std::os::raw::c_void,
617 ),
618 >,
619}
620impl Default for ThInsCenterRegister {
621 fn default() -> Self {
622 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
623 unsafe {
624 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
625 s.assume_init()
626 }
627 }
628}
629#[repr(C)]
630#[derive(Debug)]
631pub struct ThInsHook {
632 pub ctx: *mut ::std::os::raw::c_void,
633 pub init: ::std::option::Option<
634 unsafe extern "C" fn(
635 ctx: *mut ::std::os::raw::c_void,
636 yaml_data: *const ::std::os::raw::c_char,
637 err_out: *mut ::std::os::raw::c_char,
638 err_out_max: usize,
639 ) -> ::std::os::raw::c_int,
640 >,
641 pub post: ::std::option::Option<
642 unsafe extern "C" fn(
643 ctx: *mut ::std::os::raw::c_void,
644 message: *const ::std::os::raw::c_char,
645 result_cb: ThResultCallback,
646 user_data: ::std::os::raw::c_longlong,
647 ),
648 >,
649}
650impl Default for ThInsHook {
651 fn default() -> Self {
652 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
653 unsafe {
654 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
655 s.assume_init()
656 }
657 }
658}
659#[repr(C)]
660#[derive(Debug)]
661pub struct ThInsRelayGroup {
662 pub ctx: *mut ::std::os::raw::c_void,
663 pub init_relay_group: ::std::option::Option<
664 unsafe extern "C" fn(
665 ctx: *mut ::std::os::raw::c_void,
666 err_out: *mut ::std::os::raw::c_char,
667 err_out_max: usize,
668 ) -> ::std::os::raw::c_int,
669 >,
670 pub publish_relay: ::std::option::Option<
671 unsafe extern "C" fn(
672 ctx: *mut ::std::os::raw::c_void,
673 source_id: *const ::std::os::raw::c_char,
674 relay_id: *const ::std::os::raw::c_char,
675 json_data: *const ::std::os::raw::c_char,
676 meta: *const ::std::os::raw::c_char,
677 out: *mut ::std::os::raw::c_char,
678 out_max: usize,
679 err_out: *mut ::std::os::raw::c_char,
680 err_out_max: usize,
681 ) -> ::std::os::raw::c_int,
682 >,
683 pub stop_publish_relay: ::std::option::Option<
684 unsafe extern "C" fn(
685 ctx: *mut ::std::os::raw::c_void,
686 source_id: *const ::std::os::raw::c_char,
687 err_out: *mut ::std::os::raw::c_char,
688 err_out_max: usize,
689 ) -> ::std::os::raw::c_int,
690 >,
691 pub input_data: ::std::option::Option<
692 unsafe extern "C" fn(
693 ctx: *mut ::std::os::raw::c_void,
694 source_id: *const ::std::os::raw::c_char,
695 data: *const u8,
696 data_len: usize,
697 info: *const TH_ESStreamInfo,
698 err_out: *mut ::std::os::raw::c_char,
699 err_out_max: usize,
700 ) -> ::std::os::raw::c_int,
701 >,
702 pub do_etc_ex: DoEtcFn,
703}
704impl Default for ThInsRelayGroup {
705 fn default() -> Self {
706 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
707 unsafe {
708 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
709 s.assume_init()
710 }
711 }
712}
713#[repr(C)]
714#[derive(Debug)]
715pub struct ThInsRelay {
716 pub ctx: *mut ::std::os::raw::c_void,
717 pub publish_relay: ::std::option::Option<
718 unsafe extern "C" fn(
719 ctx: *mut ::std::os::raw::c_void,
720 source_id: *const ::std::os::raw::c_char,
721 relay_id: *const ::std::os::raw::c_char,
722 json_data: *const ::std::os::raw::c_char,
723 meta: *const ::std::os::raw::c_char,
724 out: *mut ::std::os::raw::c_char,
725 out_max: usize,
726 err_out: *mut ::std::os::raw::c_char,
727 err_out_max: usize,
728 ) -> ::std::os::raw::c_int,
729 >,
730 pub input_data: ::std::option::Option<
731 unsafe extern "C" fn(
732 ctx: *mut ::std::os::raw::c_void,
733 data: *const u8,
734 data_len: usize,
735 info: *const TH_ESStreamInfo,
736 err_out: *mut ::std::os::raw::c_char,
737 err_out_max: usize,
738 ) -> ::std::os::raw::c_int,
739 >,
740 pub do_etc_ex: DoEtcFn,
741}
742impl Default for ThInsRelay {
743 fn default() -> Self {
744 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
745 unsafe {
746 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
747 s.assume_init()
748 }
749 }
750}
751#[repr(C)]
752#[derive(Debug)]
753pub struct ThInsFilter {
754 pub ctx: *mut ::std::os::raw::c_void,
755 pub init: ::std::option::Option<
756 unsafe extern "C" fn(
757 ctx: *mut ::std::os::raw::c_void,
758 json_data: *const ::std::os::raw::c_char,
759 meta: *const ::std::os::raw::c_char,
760 data_cb: FilterCb,
761 data_cb_ctx: *mut ::std::os::raw::c_void,
762 err_out: *mut ::std::os::raw::c_char,
763 err_out_max: usize,
764 ) -> ::std::os::raw::c_int,
765 >,
766 pub do_filter: ::std::option::Option<
767 unsafe extern "C" fn(
768 ctx: *mut ::std::os::raw::c_void,
769 data: *const u8,
770 data_len: usize,
771 info: *const TH_ESStreamInfo,
772 ) -> ::std::os::raw::c_int,
773 >,
774 pub uninit: ::std::option::Option<unsafe extern "C" fn(ctx: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int>,
775 pub do_etc_ex: DoEtcFn,
776}
777impl Default for ThInsFilter {
778 fn default() -> Self {
779 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
780 unsafe {
781 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
782 s.assume_init()
783 }
784 }
785}
786#[repr(C)]
787#[derive(Debug)]
788pub struct ThInsAccess {
789 pub ctx: *mut ::std::os::raw::c_void,
790 pub do_access: ::std::option::Option<
791 unsafe extern "C" fn(
792 ctx: *mut ::std::os::raw::c_void,
793 access_id: *const ::std::os::raw::c_char,
794 json_data: *const ::std::os::raw::c_char,
795 out: *mut ::std::os::raw::c_char,
796 out_max: usize,
797 err_out: *mut ::std::os::raw::c_char,
798 err_out_max: usize,
799 ) -> ::std::os::raw::c_int,
800 >,
801 pub de_access: ::std::option::Option<
802 unsafe extern "C" fn(
803 ctx: *mut ::std::os::raw::c_void,
804 err_out: *mut ::std::os::raw::c_char,
805 err_out_max: usize,
806 ) -> ::std::os::raw::c_int,
807 >,
808 pub do_etc_ex: DoEtcFn,
809}
810impl Default for ThInsAccess {
811 fn default() -> Self {
812 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
813 unsafe {
814 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
815 s.assume_init()
816 }
817 }
818}
819#[repr(C)]
820#[derive(Debug)]
821pub struct ThInsDevice {
822 pub ctx: *mut ::std::os::raw::c_void,
823 pub login: ::std::option::Option<
824 unsafe extern "C" fn(
825 ctx: *mut ::std::os::raw::c_void,
826 json_data: *const ::std::os::raw::c_char,
827 out: *mut ::std::os::raw::c_char,
828 out_max: usize,
829 err_out: *mut ::std::os::raw::c_char,
830 err_out_max: usize,
831 ) -> ::std::os::raw::c_int,
832 >,
833 pub logout: ::std::option::Option<
834 unsafe extern "C" fn(
835 ctx: *mut ::std::os::raw::c_void,
836 err_out: *mut ::std::os::raw::c_char,
837 err_out_max: usize,
838 ) -> ::std::os::raw::c_int,
839 >,
840 pub do_etc_ex: DoEtcFn,
841}
842impl Default for ThInsDevice {
843 fn default() -> Self {
844 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
845 unsafe {
846 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
847 s.assume_init()
848 }
849 }
850}