
#![allow(non_upper_case_globals)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(dead_code)]
#![allow(clippy::type_complexity)]

unsafe impl Send for ThCommon {}
unsafe impl Sync for ThCommon {}

unsafe impl Send for ThInsGlobal {}
unsafe impl Sync for ThInsGlobal {}




// impl Clone for TH_ESStreamInfo {
//     fn clone(&self) -> Self {
//         Self {
//             streamType: self.streamType,
//             vCodecType: self.vCodecType,
//             aCodecType: self.aCodecType,
//             pCodecType: self.pCodecType,
//             frameType: self.frameType,
//             timestamp: self.timestamp,
//             frameRate: self.frameRate,
//             dts: self.dts,
//             pts: self.pts,
//             timebase_den: self.timebase_den,
//             timebase_num: self.timebase_num,
//             video_height: self.video_height,
//             video_width: self.video_width,
//             aSampleRate: self.aSampleRate,
//             aChannels: self.aChannels,
//             aSampleBits: self.aSampleBits,
//             ssrc: self.ssrc,
//             codecType: self.codecType,
//             rela_count: self.rela_count,
//             rela_info: self.rela_info,
//             rela_data: self.rela_data,
//             rela_data_len: self.rela_data_len,
//         }
//     }
// }



pub const _STDINT_H: u32 = 1;
pub const _FEATURES_H: u32 = 1;
pub const _DEFAULT_SOURCE: u32 = 1;
pub const __GLIBC_USE_ISOC2X: u32 = 0;
pub const __USE_ISOC11: u32 = 1;
pub const __USE_ISOC99: u32 = 1;
pub const __USE_ISOC95: u32 = 1;
pub const __USE_POSIX_IMPLICITLY: u32 = 1;
pub const _POSIX_SOURCE: u32 = 1;
pub const _POSIX_C_SOURCE: u32 = 200809;
pub const __USE_POSIX: u32 = 1;
pub const __USE_POSIX2: u32 = 1;
pub const __USE_POSIX199309: u32 = 1;
pub const __USE_POSIX199506: u32 = 1;
pub const __USE_XOPEN2K: u32 = 1;
pub const __USE_XOPEN2K8: u32 = 1;
pub const _ATFILE_SOURCE: u32 = 1;
pub const __USE_MISC: u32 = 1;
pub const __USE_ATFILE: u32 = 1;
pub const __USE_FORTIFY_LEVEL: u32 = 0;
pub const __GLIBC_USE_DEPRECATED_GETS: u32 = 0;
pub const __GLIBC_USE_DEPRECATED_SCANF: u32 = 0;
pub const _STDC_PREDEF_H: u32 = 1;
pub const __STDC_IEC_559__: u32 = 1;
pub const __STDC_IEC_559_COMPLEX__: u32 = 1;
pub const __STDC_ISO_10646__: u32 = 201706;
pub const __GNU_LIBRARY__: u32 = 6;
pub const __GLIBC__: u32 = 2;
pub const __GLIBC_MINOR__: u32 = 31;
pub const _SYS_CDEFS_H: u32 = 1;
pub const __glibc_c99_flexarr_available: u32 = 1;
pub const __WORDSIZE: u32 = 64;
pub const __WORDSIZE_TIME64_COMPAT32: u32 = 1;
pub const __SYSCALL_WORDSIZE: u32 = 64;
pub const __LONG_DOUBLE_USES_FLOAT128: u32 = 0;
pub const __HAVE_GENERIC_SELECTION: u32 = 1;
pub const __GLIBC_USE_LIB_EXT2: u32 = 0;
pub const __GLIBC_USE_IEC_60559_BFP_EXT: u32 = 0;
pub const __GLIBC_USE_IEC_60559_BFP_EXT_C2X: u32 = 0;
pub const __GLIBC_USE_IEC_60559_FUNCS_EXT: u32 = 0;
pub const __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X: u32 = 0;
pub const __GLIBC_USE_IEC_60559_TYPES_EXT: u32 = 0;
pub const _BITS_TYPES_H: u32 = 1;
pub const __TIMESIZE: u32 = 64;
pub const _BITS_TYPESIZES_H: u32 = 1;
pub const __OFF_T_MATCHES_OFF64_T: u32 = 1;
pub const __INO_T_MATCHES_INO64_T: u32 = 1;
pub const __RLIM_T_MATCHES_RLIM64_T: u32 = 1;
pub const __STATFS_MATCHES_STATFS64: u32 = 1;
pub const __FD_SETSIZE: u32 = 1024;
pub const _BITS_TIME64_H: u32 = 1;
pub const _BITS_WCHAR_H: u32 = 1;
pub const _BITS_STDINT_INTN_H: u32 = 1;
pub const _BITS_STDINT_UINTN_H: u32 = 1;
pub const INT8_MIN: i32 = -128;
pub const INT16_MIN: i32 = -32768;
pub const INT32_MIN: i32 = -2147483648;
pub const INT8_MAX: u32 = 127;
pub const INT16_MAX: u32 = 32767;
pub const INT32_MAX: u32 = 2147483647;
pub const UINT8_MAX: u32 = 255;
pub const UINT16_MAX: u32 = 65535;
pub const UINT32_MAX: u32 = 4294967295;
pub const INT_LEAST8_MIN: i32 = -128;
pub const INT_LEAST16_MIN: i32 = -32768;
pub const INT_LEAST32_MIN: i32 = -2147483648;
pub const INT_LEAST8_MAX: u32 = 127;
pub const INT_LEAST16_MAX: u32 = 32767;
pub const INT_LEAST32_MAX: u32 = 2147483647;
pub const UINT_LEAST8_MAX: u32 = 255;
pub const UINT_LEAST16_MAX: u32 = 65535;
pub const UINT_LEAST32_MAX: u32 = 4294967295;
pub const INT_FAST8_MIN: i32 = -128;
pub const INT_FAST16_MIN: i64 = -9223372036854775808;
pub const INT_FAST32_MIN: i64 = -9223372036854775808;
pub const INT_FAST8_MAX: u32 = 127;
pub const INT_FAST16_MAX: u64 = 9223372036854775807;
pub const INT_FAST32_MAX: u64 = 9223372036854775807;
pub const UINT_FAST8_MAX: u32 = 255;
pub const UINT_FAST16_MAX: i32 = -1;
pub const UINT_FAST32_MAX: i32 = -1;
pub const INTPTR_MIN: i64 = -9223372036854775808;
pub const INTPTR_MAX: u64 = 9223372036854775807;
pub const UINTPTR_MAX: i32 = -1;
pub const PTRDIFF_MIN: i64 = -9223372036854775808;
pub const PTRDIFF_MAX: u64 = 9223372036854775807;
pub const SIG_ATOMIC_MIN: i32 = -2147483648;
pub const SIG_ATOMIC_MAX: u32 = 2147483647;
pub const SIZE_MAX: i32 = -1;
pub const WINT_MIN: u32 = 0;
pub const WINT_MAX: u32 = 4294967295;
pub const TH_GITHASH: &[u8; 8] = b"7f27de3\0";
pub const TH_COMPILE_DATE: &[u8; 9] = b"20251218\0";
pub const TH_COMMON_ETCFN_APICALL: &[u8; 9] = b"api_call\0";
pub type wchar_t = ::std::os::raw::c_int;
#[repr(C)]
#[repr(align(16))]
#[derive(Debug, Default, Copy, Clone, PartialEq)]
pub struct max_align_t {
    pub __clang_max_align_nonce1: ::std::os::raw::c_longlong,
    pub __bindgen_padding_0: u64,
    pub __clang_max_align_nonce2: u128,
}
pub type __u_char = ::std::os::raw::c_uchar;
pub type __u_short = ::std::os::raw::c_ushort;
pub type __u_int = ::std::os::raw::c_uint;
pub type __u_long = ::std::os::raw::c_ulong;
pub type __int8_t = ::std::os::raw::c_schar;
pub type __uint8_t = ::std::os::raw::c_uchar;
pub type __int16_t = ::std::os::raw::c_short;
pub type __uint16_t = ::std::os::raw::c_ushort;
pub type __int32_t = ::std::os::raw::c_int;
pub type __uint32_t = ::std::os::raw::c_uint;
pub type __int64_t = ::std::os::raw::c_long;
pub type __uint64_t = ::std::os::raw::c_ulong;
pub type __int_least8_t = __int8_t;
pub type __uint_least8_t = __uint8_t;
pub type __int_least16_t = __int16_t;
pub type __uint_least16_t = __uint16_t;
pub type __int_least32_t = __int32_t;
pub type __uint_least32_t = __uint32_t;
pub type __int_least64_t = __int64_t;
pub type __uint_least64_t = __uint64_t;
pub type __quad_t = ::std::os::raw::c_long;
pub type __u_quad_t = ::std::os::raw::c_ulong;
pub type __intmax_t = ::std::os::raw::c_long;
pub type __uintmax_t = ::std::os::raw::c_ulong;
pub type __dev_t = ::std::os::raw::c_ulong;
pub type __uid_t = ::std::os::raw::c_uint;
pub type __gid_t = ::std::os::raw::c_uint;
pub type __ino_t = ::std::os::raw::c_ulong;
pub type __ino64_t = ::std::os::raw::c_ulong;
pub type __mode_t = ::std::os::raw::c_uint;
pub type __nlink_t = ::std::os::raw::c_ulong;
pub type __off_t = ::std::os::raw::c_long;
pub type __off64_t = ::std::os::raw::c_long;
pub type __pid_t = ::std::os::raw::c_int;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
pub struct __fsid_t {
    pub __val: [::std::os::raw::c_int; 2usize],
}
pub type __clock_t = ::std::os::raw::c_long;
pub type __rlim_t = ::std::os::raw::c_ulong;
pub type __rlim64_t = ::std::os::raw::c_ulong;
pub type __id_t = ::std::os::raw::c_uint;
pub type __time_t = ::std::os::raw::c_long;
pub type __useconds_t = ::std::os::raw::c_uint;
pub type __suseconds_t = ::std::os::raw::c_long;
pub type __daddr_t = ::std::os::raw::c_int;
pub type __key_t = ::std::os::raw::c_int;
pub type __clockid_t = ::std::os::raw::c_int;
pub type __timer_t = *mut ::std::os::raw::c_void;
pub type __blksize_t = ::std::os::raw::c_long;
pub type __blkcnt_t = ::std::os::raw::c_long;
pub type __blkcnt64_t = ::std::os::raw::c_long;
pub type __fsblkcnt_t = ::std::os::raw::c_ulong;
pub type __fsblkcnt64_t = ::std::os::raw::c_ulong;
pub type __fsfilcnt_t = ::std::os::raw::c_ulong;
pub type __fsfilcnt64_t = ::std::os::raw::c_ulong;
pub type __fsword_t = ::std::os::raw::c_long;
pub type __ssize_t = ::std::os::raw::c_long;
pub type __syscall_slong_t = ::std::os::raw::c_long;
pub type __syscall_ulong_t = ::std::os::raw::c_ulong;
pub type __loff_t = __off64_t;
pub type __caddr_t = *mut ::std::os::raw::c_char;
pub type __intptr_t = ::std::os::raw::c_long;
pub type __socklen_t = ::std::os::raw::c_uint;
pub type __sig_atomic_t = ::std::os::raw::c_int;
pub type int_least8_t = __int_least8_t;
pub type int_least16_t = __int_least16_t;
pub type int_least32_t = __int_least32_t;
pub type int_least64_t = __int_least64_t;
pub type uint_least8_t = __uint_least8_t;
pub type uint_least16_t = __uint_least16_t;
pub type uint_least32_t = __uint_least32_t;
pub type uint_least64_t = __uint_least64_t;
pub type int_fast8_t = ::std::os::raw::c_schar;
pub type int_fast16_t = ::std::os::raw::c_long;
pub type int_fast32_t = ::std::os::raw::c_long;
pub type int_fast64_t = ::std::os::raw::c_long;
pub type uint_fast8_t = ::std::os::raw::c_uchar;
pub type uint_fast16_t = ::std::os::raw::c_ulong;
pub type uint_fast32_t = ::std::os::raw::c_ulong;
pub type uint_fast64_t = ::std::os::raw::c_ulong;
pub type intmax_t = __intmax_t;
pub type uintmax_t = __uintmax_t;
pub const TH_DATATYPE_TH_DT_VIDEO: TH_DATATYPE = 0;
pub const TH_DATATYPE_TH_DT_AUDIO: TH_DATATYPE = 1;
pub const TH_DATATYPE_TH_DT_PRIV1: TH_DATATYPE = 2;
pub const TH_DATATYPE_TH_DT_RTP: TH_DATATYPE = 3;
pub const TH_DATATYPE_TH_DT_COM: TH_DATATYPE = 4;
pub const TH_DATATYPE_TH_DT_PS: TH_DATATYPE = 5;
pub const TH_DATATYPE_TH_DT_DHAV: TH_DATATYPE = 6;
pub const TH_DATATYPE_TH_DT_DATA: TH_DATATYPE = 7;
pub const TH_DATATYPE_TH_DT_TS: TH_DATATYPE = 8;
pub const TH_DATATYPE_TH_DT_EXTRA_VIDEO: TH_DATATYPE = 9;
pub const TH_DATATYPE_TH_DT_EXTRA_AUDIO: TH_DATATYPE = 10;
pub const TH_DATATYPE_TH_DT_RTP_FULL: TH_DATATYPE = 11;
pub const TH_DATATYPE_TH_DT_FLV: TH_DATATYPE = 12;
pub const TH_DATATYPE_TH_DT_FMP4: TH_DATATYPE = 13;
pub const TH_DATATYPE_TH_DT_SDP: TH_DATATYPE = 14;
pub type TH_DATATYPE = ::std::os::raw::c_uint;
pub const TH_VIDEOCODECTYPE_TH_VCT_UNKOWN: TH_VIDEOCODECTYPE = 0;
pub const TH_VIDEOCODECTYPE_TH_VCT_H264: TH_VIDEOCODECTYPE = 1;
pub const TH_VIDEOCODECTYPE_TH_VCT_H265: TH_VIDEOCODECTYPE = 2;
pub const TH_VIDEOCODECTYPE_TH_VCT_SVAC: TH_VIDEOCODECTYPE = 3;
pub const TH_VIDEOCODECTYPE_TH_VCT_MPEG4: TH_VIDEOCODECTYPE = 4;
pub const TH_VIDEOCODECTYPE_TH_VCT_OTHER: TH_VIDEOCODECTYPE = 5;
pub const TH_VIDEOCODECTYPE_TH_VCT_SVAC3: TH_VIDEOCODECTYPE = 6;
pub const TH_VIDEOCODECTYPE_TH_VCT_YUV: TH_VIDEOCODECTYPE = 7;
pub const TH_VIDEOCODECTYPE_TH_VCT_JPEG: TH_VIDEOCODECTYPE = 8;
pub const TH_VIDEOCODECTYPE_TH_VCT_YUV_NV12: TH_VIDEOCODECTYPE = 9;
pub type TH_VIDEOCODECTYPE = ::std::os::raw::c_uint;
pub const TH_AUDIOCODECTYPE_TH_ACT_UNKOWN: TH_AUDIOCODECTYPE = 0;
pub const TH_AUDIOCODECTYPE_TH_ACT_G711: TH_AUDIOCODECTYPE = 1;
pub const TH_AUDIOCODECTYPE_TH_ACT_AAC: TH_AUDIOCODECTYPE = 2;
pub const TH_AUDIOCODECTYPE_TH_ACT_MP3: TH_AUDIOCODECTYPE = 3;
pub const TH_AUDIOCODECTYPE_TH_ACT_OTHER: TH_AUDIOCODECTYPE = 4;
pub type TH_AUDIOCODECTYPE = ::std::os::raw::c_uint;
pub const TH_PRIVCODECTYPE_TH_PCT_UNKOWN: TH_PRIVCODECTYPE = 0;
pub const TH_PRIVCODECTYPE_TH_PCT_PRIV1: TH_PRIVCODECTYPE = 1;
pub type TH_PRIVCODECTYPE = ::std::os::raw::c_uint;
pub const TH_VIDEOFRAMETYPE_TH_FT_I_FRAME: TH_VIDEOFRAMETYPE = 0;
pub const TH_VIDEOFRAMETYPE_TH_FT_P_FRAME: TH_VIDEOFRAMETYPE = 1;
pub const TH_VIDEOFRAMETYPE_TH_FT_B_FRAME: TH_VIDEOFRAMETYPE = 2;
pub type TH_VIDEOFRAMETYPE = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
pub struct TH_ESStreamInfo {
    pub streamType: ::std::os::raw::c_uint,
    pub vCodecType: ::std::os::raw::c_uint,
    pub aCodecType: ::std::os::raw::c_uint,
    pub pCodecType: ::std::os::raw::c_uint,
    pub frameType: ::std::os::raw::c_uint,
    pub timestamp: ::std::os::raw::c_ulonglong,
    pub frameRate: ::std::os::raw::c_uchar,
    pub dts: i64,
    pub pts: i64,
    pub timebase_den: ::std::os::raw::c_int,
    pub timebase_num: ::std::os::raw::c_int,
    pub video_height: ::std::os::raw::c_int,
    pub video_width: ::std::os::raw::c_int,
    pub aSampleRate: ::std::os::raw::c_int,
    pub aChannels: ::std::os::raw::c_int,
    pub aSampleBits: ::std::os::raw::c_int,
    pub ssrc: u64,
    pub codecType: u64,
    pub rela_count: u64,
    pub rela_info: u64,
    pub rela_data: u64,
    pub rela_data_len: u64,
}
pub const TH_INS_TYPE_TH_INS_GLOBAL: TH_INS_TYPE = 1;
pub const TH_INS_TYPE_TH_INS_ACCESS: TH_INS_TYPE = 2;
pub const TH_INS_TYPE_TH_INS_RELAYGROUP: TH_INS_TYPE = 3;
pub const TH_INS_TYPE_TH_INS_DEVICE: TH_INS_TYPE = 4;
pub const TH_INS_TYPE_TH_INS_RELAY: TH_INS_TYPE = 5;
pub const TH_INS_TYPE_TH_INS_FILTER: TH_INS_TYPE = 6;
pub const TH_INS_TYPE_TH_INS_LOGGER: TH_INS_TYPE = 100;
pub const TH_INS_TYPE_TH_INS_API: TH_INS_TYPE = 101;
pub const TH_INS_TYPE_TH_INS_CENTER_AUTH: TH_INS_TYPE = 102;
pub const TH_INS_TYPE_TH_INS_CENTER_CONFIG: TH_INS_TYPE = 103;
pub const TH_INS_TYPE_TH_INS_CENTER_REG: TH_INS_TYPE = 104;
pub const TH_INS_TYPE_TH_INS_HOOK: TH_INS_TYPE = 105;
pub type TH_INS_TYPE = ::std::os::raw::c_uint;
pub const TH_LOG_LEVEL_TH_LEVEL_TRACE: TH_LOG_LEVEL = 0;
pub const TH_LOG_LEVEL_TH_LEVEL_DEBUG: TH_LOG_LEVEL = 1;
pub const TH_LOG_LEVEL_TH_LEVEL_INFO: TH_LOG_LEVEL = 2;
pub const TH_LOG_LEVEL_TH_LEVEL_WARN: TH_LOG_LEVEL = 3;
pub const TH_LOG_LEVEL_TH_LEVEL_ERROR: TH_LOG_LEVEL = 4;
pub const TH_LOG_LEVEL_TH_LEVEL_CRITICAL: TH_LOG_LEVEL = 5;
pub const TH_LOG_LEVEL_TH_LEVEL_OFF: TH_LOG_LEVEL = 6;
pub type TH_LOG_LEVEL = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
pub struct TH_LogLine {
    pub code: *const ::std::os::raw::c_char,
    pub body: *const ::std::os::raw::c_char,
    pub level: ::std::os::raw::c_uint,
    pub date: u64,
    pub line: *const ::std::os::raw::c_char,
    pub file: *const ::std::os::raw::c_char,
    pub span_pair: *const ::std::os::raw::c_char,
    pub span_parsed: ::std::os::raw::c_uint,
}
impl Default for TH_LogLine {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
pub struct TH_ConfigCenterCbMsg {
    pub config: *const ::std::os::raw::c_char,
    pub dif: *const ::std::os::raw::c_char,
}
impl Default for TH_ConfigCenterCbMsg {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
pub type TH_ConfigCenterCb = TH_ConfigCenterCbMsg;
#[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 ```"]
pub type ThEvent = *const ::std::os::raw::c_char;
pub type ThEventCallback =
    ::std::option::Option<unsafe extern "C" fn(event: ThEvent, user_data: ::std::os::raw::c_longlong)>;
pub type ThResultCallback = ::std::option::Option<
    unsafe extern "C" fn(
        ret: ::std::os::raw::c_int,
        result: *const ::std::os::raw::c_char,
        result_len: usize,
        user_data: ::std::os::raw::c_longlong,
    ),
>;
pub type ThResultCallbackEx = ::std::option::Option<
    unsafe extern "C" fn(
        ret: ::std::os::raw::c_int,
        result: *const ::std::os::raw::c_void,
        result_len: usize,
        user_data: *mut ::std::os::raw::c_void,
    ),
>;
pub type DoEtcFn = ::std::option::Option<
    unsafe extern "C" fn(
        ctx: *mut ::std::os::raw::c_void,
        json_data: *const ::std::os::raw::c_char,
        result_cb: ThResultCallback,
        user_data: ::std::os::raw::c_longlong,
    ),
>;
pub type DoEtcFnEx = ::std::option::Option<
    unsafe extern "C" fn(
        ctx: *mut ::std::os::raw::c_void,
        data: *const ::std::os::raw::c_void,
        result_cb: ThResultCallbackEx,
        result_cb_ctx: *mut ::std::os::raw::c_void,
    ),
>;
pub type FilterCb = ::std::option::Option<
    unsafe extern "C" fn(
        ctx: *mut ::std::os::raw::c_void,
        data: *const u8,
        data_len: usize,
        info: *const TH_ESStreamInfo,
    ),
>;
#[repr(C)]
#[derive(Debug)]
pub struct ThCommon {
    pub ctx: *mut ::std::os::raw::c_void,
    pub print_log: ::std::option::Option<
        unsafe extern "C" fn(
            ctx: *mut ::std::os::raw::c_void,
            level: TH_LOG_LEVEL,
            log: *const ::std::os::raw::c_char,
            log_len: usize,
        ) -> *const ::std::os::raw::c_char,
    >,
    pub get_soul_scope_ex: ::std::option::Option<
        unsafe extern "C" fn(
            ctx: *mut ::std::os::raw::c_void,
            scope: *const ::std::os::raw::c_char,
            result_cb: ThResultCallback,
            user_data: ::std::os::raw::c_longlong,
        ),
    >,
    pub data_cb: ::std::option::Option<
        unsafe extern "C" fn(
            ctx: *mut ::std::os::raw::c_void,
            access_id: *const ::std::os::raw::c_char,
            data: *const u8,
            data_len: usize,
            info: *const TH_ESStreamInfo,
        ) -> ::std::os::raw::c_int,
    >,
    pub event_cb: ::std::option::Option<
        unsafe extern "C" fn(ctx: *mut ::std::os::raw::c_void, event: ThEvent) -> ::std::os::raw::c_int,
    >,
    pub do_etc_ex: DoEtcFn,
    pub print_log_ex: ::std::option::Option<
        unsafe extern "C" fn(
            ctx: *mut ::std::os::raw::c_void,
            log_line: *const TH_LogLine,
        ) -> *const ::std::os::raw::c_char,
    >,
}
#[repr(C)]
#[derive(Debug)]
pub struct ThInsGlobal {
    pub ctx: *mut ::std::os::raw::c_void,
    pub init: ::std::option::Option<
        unsafe extern "C" fn(
            ctx: *mut ::std::os::raw::c_void,
            common: *const ThCommon,
            err_out: *mut ::std::os::raw::c_char,
            err_out_max: usize,
        ) -> ::std::os::raw::c_int,
    >,
    pub version: ::std::option::Option<
        unsafe extern "C" fn(
            ctx: *mut ::std::os::raw::c_void,
            out: *mut ::std::os::raw::c_char,
            out_max: usize,
        ) -> ::std::os::raw::c_int,
    >,
    pub uninit: ::std::option::Option<unsafe extern "C" fn(ctx: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int>,
    pub do_etc_ex: DoEtcFn,
}
impl Default for ThInsGlobal {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug)]
pub struct ThInsLogger {
    pub ctx: *mut ::std::os::raw::c_void,
    pub init: ::std::option::Option<
        unsafe extern "C" fn(
            ctx: *mut ::std::os::raw::c_void,
            yaml_data: *const ::std::os::raw::c_char,
            err_out: *mut ::std::os::raw::c_char,
            err_out_max: usize,
        ) -> ::std::os::raw::c_int,
    >,
    pub print_log: ::std::option::Option<
        unsafe extern "C" fn(
            ctx: *mut ::std::os::raw::c_void,
            log_line: *const TH_LogLine,
            result_cb: ThResultCallback,
            user_data: ::std::os::raw::c_longlong,
        ),
    >,
    pub do_etc_ex: DoEtcFn,
}
impl Default for ThInsLogger {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug)]
pub struct ThInsApi {
    pub ctx: *mut ::std::os::raw::c_void,
    pub init: ::std::option::Option<
        unsafe extern "C" fn(
            ctx: *mut ::std::os::raw::c_void,
            yaml_data: *const ::std::os::raw::c_char,
            proc_: DoEtcFnEx,
            proc_ctx: *mut ::std::os::raw::c_void,
            err_out: *mut ::std::os::raw::c_char,
            err_out_max: usize,
        ) -> ::std::os::raw::c_int,
    >,
    pub shutdown: ::std::option::Option<unsafe extern "C" fn(ctx: *mut ::std::os::raw::c_void)>,
    pub wait_for_shutdown: ::std::option::Option<unsafe extern "C" fn(ctx: *mut ::std::os::raw::c_void)>,
    pub get_ip: ::std::option::Option<
        unsafe extern "C" fn(
            ctx: *const ::std::os::raw::c_void,
            out: *mut ::std::os::raw::c_char,
            out_max: usize,
        ) -> ::std::os::raw::c_int,
    >,
    pub get_port:
        ::std::option::Option<unsafe extern "C" fn(ctx: *const ::std::os::raw::c_void) -> ::std::os::raw::c_int>,
}
impl Default for ThInsApi {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug)]
pub struct ThInsCenterAuth {
    pub ctx: *mut ::std::os::raw::c_void,
    pub init: ::std::option::Option<
        unsafe extern "C" fn(
            ctx: *mut ::std::os::raw::c_void,
            yaml_data: *const ::std::os::raw::c_char,
            err_out: *mut ::std::os::raw::c_char,
            err_out_max: usize,
        ) -> ::std::os::raw::c_int,
    >,
    pub auth: ::std::option::Option<
        unsafe extern "C" fn(
            ctx: *mut ::std::os::raw::c_void,
            who: *const ::std::os::raw::c_char,
            result_cb: ThResultCallback,
            user_data: ::std::os::raw::c_longlong,
        ),
    >,
}
impl Default for ThInsCenterAuth {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug)]
pub struct ThInsCenterConfig {
    pub ctx: *mut ::std::os::raw::c_void,
    pub init: ::std::option::Option<
        unsafe extern "C" fn(
            ctx: *mut ::std::os::raw::c_void,
            yaml_data: *const ::std::os::raw::c_char,
            change_cb: DoEtcFnEx,
            change_cb_ctx: *mut ::std::os::raw::c_void,
            err_out: *mut ::std::os::raw::c_char,
            err_out_max: usize,
        ) -> ::std::os::raw::c_int,
    >,
    pub get_config: ::std::option::Option<
        unsafe extern "C" fn(
            ctx: *mut ::std::os::raw::c_void,
            json_data: *const ::std::os::raw::c_char,
            result_cb: ThResultCallbackEx,
            result_cb_ctx: *mut ::std::os::raw::c_void,
        ),
    >,
    pub get_link: ::std::option::Option<
        unsafe extern "C" fn(
            ctx: *mut ::std::os::raw::c_void,
            json_data: *const ::std::os::raw::c_char,
            result_cb: ThResultCallbackEx,
            result_cb_ctx: *mut ::std::os::raw::c_void,
        ),
    >,
}
impl Default for ThInsCenterConfig {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug)]
pub struct ThInsCenterRegister {
    pub ctx: *mut ::std::os::raw::c_void,
    pub init: ::std::option::Option<
        unsafe extern "C" fn(
            ctx: *mut ::std::os::raw::c_void,
            yaml_data: *const ::std::os::raw::c_char,
            err_out: *mut ::std::os::raw::c_char,
            err_out_max: usize,
        ) -> ::std::os::raw::c_int,
    >,
    pub do_register: ::std::option::Option<
        unsafe extern "C" fn(
            ctx: *mut ::std::os::raw::c_void,
            json_data: *const ::std::os::raw::c_char,
            result_cb: ThResultCallbackEx,
            result_cb_ctx: *mut ::std::os::raw::c_void,
        ),
    >,
    pub de_register: ::std::option::Option<
        unsafe extern "C" fn(
            ctx: *mut ::std::os::raw::c_void,
            json_data: *const ::std::os::raw::c_char,
            result_cb: ThResultCallbackEx,
            result_cb_ctx: *mut ::std::os::raw::c_void,
        ),
    >,
}
impl Default for ThInsCenterRegister {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug)]
pub struct ThInsHook {
    pub ctx: *mut ::std::os::raw::c_void,
    pub init: ::std::option::Option<
        unsafe extern "C" fn(
            ctx: *mut ::std::os::raw::c_void,
            yaml_data: *const ::std::os::raw::c_char,
            err_out: *mut ::std::os::raw::c_char,
            err_out_max: usize,
        ) -> ::std::os::raw::c_int,
    >,
    pub post: ::std::option::Option<
        unsafe extern "C" fn(
            ctx: *mut ::std::os::raw::c_void,
            message: *const ::std::os::raw::c_char,
            result_cb: ThResultCallback,
            user_data: ::std::os::raw::c_longlong,
        ),
    >,
}
impl Default for ThInsHook {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug)]
pub struct ThInsRelayGroup {
    pub ctx: *mut ::std::os::raw::c_void,
    pub init_relay_group: ::std::option::Option<
        unsafe extern "C" fn(
            ctx: *mut ::std::os::raw::c_void,
            err_out: *mut ::std::os::raw::c_char,
            err_out_max: usize,
        ) -> ::std::os::raw::c_int,
    >,
    pub publish_relay: ::std::option::Option<
        unsafe extern "C" fn(
            ctx: *mut ::std::os::raw::c_void,
            source_id: *const ::std::os::raw::c_char,
            relay_id: *const ::std::os::raw::c_char,
            json_data: *const ::std::os::raw::c_char,
            meta: *const ::std::os::raw::c_char,
            out: *mut ::std::os::raw::c_char,
            out_max: usize,
            err_out: *mut ::std::os::raw::c_char,
            err_out_max: usize,
        ) -> ::std::os::raw::c_int,
    >,
    pub stop_publish_relay: ::std::option::Option<
        unsafe extern "C" fn(
            ctx: *mut ::std::os::raw::c_void,
            source_id: *const ::std::os::raw::c_char,
            err_out: *mut ::std::os::raw::c_char,
            err_out_max: usize,
        ) -> ::std::os::raw::c_int,
    >,
    pub input_data: ::std::option::Option<
        unsafe extern "C" fn(
            ctx: *mut ::std::os::raw::c_void,
            source_id: *const ::std::os::raw::c_char,
            data: *const u8,
            data_len: usize,
            info: *const TH_ESStreamInfo,
            err_out: *mut ::std::os::raw::c_char,
            err_out_max: usize,
        ) -> ::std::os::raw::c_int,
    >,
    pub do_etc_ex: DoEtcFn,
}
impl Default for ThInsRelayGroup {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug)]
pub struct ThInsRelay {
    pub ctx: *mut ::std::os::raw::c_void,
    pub publish_relay: ::std::option::Option<
        unsafe extern "C" fn(
            ctx: *mut ::std::os::raw::c_void,
            source_id: *const ::std::os::raw::c_char,
            relay_id: *const ::std::os::raw::c_char,
            json_data: *const ::std::os::raw::c_char,
            meta: *const ::std::os::raw::c_char,
            out: *mut ::std::os::raw::c_char,
            out_max: usize,
            err_out: *mut ::std::os::raw::c_char,
            err_out_max: usize,
        ) -> ::std::os::raw::c_int,
    >,
    pub input_data: ::std::option::Option<
        unsafe extern "C" fn(
            ctx: *mut ::std::os::raw::c_void,
            data: *const u8,
            data_len: usize,
            info: *const TH_ESStreamInfo,
            err_out: *mut ::std::os::raw::c_char,
            err_out_max: usize,
        ) -> ::std::os::raw::c_int,
    >,
    pub do_etc_ex: DoEtcFn,
}
impl Default for ThInsRelay {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug)]
pub struct ThInsFilter {
    pub ctx: *mut ::std::os::raw::c_void,
    pub init: ::std::option::Option<
        unsafe extern "C" fn(
            ctx: *mut ::std::os::raw::c_void,
            json_data: *const ::std::os::raw::c_char,
            meta: *const ::std::os::raw::c_char,
            data_cb: FilterCb,
            data_cb_ctx: *mut ::std::os::raw::c_void,
            err_out: *mut ::std::os::raw::c_char,
            err_out_max: usize,
        ) -> ::std::os::raw::c_int,
    >,
    pub do_filter: ::std::option::Option<
        unsafe extern "C" fn(
            ctx: *mut ::std::os::raw::c_void,
            data: *const u8,
            data_len: usize,
            info: *const TH_ESStreamInfo,
        ) -> ::std::os::raw::c_int,
    >,
    pub uninit: ::std::option::Option<unsafe extern "C" fn(ctx: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int>,
    pub do_etc_ex: DoEtcFn,
}
impl Default for ThInsFilter {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug)]
pub struct ThInsAccess {
    pub ctx: *mut ::std::os::raw::c_void,
    pub do_access: ::std::option::Option<
        unsafe extern "C" fn(
            ctx: *mut ::std::os::raw::c_void,
            access_id: *const ::std::os::raw::c_char,
            json_data: *const ::std::os::raw::c_char,
            out: *mut ::std::os::raw::c_char,
            out_max: usize,
            err_out: *mut ::std::os::raw::c_char,
            err_out_max: usize,
        ) -> ::std::os::raw::c_int,
    >,
    pub de_access: ::std::option::Option<
        unsafe extern "C" fn(
            ctx: *mut ::std::os::raw::c_void,
            err_out: *mut ::std::os::raw::c_char,
            err_out_max: usize,
        ) -> ::std::os::raw::c_int,
    >,
    pub do_etc_ex: DoEtcFn,
}
impl Default for ThInsAccess {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug)]
pub struct ThInsDevice {
    pub ctx: *mut ::std::os::raw::c_void,
    pub login: ::std::option::Option<
        unsafe extern "C" fn(
            ctx: *mut ::std::os::raw::c_void,
            json_data: *const ::std::os::raw::c_char,
            out: *mut ::std::os::raw::c_char,
            out_max: usize,
            err_out: *mut ::std::os::raw::c_char,
            err_out_max: usize,
        ) -> ::std::os::raw::c_int,
    >,
    pub logout: ::std::option::Option<
        unsafe extern "C" fn(
            ctx: *mut ::std::os::raw::c_void,
            err_out: *mut ::std::os::raw::c_char,
            err_out_max: usize,
        ) -> ::std::os::raw::c_int,
    >,
    pub do_etc_ex: DoEtcFn,
}
impl Default for ThInsDevice {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
