1
2
3
/* automatically generated by rust-bindgen */

pub const true_ : u32 = 1 ; pub const false_ : u32 = 0 ; pub const __bool_true_false_are_defined : u32 = 1 ; pub const _STDINT_H : u32 = 1 ; pub const _FEATURES_H : u32 = 1 ; pub const _DEFAULT_SOURCE : u32 = 1 ; 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 _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 __STDC_NO_THREADS__ : u32 = 1 ; pub const __GNU_LIBRARY__ : u32 = 6 ; pub const __GLIBC__ : u32 = 2 ; pub const __GLIBC_MINOR__ : u32 = 27 ; 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 __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_FUNCS_EXT : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_TYPES_EXT : u32 = 0 ; pub const _BITS_TYPES_H : u32 = 1 ; 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 __FD_SETSIZE : u32 = 1024 ; 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 _TIME_H : u32 = 1 ; pub const _BITS_TIME_H : u32 = 1 ; pub const CLOCK_REALTIME : u32 = 0 ; pub const CLOCK_MONOTONIC : u32 = 1 ; pub const CLOCK_PROCESS_CPUTIME_ID : u32 = 2 ; pub const CLOCK_THREAD_CPUTIME_ID : u32 = 3 ; pub const CLOCK_MONOTONIC_RAW : u32 = 4 ; pub const CLOCK_REALTIME_COARSE : u32 = 5 ; pub const CLOCK_MONOTONIC_COARSE : u32 = 6 ; pub const CLOCK_BOOTTIME : u32 = 7 ; pub const CLOCK_REALTIME_ALARM : u32 = 8 ; pub const CLOCK_BOOTTIME_ALARM : u32 = 9 ; pub const CLOCK_TAI : u32 = 11 ; pub const TIMER_ABSTIME : u32 = 1 ; pub const __clock_t_defined : u32 = 1 ; pub const __time_t_defined : u32 = 1 ; pub const __struct_tm_defined : u32 = 1 ; pub const __timespec_defined : u32 = 1 ; pub const __clockid_t_defined : u32 = 1 ; pub const __timer_t_defined : u32 = 1 ; pub const __itimerspec_defined : u32 = 1 ; pub const _BITS_TYPES_LOCALE_T_H : u32 = 1 ; pub const _BITS_TYPES___LOCALE_T_H : u32 = 1 ; pub const TIME_UTC : u32 = 1 ; pub const SHA_DIGEST_LENGTH : u32 = 20 ; pub const TR_INET6_ADDRSTRLEN : u32 = 46 ; pub const TR_RPC_SESSION_ID_HEADER : & 'static [ u8 ; 26usize ] = b"X-Transmission-Session-Id\0" ; pub const TR_DEFAULT_BIND_ADDRESS_IPV4 : & 'static [ u8 ; 8usize ] = b"0.0.0.0\0" ; pub const TR_DEFAULT_BIND_ADDRESS_IPV6 : & 'static [ u8 ; 3usize ] = b"::\0" ; pub const TR_DEFAULT_RPC_WHITELIST : & 'static [ u8 ; 14usize ] = b"127.0.0.1,::1\0" ; pub const TR_DEFAULT_RPC_HOST_WHITELIST : & 'static [ u8 ; 1usize ] = b"\0" ; pub const TR_DEFAULT_RPC_PORT_STR : & 'static [ u8 ; 5usize ] = b"9091\0" ; pub const TR_DEFAULT_RPC_URL_STR : & 'static [ u8 ; 15usize ] = b"/transmission/\0" ; pub const TR_DEFAULT_PEER_PORT_STR : & 'static [ u8 ; 6usize ] = b"51413\0" ; pub const TR_DEFAULT_PEER_SOCKET_TOS_STR : & 'static [ u8 ; 8usize ] = b"default\0" ; pub const TR_DEFAULT_PEER_LIMIT_GLOBAL_STR : & 'static [ u8 ; 4usize ] = b"200\0" ; pub const TR_DEFAULT_PEER_LIMIT_TORRENT_STR : & 'static [ u8 ; 3usize ] = b"50\0" ; pub const DEFAULT_BLOCKLIST_FILENAME : & 'static [ u8 ; 14usize ] = b"blocklist.bin\0" ; pub const TR_ETA_NOT_AVAIL : i32 = -1 ; pub const TR_ETA_UNKNOWN : i32 = -2 ; pub const TR_RATIO_NA : i32 = -1 ; pub const TR_RATIO_INF : i32 = -2 ; pub const _INTTYPES_H : u32 = 1 ; pub const ____gwchar_t_defined : u32 = 1 ; pub const __PRI64_PREFIX : & 'static [ u8 ; 2usize ] = b"l\0" ; pub const __PRIPTR_PREFIX : & 'static [ u8 ; 2usize ] = b"l\0" ; pub const PRId8 : & 'static [ u8 ; 2usize ] = b"d\0" ; pub const PRId16 : & 'static [ u8 ; 2usize ] = b"d\0" ; pub const PRId32 : & 'static [ u8 ; 2usize ] = b"d\0" ; pub const PRId64 : & 'static [ u8 ; 3usize ] = b"ld\0" ; pub const PRIdLEAST8 : & 'static [ u8 ; 2usize ] = b"d\0" ; pub const PRIdLEAST16 : & 'static [ u8 ; 2usize ] = b"d\0" ; pub const PRIdLEAST32 : & 'static [ u8 ; 2usize ] = b"d\0" ; pub const PRIdLEAST64 : & 'static [ u8 ; 3usize ] = b"ld\0" ; pub const PRIdFAST8 : & 'static [ u8 ; 2usize ] = b"d\0" ; pub const PRIdFAST16 : & 'static [ u8 ; 3usize ] = b"ld\0" ; pub const PRIdFAST32 : & 'static [ u8 ; 3usize ] = b"ld\0" ; pub const PRIdFAST64 : & 'static [ u8 ; 3usize ] = b"ld\0" ; pub const PRIi8 : & 'static [ u8 ; 2usize ] = b"i\0" ; pub const PRIi16 : & 'static [ u8 ; 2usize ] = b"i\0" ; pub const PRIi32 : & 'static [ u8 ; 2usize ] = b"i\0" ; pub const PRIi64 : & 'static [ u8 ; 3usize ] = b"li\0" ; pub const PRIiLEAST8 : & 'static [ u8 ; 2usize ] = b"i\0" ; pub const PRIiLEAST16 : & 'static [ u8 ; 2usize ] = b"i\0" ; pub const PRIiLEAST32 : & 'static [ u8 ; 2usize ] = b"i\0" ; pub const PRIiLEAST64 : & 'static [ u8 ; 3usize ] = b"li\0" ; pub const PRIiFAST8 : & 'static [ u8 ; 2usize ] = b"i\0" ; pub const PRIiFAST16 : & 'static [ u8 ; 3usize ] = b"li\0" ; pub const PRIiFAST32 : & 'static [ u8 ; 3usize ] = b"li\0" ; pub const PRIiFAST64 : & 'static [ u8 ; 3usize ] = b"li\0" ; pub const PRIo8 : & 'static [ u8 ; 2usize ] = b"o\0" ; pub const PRIo16 : & 'static [ u8 ; 2usize ] = b"o\0" ; pub const PRIo32 : & 'static [ u8 ; 2usize ] = b"o\0" ; pub const PRIo64 : & 'static [ u8 ; 3usize ] = b"lo\0" ; pub const PRIoLEAST8 : & 'static [ u8 ; 2usize ] = b"o\0" ; pub const PRIoLEAST16 : & 'static [ u8 ; 2usize ] = b"o\0" ; pub const PRIoLEAST32 : & 'static [ u8 ; 2usize ] = b"o\0" ; pub const PRIoLEAST64 : & 'static [ u8 ; 3usize ] = b"lo\0" ; pub const PRIoFAST8 : & 'static [ u8 ; 2usize ] = b"o\0" ; pub const PRIoFAST16 : & 'static [ u8 ; 3usize ] = b"lo\0" ; pub const PRIoFAST32 : & 'static [ u8 ; 3usize ] = b"lo\0" ; pub const PRIoFAST64 : & 'static [ u8 ; 3usize ] = b"lo\0" ; pub const PRIu8 : & 'static [ u8 ; 2usize ] = b"u\0" ; pub const PRIu16 : & 'static [ u8 ; 2usize ] = b"u\0" ; pub const PRIu32 : & 'static [ u8 ; 2usize ] = b"u\0" ; pub const PRIu64 : & 'static [ u8 ; 3usize ] = b"lu\0" ; pub const PRIuLEAST8 : & 'static [ u8 ; 2usize ] = b"u\0" ; pub const PRIuLEAST16 : & 'static [ u8 ; 2usize ] = b"u\0" ; pub const PRIuLEAST32 : & 'static [ u8 ; 2usize ] = b"u\0" ; pub const PRIuLEAST64 : & 'static [ u8 ; 3usize ] = b"lu\0" ; pub const PRIuFAST8 : & 'static [ u8 ; 2usize ] = b"u\0" ; pub const PRIuFAST16 : & 'static [ u8 ; 3usize ] = b"lu\0" ; pub const PRIuFAST32 : & 'static [ u8 ; 3usize ] = b"lu\0" ; pub const PRIuFAST64 : & 'static [ u8 ; 3usize ] = b"lu\0" ; pub const PRIx8 : & 'static [ u8 ; 2usize ] = b"x\0" ; pub const PRIx16 : & 'static [ u8 ; 2usize ] = b"x\0" ; pub const PRIx32 : & 'static [ u8 ; 2usize ] = b"x\0" ; pub const PRIx64 : & 'static [ u8 ; 3usize ] = b"lx\0" ; pub const PRIxLEAST8 : & 'static [ u8 ; 2usize ] = b"x\0" ; pub const PRIxLEAST16 : & 'static [ u8 ; 2usize ] = b"x\0" ; pub const PRIxLEAST32 : & 'static [ u8 ; 2usize ] = b"x\0" ; pub const PRIxLEAST64 : & 'static [ u8 ; 3usize ] = b"lx\0" ; pub const PRIxFAST8 : & 'static [ u8 ; 2usize ] = b"x\0" ; pub const PRIxFAST16 : & 'static [ u8 ; 3usize ] = b"lx\0" ; pub const PRIxFAST32 : & 'static [ u8 ; 3usize ] = b"lx\0" ; pub const PRIxFAST64 : & 'static [ u8 ; 3usize ] = b"lx\0" ; pub const PRIX8 : & 'static [ u8 ; 2usize ] = b"X\0" ; pub const PRIX16 : & 'static [ u8 ; 2usize ] = b"X\0" ; pub const PRIX32 : & 'static [ u8 ; 2usize ] = b"X\0" ; pub const PRIX64 : & 'static [ u8 ; 3usize ] = b"lX\0" ; pub const PRIXLEAST8 : & 'static [ u8 ; 2usize ] = b"X\0" ; pub const PRIXLEAST16 : & 'static [ u8 ; 2usize ] = b"X\0" ; pub const PRIXLEAST32 : & 'static [ u8 ; 2usize ] = b"X\0" ; pub const PRIXLEAST64 : & 'static [ u8 ; 3usize ] = b"lX\0" ; pub const PRIXFAST8 : & 'static [ u8 ; 2usize ] = b"X\0" ; pub const PRIXFAST16 : & 'static [ u8 ; 3usize ] = b"lX\0" ; pub const PRIXFAST32 : & 'static [ u8 ; 3usize ] = b"lX\0" ; pub const PRIXFAST64 : & 'static [ u8 ; 3usize ] = b"lX\0" ; pub const PRIdMAX : & 'static [ u8 ; 3usize ] = b"ld\0" ; pub const PRIiMAX : & 'static [ u8 ; 3usize ] = b"li\0" ; pub const PRIoMAX : & 'static [ u8 ; 3usize ] = b"lo\0" ; pub const PRIuMAX : & 'static [ u8 ; 3usize ] = b"lu\0" ; pub const PRIxMAX : & 'static [ u8 ; 3usize ] = b"lx\0" ; pub const PRIXMAX : & 'static [ u8 ; 3usize ] = b"lX\0" ; pub const PRIdPTR : & 'static [ u8 ; 3usize ] = b"ld\0" ; pub const PRIiPTR : & 'static [ u8 ; 3usize ] = b"li\0" ; pub const PRIoPTR : & 'static [ u8 ; 3usize ] = b"lo\0" ; pub const PRIuPTR : & 'static [ u8 ; 3usize ] = b"lu\0" ; pub const PRIxPTR : & 'static [ u8 ; 3usize ] = b"lx\0" ; pub const PRIXPTR : & 'static [ u8 ; 3usize ] = b"lX\0" ; pub const SCNd8 : & 'static [ u8 ; 4usize ] = b"hhd\0" ; pub const SCNd16 : & 'static [ u8 ; 3usize ] = b"hd\0" ; pub const SCNd32 : & 'static [ u8 ; 2usize ] = b"d\0" ; pub const SCNd64 : & 'static [ u8 ; 3usize ] = b"ld\0" ; pub const SCNdLEAST8 : & 'static [ u8 ; 4usize ] = b"hhd\0" ; pub const SCNdLEAST16 : & 'static [ u8 ; 3usize ] = b"hd\0" ; pub const SCNdLEAST32 : & 'static [ u8 ; 2usize ] = b"d\0" ; pub const SCNdLEAST64 : & 'static [ u8 ; 3usize ] = b"ld\0" ; pub const SCNdFAST8 : & 'static [ u8 ; 4usize ] = b"hhd\0" ; pub const SCNdFAST16 : & 'static [ u8 ; 3usize ] = b"ld\0" ; pub const SCNdFAST32 : & 'static [ u8 ; 3usize ] = b"ld\0" ; pub const SCNdFAST64 : & 'static [ u8 ; 3usize ] = b"ld\0" ; pub const SCNi8 : & 'static [ u8 ; 4usize ] = b"hhi\0" ; pub const SCNi16 : & 'static [ u8 ; 3usize ] = b"hi\0" ; pub const SCNi32 : & 'static [ u8 ; 2usize ] = b"i\0" ; pub const SCNi64 : & 'static [ u8 ; 3usize ] = b"li\0" ; pub const SCNiLEAST8 : & 'static [ u8 ; 4usize ] = b"hhi\0" ; pub const SCNiLEAST16 : & 'static [ u8 ; 3usize ] = b"hi\0" ; pub const SCNiLEAST32 : & 'static [ u8 ; 2usize ] = b"i\0" ; pub const SCNiLEAST64 : & 'static [ u8 ; 3usize ] = b"li\0" ; pub const SCNiFAST8 : & 'static [ u8 ; 4usize ] = b"hhi\0" ; pub const SCNiFAST16 : & 'static [ u8 ; 3usize ] = b"li\0" ; pub const SCNiFAST32 : & 'static [ u8 ; 3usize ] = b"li\0" ; pub const SCNiFAST64 : & 'static [ u8 ; 3usize ] = b"li\0" ; pub const SCNu8 : & 'static [ u8 ; 4usize ] = b"hhu\0" ; pub const SCNu16 : & 'static [ u8 ; 3usize ] = b"hu\0" ; pub const SCNu32 : & 'static [ u8 ; 2usize ] = b"u\0" ; pub const SCNu64 : & 'static [ u8 ; 3usize ] = b"lu\0" ; pub const SCNuLEAST8 : & 'static [ u8 ; 4usize ] = b"hhu\0" ; pub const SCNuLEAST16 : & 'static [ u8 ; 3usize ] = b"hu\0" ; pub const SCNuLEAST32 : & 'static [ u8 ; 2usize ] = b"u\0" ; pub const SCNuLEAST64 : & 'static [ u8 ; 3usize ] = b"lu\0" ; pub const SCNuFAST8 : & 'static [ u8 ; 4usize ] = b"hhu\0" ; pub const SCNuFAST16 : & 'static [ u8 ; 3usize ] = b"lu\0" ; pub const SCNuFAST32 : & 'static [ u8 ; 3usize ] = b"lu\0" ; pub const SCNuFAST64 : & 'static [ u8 ; 3usize ] = b"lu\0" ; pub const SCNo8 : & 'static [ u8 ; 4usize ] = b"hho\0" ; pub const SCNo16 : & 'static [ u8 ; 3usize ] = b"ho\0" ; pub const SCNo32 : & 'static [ u8 ; 2usize ] = b"o\0" ; pub const SCNo64 : & 'static [ u8 ; 3usize ] = b"lo\0" ; pub const SCNoLEAST8 : & 'static [ u8 ; 4usize ] = b"hho\0" ; pub const SCNoLEAST16 : & 'static [ u8 ; 3usize ] = b"ho\0" ; pub const SCNoLEAST32 : & 'static [ u8 ; 2usize ] = b"o\0" ; pub const SCNoLEAST64 : & 'static [ u8 ; 3usize ] = b"lo\0" ; pub const SCNoFAST8 : & 'static [ u8 ; 4usize ] = b"hho\0" ; pub const SCNoFAST16 : & 'static [ u8 ; 3usize ] = b"lo\0" ; pub const SCNoFAST32 : & 'static [ u8 ; 3usize ] = b"lo\0" ; pub const SCNoFAST64 : & 'static [ u8 ; 3usize ] = b"lo\0" ; pub const SCNx8 : & 'static [ u8 ; 4usize ] = b"hhx\0" ; pub const SCNx16 : & 'static [ u8 ; 3usize ] = b"hx\0" ; pub const SCNx32 : & 'static [ u8 ; 2usize ] = b"x\0" ; pub const SCNx64 : & 'static [ u8 ; 3usize ] = b"lx\0" ; pub const SCNxLEAST8 : & 'static [ u8 ; 4usize ] = b"hhx\0" ; pub const SCNxLEAST16 : & 'static [ u8 ; 3usize ] = b"hx\0" ; pub const SCNxLEAST32 : & 'static [ u8 ; 2usize ] = b"x\0" ; pub const SCNxLEAST64 : & 'static [ u8 ; 3usize ] = b"lx\0" ; pub const SCNxFAST8 : & 'static [ u8 ; 4usize ] = b"hhx\0" ; pub const SCNxFAST16 : & 'static [ u8 ; 3usize ] = b"lx\0" ; pub const SCNxFAST32 : & 'static [ u8 ; 3usize ] = b"lx\0" ; pub const SCNxFAST64 : & 'static [ u8 ; 3usize ] = b"lx\0" ; pub const SCNdMAX : & 'static [ u8 ; 3usize ] = b"ld\0" ; pub const SCNiMAX : & 'static [ u8 ; 3usize ] = b"li\0" ; pub const SCNoMAX : & 'static [ u8 ; 3usize ] = b"lo\0" ; pub const SCNuMAX : & 'static [ u8 ; 3usize ] = b"lu\0" ; pub const SCNxMAX : & 'static [ u8 ; 3usize ] = b"lx\0" ; pub const SCNdPTR : & 'static [ u8 ; 3usize ] = b"ld\0" ; pub const SCNiPTR : & 'static [ u8 ; 3usize ] = b"li\0" ; pub const SCNoPTR : & 'static [ u8 ; 3usize ] = b"lo\0" ; pub const SCNuPTR : & 'static [ u8 ; 3usize ] = b"lu\0" ; pub const SCNxPTR : & 'static [ u8 ; 3usize ] = b"lx\0" ; pub const __GNUC_VA_LIST : u32 = 1 ; pub type wchar_t = :: std :: os :: raw :: c_int ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] 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 : f64 , } 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 __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 , Copy , Clone ) ] 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 = :: std :: os :: raw :: c_schar ; pub type int_least16_t = :: std :: os :: raw :: c_short ; pub type int_least32_t = :: std :: os :: raw :: c_int ; pub type int_least64_t = :: std :: os :: raw :: c_long ; pub type uint_least8_t = :: std :: os :: raw :: c_uchar ; pub type uint_least16_t = :: std :: os :: raw :: c_ushort ; pub type uint_least32_t = :: std :: os :: raw :: c_uint ; pub type uint_least64_t = :: std :: os :: raw :: c_ulong ; 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 type clock_t = __clock_t ; pub type time_t = __time_t ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct tm { pub tm_sec : :: std :: os :: raw :: c_int , pub tm_min : :: std :: os :: raw :: c_int , pub tm_hour : :: std :: os :: raw :: c_int , pub tm_mday : :: std :: os :: raw :: c_int , pub tm_mon : :: std :: os :: raw :: c_int , pub tm_year : :: std :: os :: raw :: c_int , pub tm_wday : :: std :: os :: raw :: c_int , pub tm_yday : :: std :: os :: raw :: c_int , pub tm_isdst : :: std :: os :: raw :: c_int , pub tm_gmtoff : :: std :: os :: raw :: c_long , pub tm_zone : * const :: std :: os :: raw :: c_char , } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct timespec { pub tv_sec : __time_t , pub tv_nsec : __syscall_slong_t , } pub type clockid_t = __clockid_t ; pub type timer_t = __timer_t ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct itimerspec { pub it_interval : timespec , pub it_value : timespec , } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct sigevent { _unused : [ u8 ; 0 ] , } pub type pid_t = __pid_t ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct __locale_struct { pub __locales : [ * mut __locale_data ; 13usize ] , pub __ctype_b : * const :: std :: os :: raw :: c_ushort , pub __ctype_tolower : * const :: std :: os :: raw :: c_int , pub __ctype_toupper : * const :: std :: os :: raw :: c_int , pub __names : [ * const :: std :: os :: raw :: c_char ; 13usize ] , } pub type __locale_t = * mut __locale_struct ; pub type locale_t = __locale_t ; extern "C" { pub fn clock ( ) -> clock_t ; } extern "C" { pub fn time ( __timer : * mut time_t ) -> time_t ; } extern "C" { pub fn difftime ( __time1 : time_t , __time0 : time_t ) -> f64 ; } extern "C" { pub fn mktime ( __tp : * mut tm ) -> time_t ; } extern "C" { pub fn strftime ( __s : * mut :: std :: os :: raw :: c_char , __maxsize : usize , __format : * const :: std :: os :: raw :: c_char , __tp : * const tm ) -> usize ; } extern "C" { pub fn strftime_l ( __s : * mut :: std :: os :: raw :: c_char , __maxsize : usize , __format : * const :: std :: os :: raw :: c_char , __tp : * const tm , __loc : locale_t ) -> usize ; } extern "C" { pub fn gmtime ( __timer : * const time_t ) -> * mut tm ; } extern "C" { pub fn localtime ( __timer : * const time_t ) -> * mut tm ; } extern "C" { pub fn gmtime_r ( __timer : * const time_t , __tp : * mut tm ) -> * mut tm ; } extern "C" { pub fn localtime_r ( __timer : * const time_t , __tp : * mut tm ) -> * mut tm ; } extern "C" { pub fn asctime ( __tp : * const tm ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn ctime ( __timer : * const time_t ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn asctime_r ( __tp : * const tm , __buf : * mut :: std :: os :: raw :: c_char ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn ctime_r ( __timer : * const time_t , __buf : * mut :: std :: os :: raw :: c_char ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { # [ link_name = "\u{1}__tzname" ] pub static mut __tzname : [ * mut :: std :: os :: raw :: c_char ; 2usize ] ; } extern "C" { # [ link_name = "\u{1}__daylight" ] pub static mut __daylight : :: std :: os :: raw :: c_int ; } extern "C" { # [ link_name = "\u{1}__timezone" ] pub static mut __timezone : :: std :: os :: raw :: c_long ; } extern "C" { # [ link_name = "\u{1}tzname" ] pub static mut tzname : [ * mut :: std :: os :: raw :: c_char ; 2usize ] ; } extern "C" { pub fn tzset ( ) ; } extern "C" { # [ link_name = "\u{1}daylight" ] pub static mut daylight : :: std :: os :: raw :: c_int ; } extern "C" { # [ link_name = "\u{1}timezone" ] pub static mut timezone : :: std :: os :: raw :: c_long ; } extern "C" { pub fn stime ( __when : * const time_t ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn timegm ( __tp : * mut tm ) -> time_t ; } extern "C" { pub fn timelocal ( __tp : * mut tm ) -> time_t ; } extern "C" { pub fn dysize ( __year : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn nanosleep ( __requested_time : * const timespec , __remaining : * mut timespec ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn clock_getres ( __clock_id : clockid_t , __res : * mut timespec ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn clock_gettime ( __clock_id : clockid_t , __tp : * mut timespec ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn clock_settime ( __clock_id : clockid_t , __tp : * const timespec ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn clock_nanosleep ( __clock_id : clockid_t , __flags : :: std :: os :: raw :: c_int , __req : * const timespec , __rem : * mut timespec ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn clock_getcpuclockid ( __pid : pid_t , __clock_id : * mut clockid_t ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn timer_create ( __clock_id : clockid_t , __evp : * mut sigevent , __timerid : * mut timer_t ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn timer_delete ( __timerid : timer_t ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn timer_settime ( __timerid : timer_t , __flags : :: std :: os :: raw :: c_int , __value : * const itimerspec , __ovalue : * mut itimerspec ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn timer_gettime ( __timerid : timer_t , __value : * mut itimerspec ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn timer_getoverrun ( __timerid : timer_t ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn timespec_get ( __ts : * mut timespec , __base : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } pub type tr_file_index_t = u32 ; pub type tr_piece_index_t = u32 ; pub type tr_block_index_t = u32 ; pub type tr_port = u16 ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct tr_ctor { _unused : [ u8 ; 0 ] , } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct tr_torrent { _unused : [ u8 ; 0 ] , } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct tr_session { _unused : [ u8 ; 0 ] , } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct tr_error { _unused : [ u8 ; 0 ] , } pub type tr_priority_t = i8 ; # [ repr ( u32 ) ] # [ derive ( Debug , Copy , Clone , PartialEq , Eq , Hash ) ] pub enum tr_preallocation_mode { TR_PREALLOCATE_NONE = 0 , TR_PREALLOCATE_SPARSE = 1 , TR_PREALLOCATE_FULL = 2 , } # [ repr ( u32 ) ] # [ derive ( Debug , Copy , Clone , PartialEq , Eq , Hash ) ] pub enum tr_encryption_mode { TR_CLEAR_PREFERRED = 0 , TR_ENCRYPTION_PREFERRED = 1 , TR_ENCRYPTION_REQUIRED = 2 , } extern "C" { # [ doc = " @brief returns Transmission\'s default configuration file directory." ] # [ doc = "" ] # [ doc = " The default configuration directory is determined this way:" ] # [ doc = " -# If the TRANSMISSION_HOME environment variable is set, its value is used." ] # [ doc = " -# On Darwin, \"${HOME}/Library/Application Support/${appname}\" is used." ] # [ doc = " -# On Windows, \"${CSIDL_APPDATA}/${appname}\" is used." ] # [ doc = " -# If XDG_CONFIG_HOME is set, \"${XDG_CONFIG_HOME}/${appname}\" is used." ] # [ doc = " -# ${HOME}/.config/${appname}\" is used as a last resort." ] pub fn tr_getDefaultConfigDir ( appname : * const :: std :: os :: raw :: c_char ) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [ doc = " @brief returns Transmisson\'s default download directory." ] # [ doc = "" ] # [ doc = " The default download directory is determined this way:" ] # [ doc = " -# If the HOME environment variable is set, \"${HOME}/Downloads\" is used." ] # [ doc = " -# On Windows, \"${CSIDL_MYDOCUMENTS}/Downloads\" is used." ] # [ doc = " -# Otherwise, getpwuid(getuid())->pw_dir + \"/Downloads\" is used." ] pub fn tr_getDefaultDownloadDir ( ) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [ doc = " Add libtransmission\'s default settings to the benc dictionary." ] # [ doc = "" ] # [ doc = " Example:" ] # [ doc = " @code" ] # [ doc = "     tr_variant settings;" ] # [ doc = "     int64_t i;" ] # [ doc = "" ] # [ doc = "     tr_variantInitDict(&settings, 0);" ] # [ doc = "     tr_sessionGetDefaultSettings(&settings);" ] # [ doc = "     if (tr_variantDictFindInt(&settings, TR_PREFS_KEY_PEER_PORT, &i))" ] # [ doc = "         fprintf(stderr, \"the default peer port is %d\\n\", (int)i);" ] # [ doc = "     tr_variantFree(&settings);" ] # [ doc = " @endcode" ] # [ doc = "" ] # [ doc = " @param setme_dictionary pointer to a tr_variant dictionary" ] # [ doc = " @see tr_sessionLoadSettings()" ] # [ doc = " @see tr_sessionInit()" ] # [ doc = " @see tr_getDefaultConfigDir()" ] pub fn tr_sessionGetDefaultSettings ( setme_dictionary : * mut tr_variant ) ; } extern "C" { # [ doc = " Add the session\'s current configuration settings to the benc dictionary." ] # [ doc = "" ] # [ doc = " FIXME: this probably belongs in libtransmissionapp" ] # [ doc = "" ] # [ doc = " @param session          the session to query" ] # [ doc = " @param setme_dictionary the dictionary to populate" ] # [ doc = " @see tr_sessionGetDefaultSettings()" ] pub fn tr_sessionGetSettings ( session : * mut tr_session , setme_dictionary : * mut tr_variant ) ; } extern "C" { # [ doc = " Load settings from the configuration directory\'s settings.json file," ] # [ doc = " using libtransmission\'s default settings as fallbacks for missing keys." ] # [ doc = "" ] # [ doc = " FIXME: this belongs in libtransmissionapp" ] # [ doc = "" ] # [ doc = " @param dictionary pointer to an uninitialized tr_variant" ] # [ doc = " @param configDir the configuration directory to find settings.json" ] # [ doc = " @param appName if configDir is empty, appName is used to find the default dir." ] # [ doc = " @return success true if the settings were loaded, false otherwise" ] # [ doc = " @see tr_sessionGetDefaultSettings()" ] # [ doc = " @see tr_sessionInit()" ] # [ doc = " @see tr_sessionSaveSettings()" ] pub fn tr_sessionLoadSettings ( dictionary : * mut tr_variant , configDir : * const :: std :: os :: raw :: c_char , appName : * const :: std :: os :: raw :: c_char ) -> bool ; } extern "C" { # [ doc = " Add the session\'s configuration settings to the benc dictionary" ] # [ doc = " and save it to the configuration directory\'s settings.json file." ] # [ doc = "" ] # [ doc = " FIXME: this belongs in libtransmissionapp" ] # [ doc = "" ] # [ doc = " @param session    the session to save" ] # [ doc = " @param configDir  the directory to write to" ] # [ doc = " @param dictionary the dictionary to save" ] # [ doc = " @see tr_sessionLoadSettings()" ] pub fn tr_sessionSaveSettings ( session : * mut tr_session , configDir : * const :: std :: os :: raw :: c_char , dictionary : * const tr_variant ) ; } extern "C" { # [ doc = " @brief Initialize a libtransmission session." ] # [ doc = "" ] # [ doc = " For example, this will instantiate a session with all the default values:" ] # [ doc = " @code" ] # [ doc = "     tr_variant settings;" ] # [ doc = "     tr_session* session;" ] # [ doc = "     char const* configDir;" ] # [ doc = "" ] # [ doc = "     tr_variantInitDict(&settings, 0);" ] # [ doc = "     tr_sessionGetDefaultSettings(&settings);" ] # [ doc = "     configDir = tr_getDefaultConfigDir(\"Transmission\");" ] # [ doc = "     session = tr_sessionInit(configDir, true, &settings);" ] # [ doc = "" ] # [ doc = "     tr_variantFree(&settings);" ] # [ doc = " @endcode" ] # [ doc = "" ] # [ doc = " @param configDir where Transmission will look for resume files, blocklists, etc." ] # [ doc = " @param messageQueueingEnabled if false, messages will be dumped to stderr" ] # [ doc = " @param settings libtransmission settings" ] # [ doc = " @see tr_sessionGetDefaultSettings()" ] # [ doc = " @see tr_sessionLoadSettings()" ] # [ doc = " @see tr_getDefaultConfigDir()" ] pub fn tr_sessionInit ( configDir : * const :: std :: os :: raw :: c_char , messageQueueingEnabled : bool , settings : * mut tr_variant ) -> * mut tr_session ; } extern "C" { # [ doc = " @brief Update a session\'s settings from a benc dictionary" ] # [ doc = "like to the one used in tr_sessionInit()" ] pub fn tr_sessionSet ( session : * mut tr_session , settings : * mut tr_variant ) ; } extern "C" { # [ doc = " @brief Rescan the blocklists directory and" ] # [ doc = "reload whatever blocklist files are found there" ] pub fn tr_sessionReloadBlocklists ( session : * mut tr_session ) ; } extern "C" { # [ doc = " @brief End a libtransmission session" ] # [ doc = "@see tr_sessionInit()" ] pub fn tr_sessionClose ( arg1 : * mut tr_session ) ; } extern "C" { # [ doc = " @brief Return the session\'s configuration directory." ] # [ doc = "" ] # [ doc = " This is where transmission stores its .torrent files, .resume files," ] # [ doc = " blocklists, etc. It\'s set in tr_transmissionInit() and is immutable" ] # [ doc = " during the session." ] pub fn tr_sessionGetConfigDir ( arg1 : * const tr_session ) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [ doc = " @brief Set the per-session default download folder for new torrents." ] # [ doc = " @see tr_sessionInit()" ] # [ doc = " @see tr_sessionGetDownloadDir()" ] # [ doc = " @see tr_ctorSetDownloadDir()" ] pub fn tr_sessionSetDownloadDir ( session : * mut tr_session , downloadDir : * const :: std :: os :: raw :: c_char ) ; } extern "C" { # [ doc = " @brief Get the default download folder for new torrents." ] # [ doc = "" ] # [ doc = " This is set by tr_sessionInit() or tr_sessionSetDownloadDir()," ] # [ doc = " and can be overridden on a per-torrent basis by tr_ctorSetDownloadDir()." ] pub fn tr_sessionGetDownloadDir ( session : * const tr_session ) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [ doc = " @brief Get available disk space (in bytes) for the specified directory." ] # [ doc = " @return zero or positive integer on success, -1 in case of error." ] pub fn tr_sessionGetDirFreeSpace ( session : * mut tr_session , dir : * const :: std :: os :: raw :: c_char ) -> i64 ; } extern "C" { # [ doc = " @brief Set the torrent\'s bandwidth priority." ] pub fn tr_ctorSetBandwidthPriority ( ctor : * mut tr_ctor , priority : tr_priority_t ) ; } extern "C" { # [ doc = " @brief Get the torrent\'s bandwidth priority." ] pub fn tr_ctorGetBandwidthPriority ( ctor : * const tr_ctor ) -> tr_priority_t ; } extern "C" { # [ doc = " @brief set the per-session incomplete download folder." ] # [ doc = "" ] # [ doc = " When you add a new torrent and the session\'s incomplete directory is enabled," ] # [ doc = " the new torrent will start downloading into that directory, and then be moved" ] # [ doc = " to tr_torrent.downloadDir when the torrent is finished downloading." ] # [ doc = "" ] # [ doc = " Torrents aren\'t moved as a result of changing the session\'s incomplete dir --" ] # [ doc = " it\'s applied to new torrents, not existing ones." ] # [ doc = "" ] # [ doc = " tr_torrentSetLocation() overrules the incomplete dir: when a user specifies" ] # [ doc = " a new location, that becomes the torrent\'s new downloadDir and the torrent" ] # [ doc = " is moved there immediately regardless of whether or not it\'s complete." ] # [ doc = "" ] # [ doc = " @see tr_sessionInit()" ] # [ doc = " @see tr_sessionGetIncompleteDir()" ] # [ doc = " @see tr_sessionSetIncompleteDirEnabled()" ] # [ doc = " @see tr_sessionGetIncompleteDirEnabled()" ] pub fn tr_sessionSetIncompleteDir ( session : * mut tr_session , dir : * const :: std :: os :: raw :: c_char ) ; } extern "C" { # [ doc = " @brief get the per-session incomplete download folder" ] pub fn tr_sessionGetIncompleteDir ( session : * const tr_session ) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [ doc = " @brief enable or disable use of the incomplete download folder" ] pub fn tr_sessionSetIncompleteDirEnabled ( session : * mut tr_session , arg1 : bool ) ; } extern "C" { # [ doc = " @brief get whether or not the incomplete download folder is enabled" ] pub fn tr_sessionIsIncompleteDirEnabled ( session : * const tr_session ) -> bool ; } extern "C" { # [ doc = " @brief When enabled, newly-created files will have \".part\" appended" ] # [ doc = "        to their filename until the file is fully downloaded" ] # [ doc = "" ] # [ doc = " This is not retroactive -- toggling this will not rename existing files." ] # [ doc = " It only applies to new files created by Transmission after this API call." ] # [ doc = "" ] # [ doc = " @see tr_sessionIsIncompleteFileNamingEnabled()" ] pub fn tr_sessionSetIncompleteFileNamingEnabled ( session : * mut tr_session , arg1 : bool ) ; } extern "C" { # [ doc = " @brief return true if files will end in \".part\" until they\'re complete" ] pub fn tr_sessionIsIncompleteFileNamingEnabled ( session : * const tr_session ) -> bool ; } extern "C" { # [ doc = " @brief Set whether or not RPC calls are allowed in this session." ] # [ doc = "" ] # [ doc = " @details If true, libtransmission will open a server socket to listen" ] # [ doc = " for incoming http RPC requests as described in docs/rpc-spec.txt." ] # [ doc = "" ] # [ doc = " This is intially set by tr_sessionInit() and can be" ] # [ doc = " queried by tr_sessionIsRPCEnabled()." ] pub fn tr_sessionSetRPCEnabled ( session : * mut tr_session , isEnabled : bool ) ; } extern "C" { # [ doc = " @brief Get whether or not RPC calls are allowed in this session." ] # [ doc = "@see tr_sessionInit()" ] # [ doc = "@see tr_sessionSetRPCEnabled()" ] pub fn tr_sessionIsRPCEnabled ( session : * const tr_session ) -> bool ; } extern "C" { # [ doc = " @brief Specify which port to listen for RPC requests on." ] # [ doc = "@see tr_sessionInit()" ] # [ doc = "@see tr_sessionGetRPCPort" ] pub fn tr_sessionSetRPCPort ( session : * mut tr_session , port : tr_port ) ; } extern "C" { # [ doc = " @brief Get which port to listen for RPC requests on." ] # [ doc = "@see tr_sessionInit()" ] # [ doc = "@see tr_sessionSetRPCPort" ] pub fn tr_sessionGetRPCPort ( session : * const tr_session ) -> tr_port ; } extern "C" { # [ doc = " @brief Specify which base URL to use." ] # [ doc = "" ] # [ doc = " @param session the session to set" ] # [ doc = " @param url     the base url to use. The RPC API is accessible under <url>/rpc, the web interface under * <url>/web." ] # [ doc = "" ] # [ doc = "  @see tr_sessionGetRPCUrl" ] pub fn tr_sessionSetRPCUrl ( session : * mut tr_session , url : * const :: std :: os :: raw :: c_char ) ; } extern "C" { # [ doc = " @brief Get the base URL." ] # [ doc = " @see tr_sessionInit()" ] # [ doc = " @see tr_sessionSetRPCUrl" ] pub fn tr_sessionGetRPCUrl ( session : * const tr_session ) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [ doc = " @brief Specify a whitelist for remote RPC access" ] # [ doc = "" ] # [ doc = " The whitelist is a comma-separated list of dotted-quad IP addresses" ] # [ doc = " to be allowed. Wildmat notation is supported, meaning that" ] # [ doc = " \'?\' is interpreted as a single-character wildcard and" ] # [ doc = " \'*\' is interprted as a multi-character wildcard." ] pub fn tr_sessionSetRPCWhitelist ( session : * mut tr_session , whitelist : * const :: std :: os :: raw :: c_char ) ; } extern "C" { # [ doc = " @brief get the Access Control List for allowing/denying RPC requests." ] # [ doc = "@return a comma-separated string of whitelist domains." ] # [ doc = "@see tr_sessionInit" ] # [ doc = "@see tr_sessionSetRPCWhitelist" ] pub fn tr_sessionGetRPCWhitelist ( arg1 : * const tr_session ) -> * const :: std :: os :: raw :: c_char ; } extern "C" { pub fn tr_sessionSetRPCWhitelistEnabled ( session : * mut tr_session , isEnabled : bool ) ; } extern "C" { pub fn tr_sessionGetRPCWhitelistEnabled ( session : * const tr_session ) -> bool ; } extern "C" { pub fn tr_sessionSetRPCPassword ( session : * mut tr_session , password : * const :: std :: os :: raw :: c_char ) ; } extern "C" { pub fn tr_sessionSetRPCUsername ( session : * mut tr_session , username : * const :: std :: os :: raw :: c_char ) ; } extern "C" { # [ doc = " @brief get the password used to restrict RPC requests." ] # [ doc = "@return the password string." ] # [ doc = "@see tr_sessionInit()" ] # [ doc = "@see tr_sessionSetRPCPassword()" ] pub fn tr_sessionGetRPCPassword ( session : * const tr_session ) -> * const :: std :: os :: raw :: c_char ; } extern "C" { pub fn tr_sessionGetRPCUsername ( session : * const tr_session ) -> * const :: std :: os :: raw :: c_char ; } extern "C" { pub fn tr_sessionSetRPCPasswordEnabled ( session : * mut tr_session , isEnabled : bool ) ; } extern "C" { pub fn tr_sessionIsRPCPasswordEnabled ( session : * const tr_session ) -> bool ; } extern "C" { pub fn tr_sessionGetRPCBindAddress ( session : * const tr_session ) -> * const :: std :: os :: raw :: c_char ; } # [ repr ( u32 ) ] # [ derive ( Debug , Copy , Clone , PartialEq , Eq , Hash ) ] pub enum tr_rpc_callback_type { TR_RPC_TORRENT_ADDED = 0 , TR_RPC_TORRENT_STARTED = 1 , TR_RPC_TORRENT_STOPPED = 2 , TR_RPC_TORRENT_REMOVING = 3 , TR_RPC_TORRENT_TRASHING = 4 , TR_RPC_TORRENT_CHANGED = 5 , TR_RPC_TORRENT_MOVED = 6 , TR_RPC_SESSION_CHANGED = 7 , TR_RPC_SESSION_QUEUE_POSITIONS_CHANGED = 8 , TR_RPC_SESSION_CLOSE = 9 , } # [ repr ( u32 ) ] # [ derive ( Debug , Copy , Clone , PartialEq , Eq , Hash ) ] pub enum tr_rpc_callback_status { TR_RPC_OK = 0 , TR_RPC_NOREMOVE = 2 , } pub type tr_rpc_func = :: std :: option :: Option < unsafe extern "C" fn ( session : * mut tr_session , type_ : tr_rpc_callback_type , tor_or_null : * mut tr_torrent , user_data : * mut :: std :: os :: raw :: c_void ) -> tr_rpc_callback_status > ; extern "C" { # [ doc = " Register to be notified whenever something is changed via RPC," ] # [ doc = " such as a torrent being added, removed, started, stopped, etc." ] # [ doc = "" ] # [ doc = " func is invoked FROM LIBTRANSMISSION\'S THREAD!" ] # [ doc = " This means func must be fast (to avoid blocking peers)," ] # [ doc = " shouldn\'t call libtransmission functions (to avoid deadlock)," ] # [ doc = " and shouldn\'t modify client-level memory without using a mutex!" ] pub fn tr_sessionSetRPCCallback ( session : * mut tr_session , func : tr_rpc_func , user_data : * mut :: std :: os :: raw :: c_void ) ; } # [ doc = " @brief Used by tr_sessionGetStats() and tr_sessionGetCumulativeStats()" ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct tr_session_stats { pub ratio : f32 , pub uploadedBytes : u64 , pub downloadedBytes : u64 , pub filesAdded : u64 , pub sessionCount : u64 , pub secondsActive : u64 , } extern "C" { # [ doc = " @brief Get bandwidth use statistics for the current session" ] pub fn tr_sessionGetStats ( session : * const tr_session , setme : * mut tr_session_stats ) ; } extern "C" { # [ doc = " @brief Get cumulative bandwidth statistics for current and past sessions" ] pub fn tr_sessionGetCumulativeStats ( session : * const tr_session , setme : * mut tr_session_stats ) ; } extern "C" { pub fn tr_sessionClearStats ( session : * mut tr_session ) ; } extern "C" { # [ doc = " @brief Set whether or not torrents are allowed to do peer exchanges." ] # [ doc = "" ] # [ doc = " PEX is always disabled in private torrents regardless of this." ] # [ doc = " In public torrents, PEX is enabled by default." ] pub fn tr_sessionSetPexEnabled ( session : * mut tr_session , isEnabled : bool ) ; } extern "C" { pub fn tr_sessionIsPexEnabled ( session : * const tr_session ) -> bool ; } extern "C" { pub fn tr_sessionIsDHTEnabled ( session : * const tr_session ) -> bool ; } extern "C" { pub fn tr_sessionSetDHTEnabled ( session : * mut tr_session , arg1 : bool ) ; } extern "C" { pub fn tr_sessionIsUTPEnabled ( session : * const tr_session ) -> bool ; } extern "C" { pub fn tr_sessionSetUTPEnabled ( session : * mut tr_session , arg1 : bool ) ; } extern "C" { pub fn tr_sessionIsLPDEnabled ( session : * const tr_session ) -> bool ; } extern "C" { pub fn tr_sessionSetLPDEnabled ( session : * mut tr_session , enabled : bool ) ; } extern "C" { pub fn tr_sessionSetCacheLimit_MB ( session : * mut tr_session , mb : :: std :: os :: raw :: c_int ) ; } extern "C" { pub fn tr_sessionGetCacheLimit_MB ( session : * const tr_session ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn tr_sessionGetEncryption ( session : * mut tr_session ) -> tr_encryption_mode ; } extern "C" { pub fn tr_sessionSetEncryption ( session : * mut tr_session , mode : tr_encryption_mode ) ; } extern "C" { # [ doc = " Incoming Peer Connections Port" ] pub fn tr_sessionSetPortForwardingEnabled ( session : * mut tr_session , enabled : bool ) ; } extern "C" { pub fn tr_sessionIsPortForwardingEnabled ( session : * const tr_session ) -> bool ; } extern "C" { pub fn tr_sessionSetPeerPort ( session : * mut tr_session , port : tr_port ) ; } extern "C" { pub fn tr_sessionGetPeerPort ( session : * const tr_session ) -> tr_port ; } extern "C" { pub fn tr_sessionSetPeerPortRandom ( session : * mut tr_session ) -> tr_port ; } extern "C" { pub fn tr_sessionSetPeerPortRandomOnStart ( session : * mut tr_session , random : bool ) ; } extern "C" { pub fn tr_sessionGetPeerPortRandomOnStart ( session : * mut tr_session ) -> bool ; } # [ repr ( u32 ) ] # [ derive ( Debug , Copy , Clone , PartialEq , Eq , Hash ) ] pub enum tr_port_forwarding { TR_PORT_ERROR = 0 , TR_PORT_UNMAPPED = 1 , TR_PORT_UNMAPPING = 2 , TR_PORT_MAPPING = 3 , TR_PORT_MAPPED = 4 , } extern "C" { pub fn tr_sessionGetPortForwarding ( session : * const tr_session ) -> tr_port_forwarding ; } impl tr_direction { pub const TR_UP : tr_direction = tr_direction :: TR_CLIENT_TO_PEER ; } impl tr_direction { pub const TR_DOWN : tr_direction = tr_direction :: TR_PEER_TO_CLIENT ; } # [ repr ( u32 ) ] # [ derive ( Debug , Copy , Clone , PartialEq , Eq , Hash ) ] pub enum tr_direction { TR_CLIENT_TO_PEER = 0 , TR_PEER_TO_CLIENT = 1 , } extern "C" { # [ doc = "  Primary session speed limits" ] pub fn tr_sessionSetSpeedLimit_KBps ( arg1 : * mut tr_session , arg2 : tr_direction , KBps : :: std :: os :: raw :: c_uint ) ; } extern "C" { pub fn tr_sessionGetSpeedLimit_KBps ( arg1 : * const tr_session , arg2 : tr_direction ) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn tr_sessionLimitSpeed ( arg1 : * mut tr_session , arg2 : tr_direction , arg3 : bool ) ; } extern "C" { pub fn tr_sessionIsSpeedLimited ( arg1 : * const tr_session , arg2 : tr_direction ) -> bool ; } extern "C" { # [ doc = "  Alternative speed limits that are used during scheduled times" ] pub fn tr_sessionSetAltSpeed_KBps ( arg1 : * mut tr_session , arg2 : tr_direction , Bps : :: std :: os :: raw :: c_uint ) ; } extern "C" { pub fn tr_sessionGetAltSpeed_KBps ( arg1 : * const tr_session , arg2 : tr_direction ) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn tr_sessionUseAltSpeed ( arg1 : * mut tr_session , arg2 : bool ) ; } extern "C" { pub fn tr_sessionUsesAltSpeed ( arg1 : * const tr_session ) -> bool ; } extern "C" { pub fn tr_sessionUseAltSpeedTime ( arg1 : * mut tr_session , arg2 : bool ) ; } extern "C" { pub fn tr_sessionUsesAltSpeedTime ( arg1 : * const tr_session ) -> bool ; } extern "C" { pub fn tr_sessionSetAltSpeedBegin ( arg1 : * mut tr_session , minsSinceMidnight : :: std :: os :: raw :: c_int ) ; } extern "C" { pub fn tr_sessionGetAltSpeedBegin ( arg1 : * const tr_session ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn tr_sessionSetAltSpeedEnd ( arg1 : * mut tr_session , minsSinceMidnight : :: std :: os :: raw :: c_int ) ; } extern "C" { pub fn tr_sessionGetAltSpeedEnd ( arg1 : * const tr_session ) -> :: std :: os :: raw :: c_int ; } # [ repr ( u32 ) ] # [ derive ( Debug , Copy , Clone , PartialEq , Eq , Hash ) ] pub enum tr_sched_day { TR_SCHED_SUN = 1 , TR_SCHED_MON = 2 , TR_SCHED_TUES = 4 , TR_SCHED_WED = 8 , TR_SCHED_THURS = 16 , TR_SCHED_FRI = 32 , TR_SCHED_SAT = 64 , TR_SCHED_WEEKDAY = 62 , TR_SCHED_WEEKEND = 65 , TR_SCHED_ALL = 127 , } extern "C" { pub fn tr_sessionSetAltSpeedDay ( arg1 : * mut tr_session , day : tr_sched_day ) ; } extern "C" { pub fn tr_sessionGetAltSpeedDay ( arg1 : * const tr_session ) -> tr_sched_day ; } pub type tr_altSpeedFunc = :: std :: option :: Option < unsafe extern "C" fn ( arg1 : * mut tr_session , active : bool , userDriven : bool , arg2 : * mut :: std :: os :: raw :: c_void ) > ; extern "C" { pub fn tr_sessionClearAltSpeedFunc ( arg1 : * mut tr_session ) ; } extern "C" { pub fn tr_sessionSetAltSpeedFunc ( arg1 : * mut tr_session , arg2 : tr_altSpeedFunc , arg3 : * mut :: std :: os :: raw :: c_void ) ; } extern "C" { pub fn tr_sessionGetActiveSpeedLimit_KBps ( session : * const tr_session , dir : tr_direction , setme : * mut f64 ) -> bool ; } extern "C" { pub fn tr_sessionGetRawSpeed_KBps ( arg1 : * const tr_session , arg2 : tr_direction ) -> f64 ; } extern "C" { pub fn tr_sessionSetRatioLimited ( arg1 : * mut tr_session , isLimited : bool ) ; } extern "C" { pub fn tr_sessionIsRatioLimited ( arg1 : * const tr_session ) -> bool ; } extern "C" { pub fn tr_sessionSetRatioLimit ( arg1 : * mut tr_session , desiredRatio : f64 ) ; } extern "C" { pub fn tr_sessionGetRatioLimit ( arg1 : * const tr_session ) -> f64 ; } extern "C" { pub fn tr_sessionSetIdleLimited ( arg1 : * mut tr_session , isLimited : bool ) ; } extern "C" { pub fn tr_sessionIsIdleLimited ( arg1 : * const tr_session ) -> bool ; } extern "C" { pub fn tr_sessionSetIdleLimit ( arg1 : * mut tr_session , idleMinutes : u16 ) ; } extern "C" { pub fn tr_sessionGetIdleLimit ( arg1 : * const tr_session ) -> u16 ; } extern "C" { pub fn tr_sessionSetPeerLimit ( arg1 : * mut tr_session , maxGlobalPeers : u16 ) ; } extern "C" { pub fn tr_sessionGetPeerLimit ( arg1 : * const tr_session ) -> u16 ; } extern "C" { pub fn tr_sessionSetPeerLimitPerTorrent ( arg1 : * mut tr_session , maxPeers : u16 ) ; } extern "C" { pub fn tr_sessionGetPeerLimitPerTorrent ( arg1 : * const tr_session ) -> u16 ; } extern "C" { pub fn tr_sessionSetPaused ( arg1 : * mut tr_session , isPaused : bool ) ; } extern "C" { pub fn tr_sessionGetPaused ( arg1 : * const tr_session ) -> bool ; } extern "C" { pub fn tr_sessionSetDeleteSource ( arg1 : * mut tr_session , deleteSource : bool ) ; } extern "C" { pub fn tr_sessionGetDeleteSource ( arg1 : * const tr_session ) -> bool ; } extern "C" { pub fn tr_torrentGetPriority ( arg1 : * const tr_torrent ) -> tr_priority_t ; } extern "C" { pub fn tr_torrentSetPriority ( arg1 : * mut tr_torrent , arg2 : tr_priority_t ) ; } extern "C" { # [ doc = " @brief Like tr_torrentStart(), but resumes right away regardless of the queues." ] pub fn tr_torrentStartNow ( arg1 : * mut tr_torrent ) ; } extern "C" { # [ doc = " @brief Return the queued torrent\'s position in the queue it\'s in. [0...n)" ] pub fn tr_torrentGetQueuePosition ( arg1 : * const tr_torrent ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " @brief Set the queued torrent\'s position in the queue it\'s in." ] # [ doc = " Special cases: pos <= 0 moves to the front; pos >= queue length moves to the back" ] pub fn tr_torrentSetQueuePosition ( arg1 : * mut tr_torrent , queuePosition : :: std :: os :: raw :: c_int ) ; } extern "C" { # [ doc = " @brief Convenience function for moving a batch of torrents to the front of their queue(s)" ] pub fn tr_torrentsQueueMoveTop ( torrents : * mut * mut tr_torrent , torrentCount : :: std :: os :: raw :: c_int ) ; } extern "C" { # [ doc = " @brief Convenience function for moving a batch of torrents ahead one step in their queue(s)" ] pub fn tr_torrentsQueueMoveUp ( torrents : * mut * mut tr_torrent , torrentCount : :: std :: os :: raw :: c_int ) ; } extern "C" { # [ doc = " @brief Convenience function for moving a batch of torrents back one step in their queue(s)" ] pub fn tr_torrentsQueueMoveDown ( torrents : * mut * mut tr_torrent , torrentCount : :: std :: os :: raw :: c_int ) ; } extern "C" { # [ doc = " @brief Convenience function for moving a batch of torrents to the back of their queue(s)" ] pub fn tr_torrentsQueueMoveBottom ( torrents : * mut * mut tr_torrent , torrentCount : :: std :: os :: raw :: c_int ) ; } extern "C" { # [ doc = " @brief Set the number of torrents allowed to download (if direction is TR_DOWN) or seed (if direction is TR_UP) at the same time" ] pub fn tr_sessionSetQueueSize ( arg1 : * mut tr_session , arg2 : tr_direction , max_simultaneous_seed_torrents : :: std :: os :: raw :: c_int ) ; } extern "C" { # [ doc = " @brief Return the number of torrents allowed to download (if direction is TR_DOWN) or seed (if direction is TR_UP) at the same time" ] pub fn tr_sessionGetQueueSize ( arg1 : * const tr_session , arg2 : tr_direction ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " @brief Set whether or not to limit how many torrents can download (TR_DOWN) or seed (TR_UP) at the same time" ] pub fn tr_sessionSetQueueEnabled ( arg1 : * mut tr_session , arg2 : tr_direction , do_limit_simultaneous_seed_torrents : bool ) ; } extern "C" { # [ doc = " @brief Return true if we\'re limiting how many torrents can concurrently download (TR_DOWN) or seed (TR_UP) at the same time" ] pub fn tr_sessionGetQueueEnabled ( arg1 : * const tr_session , arg2 : tr_direction ) -> bool ; } extern "C" { # [ doc = " @brief Consider torrent as \'stalled\' when it\'s been inactive for N minutes." ] # [ doc = "Stalled torrents are left running but are not counted by tr_sessionGetQueueSize()." ] pub fn tr_sessionSetQueueStalledMinutes ( arg1 : * mut tr_session , minutes : :: std :: os :: raw :: c_int ) ; } extern "C" { # [ doc = " @return the number of minutes a torrent can be idle before being considered as stalled" ] pub fn tr_sessionGetQueueStalledMinutes ( arg1 : * const tr_session ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " @brief Set whether or not to count torrents idle for over N minutes as \'stalled\'" ] pub fn tr_sessionSetQueueStalledEnabled ( arg1 : * mut tr_session , arg2 : bool ) ; } extern "C" { # [ doc = " @return true if we\'re torrents idle for over N minutes will be flagged as \'stalled\'" ] pub fn tr_sessionGetQueueStalledEnabled ( arg1 : * const tr_session ) -> bool ; } extern "C" { # [ doc = " @brief Set a callback that is invoked when the queue starts a torrent" ] pub fn tr_torrentSetQueueStartCallback ( torrent : * mut tr_torrent , callback : :: std :: option :: Option < unsafe extern "C" fn ( arg1 : * mut tr_torrent , arg2 : * mut :: std :: os :: raw :: c_void ) > , user_data : * mut :: std :: os :: raw :: c_void ) ; } extern "C" { # [ doc = "  Load all the torrents in tr_getTorrentDir()." ] # [ doc = "  This can be used at startup to kickstart all the torrents" ] # [ doc = "  from the previous session." ] pub fn tr_sessionLoadTorrents ( session : * mut tr_session , ctor : * mut tr_ctor , setmeCount : * mut :: std :: os :: raw :: c_int ) -> * mut * mut tr_torrent ; } extern "C" { pub fn tr_sessionIsTorrentDoneScriptEnabled ( arg1 : * const tr_session ) -> bool ; } extern "C" { pub fn tr_sessionSetTorrentDoneScriptEnabled ( arg1 : * mut tr_session , isEnabled : bool ) ; } extern "C" { pub fn tr_sessionGetTorrentDoneScript ( arg1 : * const tr_session ) -> * const :: std :: os :: raw :: c_char ; } extern "C" { pub fn tr_sessionSetTorrentDoneScript ( arg1 : * mut tr_session , scriptFilename : * const :: std :: os :: raw :: c_char ) ; } # [ repr ( u32 ) ] # [ doc = " Message Logging" ] # [ derive ( Debug , Copy , Clone , PartialEq , Eq , Hash ) ] pub enum tr_log_level { TR_LOG_ERROR = 1 , TR_LOG_INFO = 2 , TR_LOG_DEBUG = 3 , TR_LOG_FIREHOSE = 4 , } extern "C" { pub fn tr_logSetLevel ( arg1 : tr_log_level ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct tr_log_message { pub level : tr_log_level , pub line : :: std :: os :: raw :: c_int , pub when : time_t , pub name : * mut :: std :: os :: raw :: c_char , pub message : * mut :: std :: os :: raw :: c_char , pub file : * const :: std :: os :: raw :: c_char , pub next : * mut tr_log_message , } extern "C" { pub fn tr_logGetQueue ( ) -> * mut tr_log_message ; } extern "C" { pub fn tr_logGetQueueEnabled ( ) -> bool ; } extern "C" { pub fn tr_logSetQueueEnabled ( isEnabled : bool ) ; } extern "C" { pub fn tr_logFreeQueue ( freeme : * mut tr_log_message ) ; } extern "C" { # [ doc = " Specify a range of IPs for Transmission to block." ] # [ doc = "" ] # [ doc = " Filename must be an uncompressed ascii file." ] # [ doc = "" ] # [ doc = " libtransmission does not keep a handle to `filename\'" ] # [ doc = " after this call returns, so the caller is free to" ] # [ doc = " keep or delete `filename\' as it wishes." ] # [ doc = " libtransmission makes its own copy of the file" ] # [ doc = " massaged into a binary format easier to search." ] # [ doc = "" ] # [ doc = " The caller only needs to invoke this when the blocklist" ] # [ doc = " has changed." ] # [ doc = "" ] # [ doc = " Passing NULL for a filename will clear the blocklist." ] pub fn tr_blocklistSetContent ( session : * mut tr_session , filename : * const :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn tr_blocklistGetRuleCount ( session : * const tr_session ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn tr_blocklistExists ( session : * const tr_session ) -> bool ; } extern "C" { pub fn tr_blocklistIsEnabled ( session : * const tr_session ) -> bool ; } extern "C" { pub fn tr_blocklistSetEnabled ( session : * mut tr_session , isEnabled : bool ) ; } extern "C" { # [ doc = " @brief The blocklist that ges updated when an RPC client" ] # [ doc = "invokes the \"blocklist-update\" method" ] pub fn tr_blocklistSetURL ( arg1 : * mut tr_session , url : * const :: std :: os :: raw :: c_char ) ; } extern "C" { pub fn tr_blocklistGetURL ( arg1 : * const tr_session ) -> * const :: std :: os :: raw :: c_char ; } # [ repr ( u32 ) ] # [ doc = " @addtogroup tr_ctor Torrent Constructors" ] # [ doc = "@{" ] # [ doc = "" ] # [ doc = "Instantiating a tr_torrent had gotten more complicated as features were" ] # [ doc = "added. At one point there were four functions to check metainfo and five" ] # [ doc = "to create a tr_torrent object." ] # [ doc = "" ] # [ doc = "To remedy this, a Torrent Constructor (struct tr_ctor) has been introduced:" ] # [ doc = "- Simplifies the API to two functions: tr_torrentParse() and tr_torrentNew()" ] # [ doc = "- You can set the fields you want; the system sets defaults for the rest." ] # [ doc = "- You can specify whether or not your fields should supercede resume\'s." ] # [ doc = "- We can add new features to tr_ctor without breaking tr_torrentNew()\'s API." ] # [ doc = "" ] # [ doc = "All the tr_ctor{Get,Set}* () functions with a return value return" ] # [ doc = "an error number, or zero if no error occurred." ] # [ doc = "" ] # [ doc = "You must call one of the SetMetainfo() functions before creating" ] # [ doc = "a torrent with a tr_ctor. The other functions are optional." ] # [ doc = "" ] # [ doc = "You can reuse a single tr_ctor to create a batch of torrents --" ] # [ doc = "just call one of the SetMetainfo() functions between each" ] # [ doc = "tr_torrentNew() call." ] # [ doc = "" ] # [ doc = "Every call to tr_ctorSetMetainfo* () frees the previous metainfo." ] # [ derive ( Debug , Copy , Clone , PartialEq , Eq , Hash ) ] pub enum tr_ctorMode { TR_FALLBACK = 0 , TR_FORCE = 1 , } extern "C" { # [ doc = " @brief Create a torrent constructor object used to instantiate a tr_torrent" ] # [ doc = "@param session_or_NULL the tr_session." ] # [ doc = "This is required if you\'re going to call tr_torrentNew()," ] # [ doc = "but you can use NULL for tr_torrentParse()." ] # [ doc = "@see tr_torrentNew(), tr_torrentParse()" ] pub fn tr_ctorNew ( session_or_NULL : * const tr_session ) -> * mut tr_ctor ; } extern "C" { # [ doc = " @brief Free a torrent constructor object" ] pub fn tr_ctorFree ( ctor : * mut tr_ctor ) ; } extern "C" { # [ doc = " @brief Set whether or not to delete the source .torrent file" ] # [ doc = "when the torrent is added. (Default: False)" ] pub fn tr_ctorSetDeleteSource ( ctor : * mut tr_ctor , doDelete : bool ) ; } extern "C" { # [ doc = " @brief Set the constructor\'s metainfo from a magnet link" ] pub fn tr_ctorSetMetainfoFromMagnetLink ( ctor : * mut tr_ctor , magnet : * const :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " @brief Set the constructor\'s metainfo from a raw benc already in memory" ] pub fn tr_ctorSetMetainfo ( ctor : * mut tr_ctor , metainfo : * const u8 , len : usize ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " @brief Set the constructor\'s metainfo from a local .torrent file" ] pub fn tr_ctorSetMetainfoFromFile ( ctor : * mut tr_ctor , filename : * const :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " @brief Set the metainfo from an existing file in tr_getTorrentDir()." ] # [ doc = "" ] # [ doc = " This is used by the Mac client on startup to pick and choose which" ] # [ doc = " torrents to load" ] pub fn tr_ctorSetMetainfoFromHash ( ctor : * mut tr_ctor , hashString : * const :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " @brief Set how many peers this torrent can connect to. (Default: 50)" ] pub fn tr_ctorSetPeerLimit ( ctor : * mut tr_ctor , mode : tr_ctorMode , limit : u16 ) ; } extern "C" { # [ doc = " @brief Set the download folder for the torrent being added with this ctor." ] # [ doc = "@see tr_ctorSetDownloadDir()" ] # [ doc = "@see tr_sessionInit()" ] pub fn tr_ctorSetDownloadDir ( ctor : * mut tr_ctor , mode : tr_ctorMode , directory : * const :: std :: os :: raw :: c_char ) ; } extern "C" { # [ doc = " @brief Set the incompleteDir for this torrent." ] # [ doc = "" ] # [ doc = " This is not a supported API call." ] # [ doc = " It only exists so the mac client can migrate" ] # [ doc = " its older incompleteDir settings, and that\'s" ] # [ doc = " the only place where it should be used." ] pub fn tr_ctorSetIncompleteDir ( ctor : * mut tr_ctor , directory : * const :: std :: os :: raw :: c_char ) ; } extern "C" { # [ doc = " Set whether or not the torrent begins downloading/seeding when created." ] # [ doc = "(Default: not paused)" ] pub fn tr_ctorSetPaused ( ctor : * mut tr_ctor , mode : tr_ctorMode , isPaused : bool ) ; } extern "C" { # [ doc = " @brief Set the priorities for files in a torrent" ] pub fn tr_ctorSetFilePriorities ( ctor : * mut tr_ctor , files : * const tr_file_index_t , fileCount : tr_file_index_t , priority : tr_priority_t ) ; } extern "C" { # [ doc = " @brief Set the download flag for files in a torrent" ] pub fn tr_ctorSetFilesWanted ( ctor : * mut tr_ctor , fileIndices : * const tr_file_index_t , fileCount : tr_file_index_t , wanted : bool ) ; } extern "C" { # [ doc = " @brief Get this peer constructor\'s peer limit" ] pub fn tr_ctorGetPeerLimit ( ctor : * const tr_ctor , mode : tr_ctorMode , setmeCount : * mut u16 ) -> bool ; } extern "C" { # [ doc = " @brief Get the \"isPaused\" flag from this peer constructor" ] pub fn tr_ctorGetPaused ( ctor : * const tr_ctor , mode : tr_ctorMode , setmeIsPaused : * mut bool ) -> bool ; } extern "C" { # [ doc = " @brief Get the download path from this peer constructor" ] pub fn tr_ctorGetDownloadDir ( ctor : * const tr_ctor , mode : tr_ctorMode , setmeDownloadDir : * mut * const :: std :: os :: raw :: c_char ) -> bool ; } extern "C" { # [ doc = " @brief Get the incomplete directory from this peer constructor" ] pub fn tr_ctorGetIncompleteDir ( ctor : * const tr_ctor , setmeIncompleteDir : * mut * const :: std :: os :: raw :: c_char ) -> bool ; } extern "C" { # [ doc = " @brief Get the metainfo from this peer constructor" ] pub fn tr_ctorGetMetainfo ( ctor : * const tr_ctor , setme : * mut * const tr_variant ) -> bool ; } extern "C" { # [ doc = " @brief Get the \"delete .torrent file\" flag from this peer constructor" ] pub fn tr_ctorGetDeleteSource ( ctor : * const tr_ctor , setmeDoDelete : * mut bool ) -> bool ; } extern "C" { # [ doc = " @brief Get the tr_session poiner from this peer constructor" ] pub fn tr_ctorGetSession ( ctor : * const tr_ctor ) -> * mut tr_session ; } extern "C" { # [ doc = " @brief Get the .torrent file that this ctor\'s metainfo came from," ] # [ doc = "or NULL if tr_ctorSetMetainfoFromFile() wasn\'t used" ] pub fn tr_ctorGetSourceFile ( ctor : * const tr_ctor ) -> * const :: std :: os :: raw :: c_char ; } # [ repr ( u32 ) ] # [ derive ( Debug , Copy , Clone , PartialEq , Eq , Hash ) ] pub enum tr_parse_result { TR_PARSE_OK = 0 , TR_PARSE_ERR = 1 , TR_PARSE_DUPLICATE = 2 , } extern "C" { # [ doc = " @brief Parses the specified metainfo" ] # [ doc = "" ] # [ doc = " @return TR_PARSE_ERR if parsing failed;" ] # [ doc = "         TR_PARSE_OK if parsing succeeded and it\'s not a duplicate;" ] # [ doc = "         TR_PARSE_DUPLICATE if parsing succeeded but it\'s a duplicate." ] # [ doc = "" ] # [ doc = " @param setme_info_or_NULL If parsing is successful and setme_info is non-NULL," ] # [ doc = "                           the parsed metainfo is stored there and sould be freed" ] # [ doc = "                           by calling tr_metainfoFree() when no longer needed." ] # [ doc = "" ] # [ doc = " Notes:" ] # [ doc = "" ] # [ doc = " 1. tr_torrentParse() won\'t be able to check for duplicates -- and therefore" ] # [ doc = "    won\'t return TR_PARSE_DUPLICATE -- unless ctor\'s \"download-dir\" and" ] # [ doc = "    session variable is set." ] # [ doc = "" ] # [ doc = " 2. setme_info->torrent\'s value can\'t be set unless ctor\'s session variable" ] # [ doc = "    is set." ] pub fn tr_torrentParse ( ctor : * const tr_ctor , setme_info_or_NULL : * mut tr_info ) -> tr_parse_result ; } extern "C" { # [ doc = " @brief free a metainfo" ] # [ doc = "@see tr_torrentParse" ] pub fn tr_metainfoFree ( inf : * mut tr_info ) ; } extern "C" { # [ doc = " Instantiate a single torrent." ] # [ doc = "" ] # [ doc = " Returns a pointer to the torrent on success, or NULL on failure." ] # [ doc = "" ] # [ doc = " @param ctor               the builder struct" ] # [ doc = " @param setme_error        TR_PARSE_ERR if the parsing failed;" ] # [ doc = "                           TR_PARSE_OK if parsing succeeded and it\'s not a duplicate;" ] # [ doc = "                           TR_PARSE_DUPLICATE if parsing succeeded but it\'s a duplicate." ] # [ doc = " @param setme_duplicate_id when setmeError is TR_PARSE_DUPLICATE," ] # [ doc = "                           this field is set to the duplicate torrent\'s id." ] pub fn tr_torrentNew ( ctor : * const tr_ctor , setme_error : * mut :: std :: os :: raw :: c_int , setme_duplicate_id : * mut :: std :: os :: raw :: c_int ) -> * mut tr_torrent ; } # [ doc = " @addtogroup tr_torrent Torrents" ] # [ doc = "@{" ] pub type tr_fileFunc = :: std :: option :: Option < unsafe extern "C" fn ( filename : * const :: std :: os :: raw :: c_char , error : * mut * mut tr_error ) -> bool > ; extern "C" { # [ doc = " @brief Removes our .torrent and .resume files for this torrent" ] pub fn tr_torrentRemove ( torrent : * mut tr_torrent , removeLocalData : bool , removeFunc : tr_fileFunc ) ; } extern "C" { # [ doc = " @brief Start a torrent" ] pub fn tr_torrentStart ( torrent : * mut tr_torrent ) ; } extern "C" { # [ doc = " @brief Stop (pause) a torrent" ] pub fn tr_torrentStop ( torrent : * mut tr_torrent ) ; } pub type tr_torrent_rename_done_func = :: std :: option :: Option < unsafe extern "C" fn ( torrent : * mut tr_torrent , oldpath : * const :: std :: os :: raw :: c_char , newname : * const :: std :: os :: raw :: c_char , error : :: std :: os :: raw :: c_int , user_data : * mut :: std :: os :: raw :: c_void ) > ; extern "C" { # [ doc = " @brief Rename a file or directory in a torrent." ] # [ doc = "" ] # [ doc = " @param tor           the torrent whose path will be renamed" ] # [ doc = " @param oldpath       the path to the file or folder that will be renamed" ] # [ doc = " @param newname       the file or folder\'s new name" ] # [ doc = " @param callback      the callback invoked when the renaming finishes, or NULL" ] # [ doc = " @param callback_data the pointer to pass in the callback\'s user_data arg" ] # [ doc = "" ] # [ doc = " As a special case, renaming the root file in a torrent will also" ] # [ doc = " update tr_info.name." ] # [ doc = "" ] # [ doc = " EXAMPLES" ] # [ doc = "" ] # [ doc = "   Consider a tr_torrent where its" ] # [ doc = "   info.files[0].name is \"frobnitz-linux/checksum\" and" ] # [ doc = "   info.files[1].name is \"frobnitz-linux/frobnitz.iso\"." ] # [ doc = "" ] # [ doc = "   1. tr_torrentRenamePath(tor, \"frobnitz-linux\", \"foo\") will rename" ] # [ doc = "      the \"frotbnitz-linux\" folder as \"foo\", and update both info.name" ] # [ doc = "      and info.files[*].name." ] # [ doc = "" ] # [ doc = "   2. tr_torrentRenamePath(tor, \"frobnitz-linux/checksum\", \"foo\") will" ] # [ doc = "      rename the \"frobnitz-linux/checksum\" file as \"foo\" and update" ] # [ doc = "      files[0].name to \"frobnitz-linux/foo\"." ] # [ doc = "" ] # [ doc = " RETURN" ] # [ doc = "" ] # [ doc = "   Changing tr_info\'s contents requires a session lock, so this function" ] # [ doc = "   returns asynchronously to avoid blocking. If you don\'t want to be notified" ] # [ doc = "   when the function has finished, you can pass NULL as the callback arg." ] # [ doc = "" ] # [ doc = "   On success, the callback\'s error argument will be 0." ] # [ doc = "" ] # [ doc = "   If oldpath can\'t be found in files[*].name, or if newname is already" ] # [ doc = "   in files[*].name, or contains a directory separator, or is NULL, \"\"," ] # [ doc = "   \".\", or \"..\", the error argument will be EINVAL." ] # [ doc = "" ] # [ doc = "   If the path exists on disk but can\'t be renamed, the error argument" ] # [ doc = "   will be the errno set by rename()." ] pub fn tr_torrentRenamePath ( tor : * mut tr_torrent , oldpath : * const :: std :: os :: raw :: c_char , newname : * const :: std :: os :: raw :: c_char , callback : tr_torrent_rename_done_func , callback_data : * mut :: std :: os :: raw :: c_void ) ; } pub const TR_LOC_MOVING : _bindgen_ty_1 = _bindgen_ty_1 :: TR_LOC_MOVING ; pub const TR_LOC_DONE : _bindgen_ty_1 = _bindgen_ty_1 :: TR_LOC_DONE ; pub const TR_LOC_ERROR : _bindgen_ty_1 = _bindgen_ty_1 :: TR_LOC_ERROR ; # [ repr ( u32 ) ] # [ derive ( Debug , Copy , Clone , PartialEq , Eq , Hash ) ] pub enum _bindgen_ty_1 { TR_LOC_MOVING = 0 , TR_LOC_DONE = 1 , TR_LOC_ERROR = 2 , } extern "C" { # [ doc = " @brief Tell transmsision where to find this torrent\'s local data." ] # [ doc = "" ] # [ doc = " if move_from_previous_location is `true\', the torrent\'s incompleteDir" ] # [ doc = " will be clobberred s.t. additional files being added will be saved" ] # [ doc = " to the torrent\'s downloadDir." ] pub fn tr_torrentSetLocation ( torrent : * mut tr_torrent , location : * const :: std :: os :: raw :: c_char , move_from_previous_location : bool , setme_progress : * mut f64 , setme_state : * mut :: std :: os :: raw :: c_int ) ; } extern "C" { pub fn tr_torrentGetBytesLeftToAllocate ( torrent : * const tr_torrent ) -> u64 ; } extern "C" { # [ doc = " @brief Returns this torrent\'s unique ID." ] # [ doc = "" ] # [ doc = " IDs are good as simple lookup keys, but are not persistent" ] # [ doc = " between sessions. If you need that, use tr_info.hash or" ] # [ doc = " tr_info.hashString." ] pub fn tr_torrentId ( torrent : * const tr_torrent ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn tr_torrentFindFromId ( session : * mut tr_session , id : :: std :: os :: raw :: c_int ) -> * mut tr_torrent ; } extern "C" { pub fn tr_torrentFindFromHash ( session : * mut tr_session , hash : * const u8 ) -> * mut tr_torrent ; } extern "C" { # [ doc = " @brief Convenience function similar to tr_torrentFindFromHash()" ] pub fn tr_torrentFindFromMagnetLink ( session : * mut tr_session , link : * const :: std :: os :: raw :: c_char ) -> * mut tr_torrent ; } extern "C" { # [ doc = " @return this torrent\'s name." ] pub fn tr_torrentName ( arg1 : * const tr_torrent ) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [ doc = " @brief find the location of a torrent\'s file by looking with and without" ] # [ doc = "        the \".part\" suffix, looking in downloadDir and incompleteDir, etc." ] # [ doc = " @return a newly-allocated string (that must be tr_free()d by the caller" ] # [ doc = "         when done) that gives the location of this file on disk," ] # [ doc = "         or NULL if no file exists yet." ] # [ doc = " @param tor the torrent whose file we\'re looking for" ] # [ doc = " @param fileNum the fileIndex, in [0...tr_info.fileCount)" ] pub fn tr_torrentFindFile ( tor : * const tr_torrent , fileNum : tr_file_index_t ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { # [ doc = "  Torrent speed limits" ] pub fn tr_torrentSetSpeedLimit_KBps ( arg1 : * mut tr_torrent , arg2 : tr_direction , KBps : :: std :: os :: raw :: c_uint ) ; } extern "C" { pub fn tr_torrentGetSpeedLimit_KBps ( arg1 : * const tr_torrent , arg2 : tr_direction ) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn tr_torrentUseSpeedLimit ( arg1 : * mut tr_torrent , arg2 : tr_direction , arg3 : bool ) ; } extern "C" { pub fn tr_torrentUsesSpeedLimit ( arg1 : * const tr_torrent , arg2 : tr_direction ) -> bool ; } extern "C" { pub fn tr_torrentUseSessionLimits ( arg1 : * mut tr_torrent , arg2 : bool ) ; } extern "C" { pub fn tr_torrentUsesSessionLimits ( arg1 : * const tr_torrent ) -> bool ; } # [ repr ( u32 ) ] # [ doc = "  Ratio Limits" ] # [ derive ( Debug , Copy , Clone , PartialEq , Eq , Hash ) ] pub enum tr_ratiolimit { TR_RATIOLIMIT_GLOBAL = 0 , TR_RATIOLIMIT_SINGLE = 1 , TR_RATIOLIMIT_UNLIMITED = 2 , } extern "C" { pub fn tr_torrentSetRatioMode ( tor : * mut tr_torrent , mode : tr_ratiolimit ) ; } extern "C" { pub fn tr_torrentGetRatioMode ( tor : * const tr_torrent ) -> tr_ratiolimit ; } extern "C" { pub fn tr_torrentSetRatioLimit ( tor : * mut tr_torrent , ratio : f64 ) ; } extern "C" { pub fn tr_torrentGetRatioLimit ( tor : * const tr_torrent ) -> f64 ; } extern "C" { pub fn tr_torrentGetSeedRatio ( arg1 : * const tr_torrent , ratio : * mut f64 ) -> bool ; } # [ repr ( u32 ) ] # [ doc = "  Idle Time Limits" ] # [ derive ( Debug , Copy , Clone , PartialEq , Eq , Hash ) ] pub enum tr_idlelimit { TR_IDLELIMIT_GLOBAL = 0 , TR_IDLELIMIT_SINGLE = 1 , TR_IDLELIMIT_UNLIMITED = 2 , } extern "C" { pub fn tr_torrentSetIdleMode ( tor : * mut tr_torrent , mode : tr_idlelimit ) ; } extern "C" { pub fn tr_torrentGetIdleMode ( tor : * const tr_torrent ) -> tr_idlelimit ; } extern "C" { pub fn tr_torrentSetIdleLimit ( tor : * mut tr_torrent , idleMinutes : u16 ) ; } extern "C" { pub fn tr_torrentGetIdleLimit ( tor : * const tr_torrent ) -> u16 ; } extern "C" { pub fn tr_torrentGetSeedIdle ( arg1 : * const tr_torrent , minutes : * mut u16 ) -> bool ; } extern "C" { # [ doc = "  Peer Limits" ] pub fn tr_torrentSetPeerLimit ( tor : * mut tr_torrent , peerLimit : u16 ) ; } extern "C" { pub fn tr_torrentGetPeerLimit ( tor : * const tr_torrent ) -> u16 ; } pub const TR_PRI_LOW : _bindgen_ty_2 = _bindgen_ty_2 :: TR_PRI_LOW ; pub const TR_PRI_NORMAL : _bindgen_ty_2 = _bindgen_ty_2 :: TR_PRI_NORMAL ; pub const TR_PRI_HIGH : _bindgen_ty_2 = _bindgen_ty_2 :: TR_PRI_HIGH ; # [ repr ( i32 ) ] # [ doc = "  File Priorities" ] # [ derive ( Debug , Copy , Clone , PartialEq , Eq , Hash ) ] pub enum _bindgen_ty_2 { TR_PRI_LOW = -1 , TR_PRI_NORMAL = 0 , TR_PRI_HIGH = 1 , } extern "C" { # [ doc = " @brief Set a batch of files to a particular priority." ] # [ doc = "" ] # [ doc = " @param priority must be one of TR_PRI_NORMAL, _HIGH, or _LOW" ] pub fn tr_torrentSetFilePriorities ( torrent : * mut tr_torrent , files : * const tr_file_index_t , fileCount : tr_file_index_t , priority : tr_priority_t ) ; } extern "C" { # [ doc = " @brief Get this torrent\'s file priorities." ] # [ doc = "" ] # [ doc = " @return A malloc()ed array of tor->info.fileCount items," ] # [ doc = "         each holding a TR_PRI_NORMAL, TR_PRI_HIGH, or TR_PRI_LOW." ] # [ doc = "         It\'s the caller\'s responsibility to free() this." ] pub fn tr_torrentGetFilePriorities ( torrent : * const tr_torrent ) -> * mut tr_priority_t ; } extern "C" { # [ doc = " @brief Set a batch of files to be downloaded or not." ] pub fn tr_torrentSetFileDLs ( torrent : * mut tr_torrent , files : * const tr_file_index_t , fileCount : tr_file_index_t , do_download : bool ) ; } extern "C" { pub fn tr_torrentInfo ( torrent : * const tr_torrent ) -> * const tr_info ; } extern "C" { pub fn tr_torrentSetDownloadDir ( torrent : * mut tr_torrent , path : * const :: std :: os :: raw :: c_char ) ; } extern "C" { pub fn tr_torrentGetDownloadDir ( torrent : * const tr_torrent ) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [ doc = " Returns the root directory of where the torrent is." ] # [ doc = "" ] # [ doc = " This will usually be the downloadDir. However if the torrent" ] # [ doc = " has an incompleteDir enabled and hasn\'t finished downloading" ] # [ doc = " yet, that will be returned instead." ] pub fn tr_torrentGetCurrentDir ( tor : * const tr_torrent ) -> * const :: std :: os :: raw :: c_char ; } extern "C" { pub fn tr_torrentInfoGetMagnetLink ( inf : * const tr_info ) -> * mut :: std :: os :: raw :: c_char ; } # [ doc = " @brief a part of tr_info that represents a single tracker" ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct tr_tracker_info { pub tier : :: std :: os :: raw :: c_int , pub announce : * mut :: std :: os :: raw :: c_char , pub scrape : * mut :: std :: os :: raw :: c_char , pub id : u32 , } extern "C" { # [ doc = " @brief Modify a torrent\'s tracker list." ] # [ doc = "" ] # [ doc = " This updates both the `torrent\' object\'s tracker list" ] # [ doc = " and the metainfo file in tr_sessionGetConfigDir()\'s torrent subdirectory." ] # [ doc = "" ] # [ doc = " @param torrent The torrent whose tracker list is to be modified" ] # [ doc = " @param trackers An array of trackers, sorted by tier from first to last." ] # [ doc = "                 NOTE: only the `tier\' and `announce\' fields are used." ] # [ doc = "                 libtransmission derives `scrape\' from `announce\'" ] # [ doc = "                 and reassigns \'id\'." ] # [ doc = " @param trackerCount size of the `trackers\' array" ] pub fn tr_torrentSetAnnounceList ( torrent : * mut tr_torrent , trackers : * const tr_tracker_info , trackerCount : :: std :: os :: raw :: c_int ) -> bool ; } # [ repr ( u32 ) ] # [ derive ( Debug , Copy , Clone , PartialEq , Eq , Hash ) ] pub enum tr_completeness { TR_LEECH = 0 , TR_SEED = 1 , TR_PARTIAL_SEED = 2 , } # [ doc = " @param wasRunning whether or not the torrent was running when" ] # [ doc = "                   it changed its completeness state" ] pub type tr_torrent_completeness_func = :: std :: option :: Option < unsafe extern "C" fn ( torrent : * mut tr_torrent , completeness : tr_completeness , wasRunning : bool , user_data : * mut :: std :: os :: raw :: c_void ) > ; pub type tr_torrent_ratio_limit_hit_func = :: std :: option :: Option < unsafe extern "C" fn ( torrent : * mut tr_torrent , user_data : * mut :: std :: os :: raw :: c_void ) > ; pub type tr_torrent_idle_limit_hit_func = :: std :: option :: Option < unsafe extern "C" fn ( torrent : * mut tr_torrent , user_data : * mut :: std :: os :: raw :: c_void ) > ; extern "C" { # [ doc = " Register to be notified whenever a torrent\'s \"completeness\"" ] # [ doc = " changes. This will be called, for example, when a torrent" ] # [ doc = " finishes downloading and changes from TR_LEECH to" ] # [ doc = " either TR_SEED or TR_PARTIAL_SEED." ] # [ doc = "" ] # [ doc = " func is invoked FROM LIBTRANSMISSION\'S THREAD!" ] # [ doc = " This means func must be fast (to avoid blocking peers)," ] # [ doc = " shouldn\'t call libtransmission functions (to avoid deadlock)," ] # [ doc = " and shouldn\'t modify client-level memory without using a mutex!" ] # [ doc = "" ] # [ doc = " @see tr_completeness" ] pub fn tr_torrentSetCompletenessCallback ( torrent : * mut tr_torrent , func : tr_torrent_completeness_func , user_data : * mut :: std :: os :: raw :: c_void ) ; } extern "C" { pub fn tr_torrentClearCompletenessCallback ( torrent : * mut tr_torrent ) ; } pub type tr_torrent_metadata_func = :: std :: option :: Option < unsafe extern "C" fn ( torrent : * mut tr_torrent , user_data : * mut :: std :: os :: raw :: c_void ) > ; extern "C" { # [ doc = " Register to be notified whenever a torrent changes from" ] # [ doc = " having incomplete metadata to having complete metadata." ] # [ doc = " This happens when a magnet link finishes downloading" ] # [ doc = " metadata from its peers." ] pub fn tr_torrentSetMetadataCallback ( tor : * mut tr_torrent , func : tr_torrent_metadata_func , user_data : * mut :: std :: os :: raw :: c_void ) ; } extern "C" { # [ doc = " Register to be notified whenever a torrent\'s ratio limit" ] # [ doc = " has been hit. This will be called when the torrent\'s" ] # [ doc = " ul/dl ratio has met or exceeded the designated ratio limit." ] # [ doc = "" ] # [ doc = " Has the same restrictions as tr_torrentSetCompletenessCallback" ] pub fn tr_torrentSetRatioLimitHitCallback ( torrent : * mut tr_torrent , func : tr_torrent_ratio_limit_hit_func , user_data : * mut :: std :: os :: raw :: c_void ) ; } extern "C" { pub fn tr_torrentClearRatioLimitHitCallback ( torrent : * mut tr_torrent ) ; } extern "C" { # [ doc = " Register to be notified whenever a torrent\'s idle limit" ] # [ doc = " has been hit. This will be called when the seeding torrent\'s" ] # [ doc = " idle time has met or exceeded the designated idle limit." ] # [ doc = "" ] # [ doc = " Has the same restrictions as tr_torrentSetCompletenessCallback" ] pub fn tr_torrentSetIdleLimitHitCallback ( torrent : * mut tr_torrent , func : tr_torrent_idle_limit_hit_func , user_data : * mut :: std :: os :: raw :: c_void ) ; } extern "C" { pub fn tr_torrentClearIdleLimitHitCallback ( torrent : * mut tr_torrent ) ; } extern "C" { # [ doc = " MANUAL ANNOUNCE" ] # [ doc = "" ] # [ doc = " Trackers usually set an announce interval of 15 or 30 minutes." ] # [ doc = " Users can send one-time announce requests that override this" ] # [ doc = " interval by calling tr_torrentManualUpdate()." ] # [ doc = "" ] # [ doc = " The wait interval for tr_torrentManualUpdate() is much smaller." ] # [ doc = " You can test whether or not a manual update is possible" ] # [ doc = " (for example, to desensitize the button) by calling" ] # [ doc = " tr_torrentCanManualUpdate()." ] pub fn tr_torrentManualUpdate ( torrent : * mut tr_torrent ) ; } extern "C" { pub fn tr_torrentCanManualUpdate ( torrent : * const tr_torrent ) -> bool ; } # [ doc = "  tr_peer_stat" ] # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub struct tr_peer_stat { pub isUTP : bool , pub isEncrypted : bool , pub isDownloadingFrom : bool , pub isUploadingTo : bool , pub isSeed : bool , pub peerIsChoked : bool , pub peerIsInterested : bool , pub clientIsChoked : bool , pub clientIsInterested : bool , pub isIncoming : bool , pub from : u8 , pub port : tr_port , pub addr : [ :: std :: os :: raw :: c_char ; 46usize ] , pub client : [ :: std :: os :: raw :: c_char ; 80usize ] , pub flagStr : [ :: std :: os :: raw :: c_char ; 32usize ] , pub progress : f32 , pub rateToPeer_KBps : f64 , pub rateToClient_KBps : f64 , # [ doc = "  THESE NEXT FOUR FIELDS ARE EXPERIMENTAL." ] # [ doc = "  Don\'t rely on them; they\'ll probably go away" ] pub blocksToPeer : u32 , pub blocksToClient : u32 , pub cancelsToPeer : u32 , pub cancelsToClient : u32 , pub pendingReqsToClient : :: std :: os :: raw :: c_int , pub pendingReqsToPeer : :: std :: os :: raw :: c_int , } extern "C" { pub fn tr_torrentPeers ( torrent : * const tr_torrent , peerCount : * mut :: std :: os :: raw :: c_int ) -> * mut tr_peer_stat ; } extern "C" { pub fn tr_torrentPeersFree ( peerStats : * mut tr_peer_stat , peerCount : :: std :: os :: raw :: c_int ) ; } # [ repr ( u32 ) ] # [ doc = "  tr_tracker_stat" ] # [ derive ( Debug , Copy , Clone , PartialEq , Eq , Hash ) ] pub enum tr_tracker_state { TR_TRACKER_INACTIVE = 0 , TR_TRACKER_WAITING = 1 , TR_TRACKER_QUEUED = 2 , TR_TRACKER_ACTIVE = 3 , } # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub struct tr_tracker_stat { pub downloadCount : :: std :: os :: raw :: c_int , pub hasAnnounced : bool , pub hasScraped : bool , pub host : [ :: std :: os :: raw :: c_char ; 1024usize ] , pub announce : [ :: std :: os :: raw :: c_char ; 1024usize ] , pub scrape : [ :: std :: os :: raw :: c_char ; 1024usize ] , pub isBackup : bool , pub announceState : tr_tracker_state , pub scrapeState : tr_tracker_state , pub lastAnnouncePeerCount : :: std :: os :: raw :: c_int , pub lastAnnounceResult : [ :: std :: os :: raw :: c_char ; 128usize ] , pub lastAnnounceStartTime : time_t , pub lastAnnounceSucceeded : bool , pub lastAnnounceTimedOut : bool , pub lastAnnounceTime : time_t , pub lastScrapeResult : [ :: std :: os :: raw :: c_char ; 128usize ] , pub lastScrapeStartTime : time_t , pub lastScrapeSucceeded : bool , pub lastScrapeTimedOut : bool , pub lastScrapeTime : time_t , pub leecherCount : :: std :: os :: raw :: c_int , pub nextAnnounceTime : time_t , pub nextScrapeTime : time_t , pub seederCount : :: std :: os :: raw :: c_int , pub tier : :: std :: os :: raw :: c_int , pub id : u32 , } extern "C" { pub fn tr_torrentTrackers ( torrent : * const tr_torrent , setmeTrackerCount : * mut :: std :: os :: raw :: c_int ) -> * mut tr_tracker_stat ; } extern "C" { pub fn tr_torrentTrackersFree ( trackerStats : * mut tr_tracker_stat , trackerCount : :: std :: os :: raw :: c_int ) ; } extern "C" { # [ doc = " @brief get the download speeds for each of this torrent\'s webseed sources." ] # [ doc = "" ] # [ doc = " @return an array of tor->info.webseedCount floats giving download speeds." ] # [ doc = "         Each speed in the array corresponds to the webseed at the same" ] # [ doc = "         array index in tor->info.webseeds." ] # [ doc = "         To differentiate \"idle\" and \"stalled\" status, idle webseeds will" ] # [ doc = "         return -1 instead of 0 KiB/s." ] # [ doc = "         NOTE: always free this array with tr_free() when you\'re done with it." ] pub fn tr_torrentWebSpeeds_KBps ( torrent : * const tr_torrent ) -> * mut f64 ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct tr_file_stat { pub bytesCompleted : u64 , pub progress : f32 , } extern "C" { pub fn tr_torrentFiles ( torrent : * const tr_torrent , fileCount : * mut tr_file_index_t ) -> * mut tr_file_stat ; } extern "C" { pub fn tr_torrentFilesFree ( files : * mut tr_file_stat , fileCount : tr_file_index_t ) ; } extern "C" { # [ doc = " tr_torrentAvailability" ] # [ doc = "" ] # [ doc = " Use this to draw an advanced progress bar which is \'size\' pixels" ] # [ doc = " wide. Fills \'tab\' which you must have allocated: each byte is set" ] # [ doc = " to either -1 if we have the piece, otherwise it is set to the number" ] # [ doc = " of connected peers who have the piece." ] pub fn tr_torrentAvailability ( torrent : * const tr_torrent , tab : * mut i8 , size : :: std :: os :: raw :: c_int ) ; } extern "C" { pub fn tr_torrentAmountFinished ( torrent : * const tr_torrent , tab : * mut f32 , size : :: std :: os :: raw :: c_int ) ; } # [ doc = " Callback function invoked when a torrent finishes being verified." ] # [ doc = "" ] # [ doc = " @param torrent the torrent that was verified" ] # [ doc = " @param aborted true if the verify ended prematurely for some reason," ] # [ doc = "                such as tr_torrentStop() or tr_torrentSetLocation()" ] # [ doc = "                being called during verification." ] # [ doc = " @param user_data the user-defined pointer from tr_torrentVerify()" ] pub type tr_verify_done_func = :: std :: option :: Option < unsafe extern "C" fn ( torrent : * mut tr_torrent , aborted : bool , user_data : * mut :: std :: os :: raw :: c_void ) > ; extern "C" { # [ doc = " Queue a torrent for verification." ] # [ doc = "" ] # [ doc = " If callback_func is non-NULL, it will be called from the libtransmission" ] # [ doc = " thread after the torrent\'s completness state is updated after the" ] # [ doc = " file verification pass." ] pub fn tr_torrentVerify ( torrent : * mut tr_torrent , callback_func_or_NULL : tr_verify_done_func , callback_data_or_NULL : * mut :: std :: os :: raw :: c_void ) ; } # [ doc = " @brief a part of tr_info that represents a single file of the torrent\'s content" ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct tr_file { pub length : u64 , pub name : * mut :: std :: os :: raw :: c_char , pub priority : i8 , pub dnd : i8 , pub is_renamed : i8 , pub firstPiece : tr_piece_index_t , pub lastPiece : tr_piece_index_t , pub offset : u64 , } # [ doc = " @brief a part of tr_info that represents a single piece of the torrent\'s content" ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct tr_piece { pub timeChecked : time_t , pub hash : [ u8 ; 20usize ] , pub priority : i8 , pub dnd : i8 , } # [ doc = " @brief information about a torrent that comes from its metainfo file" ] # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub struct tr_info { pub totalSize : u64 , pub originalName : * mut :: std :: os :: raw :: c_char , pub name : * mut :: std :: os :: raw :: c_char , pub torrent : * mut :: std :: os :: raw :: c_char , pub webseeds : * mut * mut :: std :: os :: raw :: c_char , pub comment : * mut :: std :: os :: raw :: c_char , pub creator : * mut :: std :: os :: raw :: c_char , pub files : * mut tr_file , pub pieces : * mut tr_piece , pub trackers : * mut tr_tracker_info , pub dateCreated : time_t , pub trackerCount : :: std :: os :: raw :: c_uint , pub webseedCount : :: std :: os :: raw :: c_uint , pub fileCount : tr_file_index_t , pub pieceSize : u32 , pub pieceCount : tr_piece_index_t , pub hash : [ u8 ; 20usize ] , pub hashString : [ :: std :: os :: raw :: c_char ; 41usize ] , pub isPrivate : bool , pub isFolder : bool , } # [ repr ( u32 ) ] # [ doc = " What the torrent is doing right now." ] # [ doc = "" ] # [ doc = " Note: these values will become a straight enum at some point in the future." ] # [ doc = " Do not rely on their current `bitfield\' implementation" ] # [ derive ( Debug , Copy , Clone , PartialEq , Eq , Hash ) ] pub enum tr_torrent_activity { TR_STATUS_STOPPED = 0 , TR_STATUS_CHECK_WAIT = 1 , TR_STATUS_CHECK = 2 , TR_STATUS_DOWNLOAD_WAIT = 3 , TR_STATUS_DOWNLOAD = 4 , TR_STATUS_SEED_WAIT = 5 , TR_STATUS_SEED = 6 , } pub const TR_PEER_FROM_INCOMING : _bindgen_ty_3 = _bindgen_ty_3 :: TR_PEER_FROM_INCOMING ; pub const TR_PEER_FROM_LPD : _bindgen_ty_3 = _bindgen_ty_3 :: TR_PEER_FROM_LPD ; pub const TR_PEER_FROM_TRACKER : _bindgen_ty_3 = _bindgen_ty_3 :: TR_PEER_FROM_TRACKER ; pub const TR_PEER_FROM_DHT : _bindgen_ty_3 = _bindgen_ty_3 :: TR_PEER_FROM_DHT ; pub const TR_PEER_FROM_PEX : _bindgen_ty_3 = _bindgen_ty_3 :: TR_PEER_FROM_PEX ; pub const TR_PEER_FROM_RESUME : _bindgen_ty_3 = _bindgen_ty_3 :: TR_PEER_FROM_RESUME ; pub const TR_PEER_FROM_LTEP : _bindgen_ty_3 = _bindgen_ty_3 :: TR_PEER_FROM_LTEP ; pub const TR_PEER_FROM__MAX : _bindgen_ty_3 = _bindgen_ty_3 :: TR_PEER_FROM__MAX ; # [ repr ( u32 ) ] # [ derive ( Debug , Copy , Clone , PartialEq , Eq , Hash ) ] pub enum _bindgen_ty_3 { TR_PEER_FROM_INCOMING = 0 , TR_PEER_FROM_LPD = 1 , TR_PEER_FROM_TRACKER = 2 , TR_PEER_FROM_DHT = 3 , TR_PEER_FROM_PEX = 4 , TR_PEER_FROM_RESUME = 5 , TR_PEER_FROM_LTEP = 6 , TR_PEER_FROM__MAX = 7 , } # [ repr ( u32 ) ] # [ derive ( Debug , Copy , Clone , PartialEq , Eq , Hash ) ] pub enum tr_stat_errtype { TR_STAT_OK = 0 , TR_STAT_TRACKER_WARNING = 1 , TR_STAT_TRACKER_ERROR = 2 , TR_STAT_LOCAL_ERROR = 3 , } # [ doc = " @brief Used by tr_torrentStat() to tell clients about a torrent\'s state and statistics" ] # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub struct tr_stat { # [ doc = " The torrent\'s unique Id." ] # [ doc = "@see tr_torrentId()" ] pub id : :: std :: os :: raw :: c_int , # [ doc = " What is this torrent doing right now?" ] pub activity : tr_torrent_activity , # [ doc = " Defines what kind of text is in errorString." ] # [ doc = "@see errorString" ] pub error : tr_stat_errtype , # [ doc = " A warning or error message regarding the torrent." ] # [ doc = "@see error" ] pub errorString : [ :: std :: os :: raw :: c_char ; 512usize ] , # [ doc = " When tr_stat.activity is TR_STATUS_CHECK or TR_STATUS_CHECK_WAIT," ] # [ doc = "this is the percentage of how much of the files has been" ] # [ doc = "verified. When it gets to 1, the verify process is done." ] # [ doc = "Range is [0..1]" ] # [ doc = "@see tr_stat.activity" ] pub recheckProgress : f32 , # [ doc = " How much has been downloaded of the entire torrent." ] # [ doc = "Range is [0..1]" ] pub percentComplete : f32 , # [ doc = " How much of the metadata the torrent has." ] # [ doc = "For torrents added from a .torrent this will always be 1." ] # [ doc = "For magnet links, this number will from from 0 to 1 as the metadata is downloaded." ] # [ doc = "Range is [0..1]" ] pub metadataPercentComplete : f32 , # [ doc = " How much has been downloaded of the files the user wants. This differs" ] # [ doc = "from percentComplete if the user wants only some of the torrent\'s files." ] # [ doc = "Range is [0..1]" ] # [ doc = "@see tr_stat.leftUntilDone" ] pub percentDone : f32 , # [ doc = " How much has been uploaded to satisfy the seed ratio." ] # [ doc = "This is 1 if the ratio is reached or the torrent is set to seed forever." ] # [ doc = "Range is [0..1]" ] pub seedRatioPercentDone : f32 , # [ doc = " Speed all data being sent for this torrent." ] # [ doc = "This includes piece data, protocol messages, and TCP overhead" ] pub rawUploadSpeed_KBps : f32 , # [ doc = " Speed all data being received for this torrent." ] # [ doc = "This includes piece data, protocol messages, and TCP overhead" ] pub rawDownloadSpeed_KBps : f32 , # [ doc = " Speed all piece being sent for this torrent." ] # [ doc = "This ONLY counts piece data." ] pub pieceUploadSpeed_KBps : f32 , # [ doc = " Speed all piece being received for this torrent." ] # [ doc = "This ONLY counts piece data." ] pub pieceDownloadSpeed_KBps : f32 , # [ doc = " If downloading, estimated number of seconds left until the torrent is done." ] # [ doc = "If seeding, estimated number of seconds left until seed ratio is reached." ] pub eta : :: std :: os :: raw :: c_int , # [ doc = " If seeding, number of seconds left until the idle time limit is reached." ] pub etaIdle : :: std :: os :: raw :: c_int , # [ doc = " Number of peers that we\'re connected to" ] pub peersConnected : :: std :: os :: raw :: c_int , # [ doc = " How many peers we found out about from the tracker, or from pex," ] # [ doc = "or from incoming connections, or from our resume file." ] pub peersFrom : [ :: std :: os :: raw :: c_int ; 7usize ] , # [ doc = " Number of peers that are sending data to us." ] pub peersSendingToUs : :: std :: os :: raw :: c_int , # [ doc = " Number of peers that we\'re sending data to" ] pub peersGettingFromUs : :: std :: os :: raw :: c_int , # [ doc = " Number of webseeds that are sending data to us." ] pub webseedsSendingToUs : :: std :: os :: raw :: c_int , # [ doc = " Byte count of all the piece data we\'ll have downloaded when we\'re done," ] # [ doc = "whether or not we have it yet. This may be less than tr_info.totalSize" ] # [ doc = "if only some of the torrent\'s files are wanted." ] # [ doc = "[0...tr_info.totalSize]" ] pub sizeWhenDone : u64 , # [ doc = " Byte count of how much data is left to be downloaded until we\'ve got" ] # [ doc = "all the pieces that we want. [0...tr_info.sizeWhenDone]" ] pub leftUntilDone : u64 , # [ doc = " Byte count of all the piece data we want and don\'t have yet," ] # [ doc = "but that a connected peer does have. [0...leftUntilDone]" ] pub desiredAvailable : u64 , # [ doc = " Byte count of all the corrupt data you\'ve ever downloaded for" ] # [ doc = "this torrent. If you\'re on a poisoned torrent, this number can" ] # [ doc = "grow very large." ] pub corruptEver : u64 , # [ doc = " Byte count of all data you\'ve ever uploaded for this torrent." ] pub uploadedEver : u64 , # [ doc = " Byte count of all the non-corrupt data you\'ve ever downloaded" ] # [ doc = "for this torrent. If you deleted the files and downloaded a second" ] # [ doc = "time, this will be 2*totalSize.." ] pub downloadedEver : u64 , # [ doc = " Byte count of all the checksum-verified data we have for this torrent." ] pub haveValid : u64 , # [ doc = " Byte count of all the partial piece data we have for this torrent." ] # [ doc = "As pieces become complete, this value may decrease as portions of it" ] # [ doc = "are moved to `corrupt\' or `haveValid\'." ] pub haveUnchecked : u64 , # [ doc = " time when one or more of the torrent\'s trackers will" ] # [ doc = "allow you to manually ask for more peers," ] # [ doc = "or 0 if you can\'t" ] pub manualAnnounceTime : time_t , # [ doc = " TR_RATIO_INF, TR_RATIO_NA, or a regular ratio" ] pub ratio : f32 , # [ doc = " When the torrent was first added." ] pub addedDate : time_t , # [ doc = " When the torrent finished downloading." ] pub doneDate : time_t , # [ doc = " When the torrent was last started." ] pub startDate : time_t , # [ doc = " The last time we uploaded or downloaded piece data on this torrent." ] pub activityDate : time_t , # [ doc = " Number of seconds since the last activity (or since started)." ] # [ doc = "-1 if activity is not seeding or downloading." ] pub idleSecs : :: std :: os :: raw :: c_int , # [ doc = " Cumulative seconds the torrent\'s ever spent downloading" ] pub secondsDownloading : :: std :: os :: raw :: c_int , # [ doc = " Cumulative seconds the torrent\'s ever spent seeding" ] pub secondsSeeding : :: std :: os :: raw :: c_int , # [ doc = " A torrent is considered finished if it has met its seed ratio." ] # [ doc = "As a result, only paused torrents can be finished." ] pub finished : bool , # [ doc = " This torrent\'s queue position." ] # [ doc = "All torrents have a queue position, even if it\'s not queued." ] pub queuePosition : :: std :: os :: raw :: c_int , # [ doc = " True if the torrent is running, but has been idle for long enough" ] # [ doc = "to be considered stalled.  @see tr_sessionGetQueueStalledMinutes()" ] pub isStalled : bool , } extern "C" { # [ doc = " Return a pointer to an tr_stat structure with updated information" ] # [ doc = "on the torrent. This is typically called by the GUI clients every" ] # [ doc = "second or so to get a new snapshot of the torrent\'s status." ] pub fn tr_torrentStat ( torrent : * mut tr_torrent ) -> * const tr_stat ; } extern "C" { # [ doc = " Like tr_torrentStat(), but only recalculates the statistics if it\'s" ] # [ doc = "been longer than a second since they were last calculated. This can" ] # [ doc = "reduce the CPU load if you\'re calling tr_torrentStat() frequently." ] pub fn tr_torrentStatCached ( torrent : * mut tr_torrent ) -> * const tr_stat ; } extern "C" { # [ doc = " @deprecated" ] pub fn tr_torrentSetAddedDate ( torrent : * mut tr_torrent , addedDate : time_t ) ; } extern "C" { # [ doc = " @deprecated" ] pub fn tr_torrentSetActivityDate ( torrent : * mut tr_torrent , activityDate : time_t ) ; } extern "C" { # [ doc = " @deprecated" ] pub fn tr_torrentSetDoneDate ( torrent : * mut tr_torrent , doneDate : time_t ) ; } pub type __gwchar_t = :: std :: os :: raw :: c_int ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct imaxdiv_t { pub quot : :: std :: os :: raw :: c_long , pub rem : :: std :: os :: raw :: c_long , } extern "C" { pub fn imaxabs ( __n : intmax_t ) -> intmax_t ; } extern "C" { pub fn imaxdiv ( __numer : intmax_t , __denom : intmax_t ) -> imaxdiv_t ; } extern "C" { pub fn strtoimax ( __nptr : * const :: std :: os :: raw :: c_char , __endptr : * mut * mut :: std :: os :: raw :: c_char , __base : :: std :: os :: raw :: c_int ) -> intmax_t ; } extern "C" { pub fn strtoumax ( __nptr : * const :: std :: os :: raw :: c_char , __endptr : * mut * mut :: std :: os :: raw :: c_char , __base : :: std :: os :: raw :: c_int ) -> uintmax_t ; } extern "C" { pub fn wcstoimax ( __nptr : * const __gwchar_t , __endptr : * mut * mut __gwchar_t , __base : :: std :: os :: raw :: c_int ) -> intmax_t ; } extern "C" { pub fn wcstoumax ( __nptr : * const __gwchar_t , __endptr : * mut * mut __gwchar_t , __base : :: std :: os :: raw :: c_int ) -> uintmax_t ; } pub type tr_quark = usize ; pub const TR_KEY_NONE : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_NONE ; pub const TR_KEY_activeTorrentCount : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_activeTorrentCount ; pub const TR_KEY_activity_date : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_activity_date ; pub const TR_KEY_activityDate : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_activityDate ; pub const TR_KEY_added : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_added ; pub const TR_KEY_added_date : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_added_date ; pub const TR_KEY_added_f : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_added_f ; pub const TR_KEY_added6 : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_added6 ; pub const TR_KEY_added6_f : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_added6_f ; pub const TR_KEY_addedDate : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_addedDate ; pub const TR_KEY_address : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_address ; pub const TR_KEY_alt_speed_down : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_alt_speed_down ; pub const TR_KEY_alt_speed_enabled : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_alt_speed_enabled ; pub const TR_KEY_alt_speed_time_begin : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_alt_speed_time_begin ; pub const TR_KEY_alt_speed_time_day : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_alt_speed_time_day ; pub const TR_KEY_alt_speed_time_enabled : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_alt_speed_time_enabled ; pub const TR_KEY_alt_speed_time_end : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_alt_speed_time_end ; pub const TR_KEY_alt_speed_up : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_alt_speed_up ; pub const TR_KEY_announce : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_announce ; pub const TR_KEY_announce_list : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_announce_list ; pub const TR_KEY_announceState : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_announceState ; pub const TR_KEY_arguments : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_arguments ; pub const TR_KEY_bandwidth_priority : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_bandwidth_priority ; pub const TR_KEY_bandwidthPriority : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_bandwidthPriority ; pub const TR_KEY_bind_address_ipv4 : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_bind_address_ipv4 ; pub const TR_KEY_bind_address_ipv6 : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_bind_address_ipv6 ; pub const TR_KEY_bitfield : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_bitfield ; pub const TR_KEY_blocklist_date : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_blocklist_date ; pub const TR_KEY_blocklist_enabled : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_blocklist_enabled ; pub const TR_KEY_blocklist_size : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_blocklist_size ; pub const TR_KEY_blocklist_updates_enabled : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_blocklist_updates_enabled ; pub const TR_KEY_blocklist_url : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_blocklist_url ; pub const TR_KEY_blocks : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_blocks ; pub const TR_KEY_bytesCompleted : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_bytesCompleted ; pub const TR_KEY_cache_size_mb : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_cache_size_mb ; pub const TR_KEY_clientIsChoked : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_clientIsChoked ; pub const TR_KEY_clientIsInterested : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_clientIsInterested ; pub const TR_KEY_clientName : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_clientName ; pub const TR_KEY_comment : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_comment ; pub const TR_KEY_comment_utf_8 : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_comment_utf_8 ; pub const TR_KEY_compact_view : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_compact_view ; pub const TR_KEY_complete : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_complete ; pub const TR_KEY_config_dir : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_config_dir ; pub const TR_KEY_cookies : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_cookies ; pub const TR_KEY_corrupt : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_corrupt ; pub const TR_KEY_corruptEver : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_corruptEver ; pub const TR_KEY_created_by : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_created_by ; pub const TR_KEY_created_by_utf_8 : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_created_by_utf_8 ; pub const TR_KEY_creation_date : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_creation_date ; pub const TR_KEY_creator : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_creator ; pub const TR_KEY_cumulative_stats : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_cumulative_stats ; pub const TR_KEY_current_stats : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_current_stats ; pub const TR_KEY_date : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_date ; pub const TR_KEY_dateCreated : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_dateCreated ; pub const TR_KEY_delete_local_data : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_delete_local_data ; pub const TR_KEY_desiredAvailable : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_desiredAvailable ; pub const TR_KEY_destination : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_destination ; pub const TR_KEY_dht_enabled : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_dht_enabled ; pub const TR_KEY_display_name : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_display_name ; pub const TR_KEY_dnd : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_dnd ; pub const TR_KEY_done_date : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_done_date ; pub const TR_KEY_doneDate : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_doneDate ; pub const TR_KEY_download_dir : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_download_dir ; pub const TR_KEY_download_dir_free_space : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_download_dir_free_space ; pub const TR_KEY_download_queue_enabled : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_download_queue_enabled ; pub const TR_KEY_download_queue_size : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_download_queue_size ; pub const TR_KEY_downloadCount : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_downloadCount ; pub const TR_KEY_downloadDir : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_downloadDir ; pub const TR_KEY_downloadLimit : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_downloadLimit ; pub const TR_KEY_downloadLimited : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_downloadLimited ; pub const TR_KEY_downloadSpeed : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_downloadSpeed ; pub const TR_KEY_downloaded : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_downloaded ; pub const TR_KEY_downloaded_bytes : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_downloaded_bytes ; pub const TR_KEY_downloadedBytes : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_downloadedBytes ; pub const TR_KEY_downloadedEver : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_downloadedEver ; pub const TR_KEY_downloaders : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_downloaders ; pub const TR_KEY_downloading_time_seconds : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_downloading_time_seconds ; pub const TR_KEY_dropped : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_dropped ; pub const TR_KEY_dropped6 : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_dropped6 ; pub const TR_KEY_e : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_e ; pub const TR_KEY_encoding : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_encoding ; pub const TR_KEY_encryption : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_encryption ; pub const TR_KEY_error : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_error ; pub const TR_KEY_errorString : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_errorString ; pub const TR_KEY_eta : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_eta ; pub const TR_KEY_etaIdle : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_etaIdle ; pub const TR_KEY_failure_reason : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_failure_reason ; pub const TR_KEY_fields : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_fields ; pub const TR_KEY_fileStats : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_fileStats ; pub const TR_KEY_filename : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_filename ; pub const TR_KEY_files : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_files ; pub const TR_KEY_files_added : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_files_added ; pub const TR_KEY_files_unwanted : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_files_unwanted ; pub const TR_KEY_files_wanted : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_files_wanted ; pub const TR_KEY_filesAdded : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_filesAdded ; pub const TR_KEY_filter_mode : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_filter_mode ; pub const TR_KEY_filter_text : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_filter_text ; pub const TR_KEY_filter_trackers : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_filter_trackers ; pub const TR_KEY_flagStr : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_flagStr ; pub const TR_KEY_flags : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_flags ; pub const TR_KEY_fromCache : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_fromCache ; pub const TR_KEY_fromDht : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_fromDht ; pub const TR_KEY_fromIncoming : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_fromIncoming ; pub const TR_KEY_fromLpd : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_fromLpd ; pub const TR_KEY_fromLtep : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_fromLtep ; pub const TR_KEY_fromPex : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_fromPex ; pub const TR_KEY_fromTracker : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_fromTracker ; pub const TR_KEY_hasAnnounced : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_hasAnnounced ; pub const TR_KEY_hasScraped : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_hasScraped ; pub const TR_KEY_hashString : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_hashString ; pub const TR_KEY_have : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_have ; pub const TR_KEY_haveUnchecked : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_haveUnchecked ; pub const TR_KEY_haveValid : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_haveValid ; pub const TR_KEY_honorsSessionLimits : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_honorsSessionLimits ; pub const TR_KEY_host : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_host ; pub const TR_KEY_id : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_id ; pub const TR_KEY_idle_limit : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_idle_limit ; pub const TR_KEY_idle_mode : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_idle_mode ; pub const TR_KEY_idle_seeding_limit : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_idle_seeding_limit ; pub const TR_KEY_idle_seeding_limit_enabled : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_idle_seeding_limit_enabled ; pub const TR_KEY_ids : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_ids ; pub const TR_KEY_incomplete : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_incomplete ; pub const TR_KEY_incomplete_dir : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_incomplete_dir ; pub const TR_KEY_incomplete_dir_enabled : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_incomplete_dir_enabled ; pub const TR_KEY_info : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_info ; pub const TR_KEY_info_hash : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_info_hash ; pub const TR_KEY_inhibit_desktop_hibernation : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_inhibit_desktop_hibernation ; pub const TR_KEY_interval : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_interval ; pub const TR_KEY_ip : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_ip ; pub const TR_KEY_ipv4 : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_ipv4 ; pub const TR_KEY_ipv6 : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_ipv6 ; pub const TR_KEY_isBackup : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_isBackup ; pub const TR_KEY_isDownloadingFrom : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_isDownloadingFrom ; pub const TR_KEY_isEncrypted : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_isEncrypted ; pub const TR_KEY_isFinished : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_isFinished ; pub const TR_KEY_isIncoming : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_isIncoming ; pub const TR_KEY_isPrivate : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_isPrivate ; pub const TR_KEY_isStalled : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_isStalled ; pub const TR_KEY_isUTP : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_isUTP ; pub const TR_KEY_isUploadingTo : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_isUploadingTo ; pub const TR_KEY_lastAnnouncePeerCount : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_lastAnnouncePeerCount ; pub const TR_KEY_lastAnnounceResult : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_lastAnnounceResult ; pub const TR_KEY_lastAnnounceStartTime : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_lastAnnounceStartTime ; pub const TR_KEY_lastAnnounceSucceeded : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_lastAnnounceSucceeded ; pub const TR_KEY_lastAnnounceTime : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_lastAnnounceTime ; pub const TR_KEY_lastAnnounceTimedOut : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_lastAnnounceTimedOut ; pub const TR_KEY_lastScrapeResult : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_lastScrapeResult ; pub const TR_KEY_lastScrapeStartTime : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_lastScrapeStartTime ; pub const TR_KEY_lastScrapeSucceeded : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_lastScrapeSucceeded ; pub const TR_KEY_lastScrapeTime : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_lastScrapeTime ; pub const TR_KEY_lastScrapeTimedOut : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_lastScrapeTimedOut ; pub const TR_KEY_leecherCount : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_leecherCount ; pub const TR_KEY_leftUntilDone : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_leftUntilDone ; pub const TR_KEY_length : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_length ; pub const TR_KEY_location : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_location ; pub const TR_KEY_lpd_enabled : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_lpd_enabled ; pub const TR_KEY_m : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_m ; pub const TR_KEY_magnet_info : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_magnet_info ; pub const TR_KEY_magnetLink : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_magnetLink ; pub const TR_KEY_main_window_height : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_main_window_height ; pub const TR_KEY_main_window_is_maximized : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_main_window_is_maximized ; pub const TR_KEY_main_window_layout_order : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_main_window_layout_order ; pub const TR_KEY_main_window_width : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_main_window_width ; pub const TR_KEY_main_window_x : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_main_window_x ; pub const TR_KEY_main_window_y : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_main_window_y ; pub const TR_KEY_manualAnnounceTime : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_manualAnnounceTime ; pub const TR_KEY_max_peers : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_max_peers ; pub const TR_KEY_maxConnectedPeers : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_maxConnectedPeers ; pub const TR_KEY_memory_bytes : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_memory_bytes ; pub const TR_KEY_memory_units : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_memory_units ; pub const TR_KEY_message_level : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_message_level ; pub const TR_KEY_metadataPercentComplete : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_metadataPercentComplete ; pub const TR_KEY_metadata_size : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_metadata_size ; pub const TR_KEY_metainfo : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_metainfo ; pub const TR_KEY_method : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_method ; pub const TR_KEY_min_interval : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_min_interval ; pub const TR_KEY_min_request_interval : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_min_request_interval ; pub const TR_KEY_move : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_move ; pub const TR_KEY_msg_type : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_msg_type ; pub const TR_KEY_mtimes : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_mtimes ; pub const TR_KEY_name : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_name ; pub const TR_KEY_name_utf_8 : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_name_utf_8 ; pub const TR_KEY_nextAnnounceTime : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_nextAnnounceTime ; pub const TR_KEY_nextScrapeTime : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_nextScrapeTime ; pub const TR_KEY_nodes : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_nodes ; pub const TR_KEY_nodes6 : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_nodes6 ; pub const TR_KEY_open_dialog_dir : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_open_dialog_dir ; pub const TR_KEY_p : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_p ; pub const TR_KEY_path : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_path ; pub const TR_KEY_path_utf_8 : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_path_utf_8 ; pub const TR_KEY_paused : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_paused ; pub const TR_KEY_pausedTorrentCount : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_pausedTorrentCount ; pub const TR_KEY_peer_congestion_algorithm : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_peer_congestion_algorithm ; pub const TR_KEY_peer_id_ttl_hours : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_peer_id_ttl_hours ; pub const TR_KEY_peer_limit : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_peer_limit ; pub const TR_KEY_peer_limit_global : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_peer_limit_global ; pub const TR_KEY_peer_limit_per_torrent : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_peer_limit_per_torrent ; pub const TR_KEY_peer_port : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_peer_port ; pub const TR_KEY_peer_port_random_high : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_peer_port_random_high ; pub const TR_KEY_peer_port_random_low : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_peer_port_random_low ; pub const TR_KEY_peer_port_random_on_start : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_peer_port_random_on_start ; pub const TR_KEY_peer_socket_tos : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_peer_socket_tos ; pub const TR_KEY_peerIsChoked : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_peerIsChoked ; pub const TR_KEY_peerIsInterested : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_peerIsInterested ; pub const TR_KEY_peers : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_peers ; pub const TR_KEY_peers2 : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_peers2 ; pub const TR_KEY_peers2_6 : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_peers2_6 ; pub const TR_KEY_peers6 : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_peers6 ; pub const TR_KEY_peersConnected : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_peersConnected ; pub const TR_KEY_peersFrom : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_peersFrom ; pub const TR_KEY_peersGettingFromUs : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_peersGettingFromUs ; pub const TR_KEY_peersSendingToUs : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_peersSendingToUs ; pub const TR_KEY_percentDone : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_percentDone ; pub const TR_KEY_pex_enabled : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_pex_enabled ; pub const TR_KEY_piece : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_piece ; pub const TR_KEY_piece_length : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_piece_length ; pub const TR_KEY_pieceCount : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_pieceCount ; pub const TR_KEY_pieceSize : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_pieceSize ; pub const TR_KEY_pieces : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_pieces ; pub const TR_KEY_play_download_complete_sound : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_play_download_complete_sound ; pub const TR_KEY_port : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_port ; pub const TR_KEY_port_forwarding_enabled : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_port_forwarding_enabled ; pub const TR_KEY_port_is_open : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_port_is_open ; pub const TR_KEY_preallocation : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_preallocation ; pub const TR_KEY_prefetch_enabled : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_prefetch_enabled ; pub const TR_KEY_priorities : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_priorities ; pub const TR_KEY_priority : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_priority ; pub const TR_KEY_priority_high : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_priority_high ; pub const TR_KEY_priority_low : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_priority_low ; pub const TR_KEY_priority_normal : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_priority_normal ; pub const TR_KEY_private : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_private ; pub const TR_KEY_progress : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_progress ; pub const TR_KEY_prompt_before_exit : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_prompt_before_exit ; pub const TR_KEY_queue_move_bottom : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_queue_move_bottom ; pub const TR_KEY_queue_move_down : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_queue_move_down ; pub const TR_KEY_queue_move_top : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_queue_move_top ; pub const TR_KEY_queue_move_up : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_queue_move_up ; pub const TR_KEY_queue_stalled_enabled : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_queue_stalled_enabled ; pub const TR_KEY_queue_stalled_minutes : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_queue_stalled_minutes ; pub const TR_KEY_queuePosition : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_queuePosition ; pub const TR_KEY_rateDownload : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_rateDownload ; pub const TR_KEY_rateToClient : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_rateToClient ; pub const TR_KEY_rateToPeer : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_rateToPeer ; pub const TR_KEY_rateUpload : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_rateUpload ; pub const TR_KEY_ratio_limit : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_ratio_limit ; pub const TR_KEY_ratio_limit_enabled : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_ratio_limit_enabled ; pub const TR_KEY_ratio_mode : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_ratio_mode ; pub const TR_KEY_recent_download_dir_1 : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_recent_download_dir_1 ; pub const TR_KEY_recent_download_dir_2 : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_recent_download_dir_2 ; pub const TR_KEY_recent_download_dir_3 : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_recent_download_dir_3 ; pub const TR_KEY_recent_download_dir_4 : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_recent_download_dir_4 ; pub const TR_KEY_recheckProgress : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_recheckProgress ; pub const TR_KEY_remote_session_enabled : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_remote_session_enabled ; pub const TR_KEY_remote_session_host : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_remote_session_host ; pub const TR_KEY_remote_session_password : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_remote_session_password ; pub const TR_KEY_remote_session_port : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_remote_session_port ; pub const TR_KEY_remote_session_requres_authentication : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_remote_session_requres_authentication ; pub const TR_KEY_remote_session_username : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_remote_session_username ; pub const TR_KEY_removed : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_removed ; pub const TR_KEY_rename_partial_files : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_rename_partial_files ; pub const TR_KEY_reqq : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_reqq ; pub const TR_KEY_result : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_result ; pub const TR_KEY_rpc_authentication_required : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_rpc_authentication_required ; pub const TR_KEY_rpc_bind_address : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_rpc_bind_address ; pub const TR_KEY_rpc_enabled : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_rpc_enabled ; pub const TR_KEY_rpc_host_whitelist : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_rpc_host_whitelist ; pub const TR_KEY_rpc_host_whitelist_enabled : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_rpc_host_whitelist_enabled ; pub const TR_KEY_rpc_password : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_rpc_password ; pub const TR_KEY_rpc_port : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_rpc_port ; pub const TR_KEY_rpc_url : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_rpc_url ; pub const TR_KEY_rpc_username : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_rpc_username ; pub const TR_KEY_rpc_version : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_rpc_version ; pub const TR_KEY_rpc_version_minimum : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_rpc_version_minimum ; pub const TR_KEY_rpc_whitelist : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_rpc_whitelist ; pub const TR_KEY_rpc_whitelist_enabled : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_rpc_whitelist_enabled ; pub const TR_KEY_scrape : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_scrape ; pub const TR_KEY_scrape_paused_torrents_enabled : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_scrape_paused_torrents_enabled ; pub const TR_KEY_scrapeState : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_scrapeState ; pub const TR_KEY_script_torrent_done_enabled : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_script_torrent_done_enabled ; pub const TR_KEY_script_torrent_done_filename : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_script_torrent_done_filename ; pub const TR_KEY_seconds_active : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_seconds_active ; pub const TR_KEY_secondsActive : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_secondsActive ; pub const TR_KEY_secondsDownloading : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_secondsDownloading ; pub const TR_KEY_secondsSeeding : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_secondsSeeding ; pub const TR_KEY_seed_queue_enabled : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_seed_queue_enabled ; pub const TR_KEY_seed_queue_size : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_seed_queue_size ; pub const TR_KEY_seedIdleLimit : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_seedIdleLimit ; pub const TR_KEY_seedIdleMode : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_seedIdleMode ; pub const TR_KEY_seedRatioLimit : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_seedRatioLimit ; pub const TR_KEY_seedRatioLimited : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_seedRatioLimited ; pub const TR_KEY_seedRatioMode : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_seedRatioMode ; pub const TR_KEY_seederCount : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_seederCount ; pub const TR_KEY_seeding_time_seconds : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_seeding_time_seconds ; pub const TR_KEY_session_count : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_session_count ; pub const TR_KEY_session_id : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_session_id ; pub const TR_KEY_sessionCount : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_sessionCount ; pub const TR_KEY_show_backup_trackers : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_show_backup_trackers ; pub const TR_KEY_show_extra_peer_details : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_show_extra_peer_details ; pub const TR_KEY_show_filterbar : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_show_filterbar ; pub const TR_KEY_show_notification_area_icon : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_show_notification_area_icon ; pub const TR_KEY_show_options_window : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_show_options_window ; pub const TR_KEY_show_statusbar : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_show_statusbar ; pub const TR_KEY_show_toolbar : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_show_toolbar ; pub const TR_KEY_show_tracker_scrapes : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_show_tracker_scrapes ; pub const TR_KEY_size_bytes : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_size_bytes ; pub const TR_KEY_size_units : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_size_units ; pub const TR_KEY_sizeWhenDone : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_sizeWhenDone ; pub const TR_KEY_sort_mode : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_sort_mode ; pub const TR_KEY_sort_reversed : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_sort_reversed ; pub const TR_KEY_speed : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_speed ; pub const TR_KEY_speed_Bps : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_speed_Bps ; pub const TR_KEY_speed_bytes : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_speed_bytes ; pub const TR_KEY_speed_limit_down : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_speed_limit_down ; pub const TR_KEY_speed_limit_down_enabled : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_speed_limit_down_enabled ; pub const TR_KEY_speed_limit_up : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_speed_limit_up ; pub const TR_KEY_speed_limit_up_enabled : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_speed_limit_up_enabled ; pub const TR_KEY_speed_units : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_speed_units ; pub const TR_KEY_start_added_torrents : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_start_added_torrents ; pub const TR_KEY_start_minimized : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_start_minimized ; pub const TR_KEY_startDate : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_startDate ; pub const TR_KEY_status : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_status ; pub const TR_KEY_statusbar_stats : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_statusbar_stats ; pub const TR_KEY_tag : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_tag ; pub const TR_KEY_tier : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_tier ; pub const TR_KEY_time_checked : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_time_checked ; pub const TR_KEY_torrent_added : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_torrent_added ; pub const TR_KEY_torrent_added_notification_command : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_torrent_added_notification_command ; pub const TR_KEY_torrent_added_notification_enabled : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_torrent_added_notification_enabled ; pub const TR_KEY_torrent_complete_notification_command : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_torrent_complete_notification_command ; pub const TR_KEY_torrent_complete_notification_enabled : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_torrent_complete_notification_enabled ; pub const TR_KEY_torrent_complete_sound_command : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_torrent_complete_sound_command ; pub const TR_KEY_torrent_complete_sound_enabled : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_torrent_complete_sound_enabled ; pub const TR_KEY_torrent_duplicate : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_torrent_duplicate ; pub const TR_KEY_torrent_get : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_torrent_get ; pub const TR_KEY_torrent_set : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_torrent_set ; pub const TR_KEY_torrent_set_location : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_torrent_set_location ; pub const TR_KEY_torrentCount : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_torrentCount ; pub const TR_KEY_torrentFile : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_torrentFile ; pub const TR_KEY_torrents : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_torrents ; pub const TR_KEY_totalSize : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_totalSize ; pub const TR_KEY_total_size : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_total_size ; pub const TR_KEY_tracker_id : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_tracker_id ; pub const TR_KEY_trackerAdd : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_trackerAdd ; pub const TR_KEY_trackerRemove : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_trackerRemove ; pub const TR_KEY_trackerReplace : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_trackerReplace ; pub const TR_KEY_trackerStats : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_trackerStats ; pub const TR_KEY_trackers : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_trackers ; pub const TR_KEY_trash_can_enabled : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_trash_can_enabled ; pub const TR_KEY_trash_original_torrent_files : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_trash_original_torrent_files ; pub const TR_KEY_umask : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_umask ; pub const TR_KEY_units : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_units ; pub const TR_KEY_upload_slots_per_torrent : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_upload_slots_per_torrent ; pub const TR_KEY_uploadLimit : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_uploadLimit ; pub const TR_KEY_uploadLimited : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_uploadLimited ; pub const TR_KEY_uploadRatio : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_uploadRatio ; pub const TR_KEY_uploadSpeed : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_uploadSpeed ; pub const TR_KEY_upload_only : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_upload_only ; pub const TR_KEY_uploaded : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_uploaded ; pub const TR_KEY_uploaded_bytes : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_uploaded_bytes ; pub const TR_KEY_uploadedBytes : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_uploadedBytes ; pub const TR_KEY_uploadedEver : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_uploadedEver ; pub const TR_KEY_url_list : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_url_list ; pub const TR_KEY_use_global_speed_limit : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_use_global_speed_limit ; pub const TR_KEY_use_speed_limit : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_use_speed_limit ; pub const TR_KEY_user_has_given_informed_consent : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_user_has_given_informed_consent ; pub const TR_KEY_ut_comment : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_ut_comment ; pub const TR_KEY_ut_holepunch : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_ut_holepunch ; pub const TR_KEY_ut_metadata : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_ut_metadata ; pub const TR_KEY_ut_pex : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_ut_pex ; pub const TR_KEY_ut_recommend : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_ut_recommend ; pub const TR_KEY_utp_enabled : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_utp_enabled ; pub const TR_KEY_v : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_v ; pub const TR_KEY_version : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_version ; pub const TR_KEY_wanted : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_wanted ; pub const TR_KEY_warning_message : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_warning_message ; pub const TR_KEY_watch_dir : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_watch_dir ; pub const TR_KEY_watch_dir_enabled : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_watch_dir_enabled ; pub const TR_KEY_webseeds : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_webseeds ; pub const TR_KEY_webseedsSendingToUs : _bindgen_ty_4 = _bindgen_ty_4 :: TR_KEY_webseedsSendingToUs ; pub const TR_N_KEYS : _bindgen_ty_4 = _bindgen_ty_4 :: TR_N_KEYS ; # [ repr ( u32 ) ] # [ derive ( Debug , Copy , Clone , PartialEq , Eq , Hash ) ] pub enum _bindgen_ty_4 { TR_KEY_NONE = 0 , TR_KEY_activeTorrentCount = 1 , TR_KEY_activity_date = 2 , TR_KEY_activityDate = 3 , TR_KEY_added = 4 , TR_KEY_added_date = 5 , TR_KEY_added_f = 6 , TR_KEY_added6 = 7 , TR_KEY_added6_f = 8 , TR_KEY_addedDate = 9 , TR_KEY_address = 10 , TR_KEY_alt_speed_down = 11 , TR_KEY_alt_speed_enabled = 12 , TR_KEY_alt_speed_time_begin = 13 , TR_KEY_alt_speed_time_day = 14 , TR_KEY_alt_speed_time_enabled = 15 , TR_KEY_alt_speed_time_end = 16 , TR_KEY_alt_speed_up = 17 , TR_KEY_announce = 18 , TR_KEY_announce_list = 19 , TR_KEY_announceState = 20 , TR_KEY_arguments = 21 , TR_KEY_bandwidth_priority = 22 , TR_KEY_bandwidthPriority = 23 , TR_KEY_bind_address_ipv4 = 24 , TR_KEY_bind_address_ipv6 = 25 , TR_KEY_bitfield = 26 , TR_KEY_blocklist_date = 27 , TR_KEY_blocklist_enabled = 28 , TR_KEY_blocklist_size = 29 , TR_KEY_blocklist_updates_enabled = 30 , TR_KEY_blocklist_url = 31 , TR_KEY_blocks = 32 , TR_KEY_bytesCompleted = 33 , TR_KEY_cache_size_mb = 34 , TR_KEY_clientIsChoked = 35 , TR_KEY_clientIsInterested = 36 , TR_KEY_clientName = 37 , TR_KEY_comment = 38 , TR_KEY_comment_utf_8 = 39 , TR_KEY_compact_view = 40 , TR_KEY_complete = 41 , TR_KEY_config_dir = 42 , TR_KEY_cookies = 43 , TR_KEY_corrupt = 44 , TR_KEY_corruptEver = 45 , TR_KEY_created_by = 46 , TR_KEY_created_by_utf_8 = 47 , TR_KEY_creation_date = 48 , TR_KEY_creator = 49 , TR_KEY_cumulative_stats = 50 , TR_KEY_current_stats = 51 , TR_KEY_date = 52 , TR_KEY_dateCreated = 53 , TR_KEY_delete_local_data = 54 , TR_KEY_desiredAvailable = 55 , TR_KEY_destination = 56 , TR_KEY_dht_enabled = 57 , TR_KEY_display_name = 58 , TR_KEY_dnd = 59 , TR_KEY_done_date = 60 , TR_KEY_doneDate = 61 , TR_KEY_download_dir = 62 , TR_KEY_download_dir_free_space = 63 , TR_KEY_download_queue_enabled = 64 , TR_KEY_download_queue_size = 65 , TR_KEY_downloadCount = 66 , TR_KEY_downloadDir = 67 , TR_KEY_downloadLimit = 68 , TR_KEY_downloadLimited = 69 , TR_KEY_downloadSpeed = 70 , TR_KEY_downloaded = 71 , TR_KEY_downloaded_bytes = 72 , TR_KEY_downloadedBytes = 73 , TR_KEY_downloadedEver = 74 , TR_KEY_downloaders = 75 , TR_KEY_downloading_time_seconds = 76 , TR_KEY_dropped = 77 , TR_KEY_dropped6 = 78 , TR_KEY_e = 79 , TR_KEY_encoding = 80 , TR_KEY_encryption = 81 , TR_KEY_error = 82 , TR_KEY_errorString = 83 , TR_KEY_eta = 84 , TR_KEY_etaIdle = 85 , TR_KEY_failure_reason = 86 , TR_KEY_fields = 87 , TR_KEY_fileStats = 88 , TR_KEY_filename = 89 , TR_KEY_files = 90 , TR_KEY_files_added = 91 , TR_KEY_files_unwanted = 92 , TR_KEY_files_wanted = 93 , TR_KEY_filesAdded = 94 , TR_KEY_filter_mode = 95 , TR_KEY_filter_text = 96 , TR_KEY_filter_trackers = 97 , TR_KEY_flagStr = 98 , TR_KEY_flags = 99 , TR_KEY_fromCache = 100 , TR_KEY_fromDht = 101 , TR_KEY_fromIncoming = 102 , TR_KEY_fromLpd = 103 , TR_KEY_fromLtep = 104 , TR_KEY_fromPex = 105 , TR_KEY_fromTracker = 106 , TR_KEY_hasAnnounced = 107 , TR_KEY_hasScraped = 108 , TR_KEY_hashString = 109 , TR_KEY_have = 110 , TR_KEY_haveUnchecked = 111 , TR_KEY_haveValid = 112 , TR_KEY_honorsSessionLimits = 113 , TR_KEY_host = 114 , TR_KEY_id = 115 , TR_KEY_idle_limit = 116 , TR_KEY_idle_mode = 117 , TR_KEY_idle_seeding_limit = 118 , TR_KEY_idle_seeding_limit_enabled = 119 , TR_KEY_ids = 120 , TR_KEY_incomplete = 121 , TR_KEY_incomplete_dir = 122 , TR_KEY_incomplete_dir_enabled = 123 , TR_KEY_info = 124 , TR_KEY_info_hash = 125 , TR_KEY_inhibit_desktop_hibernation = 126 , TR_KEY_interval = 127 , TR_KEY_ip = 128 , TR_KEY_ipv4 = 129 , TR_KEY_ipv6 = 130 , TR_KEY_isBackup = 131 , TR_KEY_isDownloadingFrom = 132 , TR_KEY_isEncrypted = 133 , TR_KEY_isFinished = 134 , TR_KEY_isIncoming = 135 , TR_KEY_isPrivate = 136 , TR_KEY_isStalled = 137 , TR_KEY_isUTP = 138 , TR_KEY_isUploadingTo = 139 , TR_KEY_lastAnnouncePeerCount = 140 , TR_KEY_lastAnnounceResult = 141 , TR_KEY_lastAnnounceStartTime = 142 , TR_KEY_lastAnnounceSucceeded = 143 , TR_KEY_lastAnnounceTime = 144 , TR_KEY_lastAnnounceTimedOut = 145 , TR_KEY_lastScrapeResult = 146 , TR_KEY_lastScrapeStartTime = 147 , TR_KEY_lastScrapeSucceeded = 148 , TR_KEY_lastScrapeTime = 149 , TR_KEY_lastScrapeTimedOut = 150 , TR_KEY_leecherCount = 151 , TR_KEY_leftUntilDone = 152 , TR_KEY_length = 153 , TR_KEY_location = 154 , TR_KEY_lpd_enabled = 155 , TR_KEY_m = 156 , TR_KEY_magnet_info = 157 , TR_KEY_magnetLink = 158 , TR_KEY_main_window_height = 159 , TR_KEY_main_window_is_maximized = 160 , TR_KEY_main_window_layout_order = 161 , TR_KEY_main_window_width = 162 , TR_KEY_main_window_x = 163 , TR_KEY_main_window_y = 164 , TR_KEY_manualAnnounceTime = 165 , TR_KEY_max_peers = 166 , TR_KEY_maxConnectedPeers = 167 , TR_KEY_memory_bytes = 168 , TR_KEY_memory_units = 169 , TR_KEY_message_level = 170 , TR_KEY_metadataPercentComplete = 171 , TR_KEY_metadata_size = 172 , TR_KEY_metainfo = 173 , TR_KEY_method = 174 , TR_KEY_min_interval = 175 , TR_KEY_min_request_interval = 176 , TR_KEY_move = 177 , TR_KEY_msg_type = 178 , TR_KEY_mtimes = 179 , TR_KEY_name = 180 , TR_KEY_name_utf_8 = 181 , TR_KEY_nextAnnounceTime = 182 , TR_KEY_nextScrapeTime = 183 , TR_KEY_nodes = 184 , TR_KEY_nodes6 = 185 , TR_KEY_open_dialog_dir = 186 , TR_KEY_p = 187 , TR_KEY_path = 188 , TR_KEY_path_utf_8 = 189 , TR_KEY_paused = 190 , TR_KEY_pausedTorrentCount = 191 , TR_KEY_peer_congestion_algorithm = 192 , TR_KEY_peer_id_ttl_hours = 193 , TR_KEY_peer_limit = 194 , TR_KEY_peer_limit_global = 195 , TR_KEY_peer_limit_per_torrent = 196 , TR_KEY_peer_port = 197 , TR_KEY_peer_port_random_high = 198 , TR_KEY_peer_port_random_low = 199 , TR_KEY_peer_port_random_on_start = 200 , TR_KEY_peer_socket_tos = 201 , TR_KEY_peerIsChoked = 202 , TR_KEY_peerIsInterested = 203 , TR_KEY_peers = 204 , TR_KEY_peers2 = 205 , TR_KEY_peers2_6 = 206 , TR_KEY_peers6 = 207 , TR_KEY_peersConnected = 208 , TR_KEY_peersFrom = 209 , TR_KEY_peersGettingFromUs = 210 , TR_KEY_peersSendingToUs = 211 , TR_KEY_percentDone = 212 , TR_KEY_pex_enabled = 213 , TR_KEY_piece = 214 , TR_KEY_piece_length = 215 , TR_KEY_pieceCount = 216 , TR_KEY_pieceSize = 217 , TR_KEY_pieces = 218 , TR_KEY_play_download_complete_sound = 219 , TR_KEY_port = 220 , TR_KEY_port_forwarding_enabled = 221 , TR_KEY_port_is_open = 222 , TR_KEY_preallocation = 223 , TR_KEY_prefetch_enabled = 224 , TR_KEY_priorities = 225 , TR_KEY_priority = 226 , TR_KEY_priority_high = 227 , TR_KEY_priority_low = 228 , TR_KEY_priority_normal = 229 , TR_KEY_private = 230 , TR_KEY_progress = 231 , TR_KEY_prompt_before_exit = 232 , TR_KEY_queue_move_bottom = 233 , TR_KEY_queue_move_down = 234 , TR_KEY_queue_move_top = 235 , TR_KEY_queue_move_up = 236 , TR_KEY_queue_stalled_enabled = 237 , TR_KEY_queue_stalled_minutes = 238 , TR_KEY_queuePosition = 239 , TR_KEY_rateDownload = 240 , TR_KEY_rateToClient = 241 , TR_KEY_rateToPeer = 242 , TR_KEY_rateUpload = 243 , TR_KEY_ratio_limit = 244 , TR_KEY_ratio_limit_enabled = 245 , TR_KEY_ratio_mode = 246 , TR_KEY_recent_download_dir_1 = 247 , TR_KEY_recent_download_dir_2 = 248 , TR_KEY_recent_download_dir_3 = 249 , TR_KEY_recent_download_dir_4 = 250 , TR_KEY_recheckProgress = 251 , TR_KEY_remote_session_enabled = 252 , TR_KEY_remote_session_host = 253 , TR_KEY_remote_session_password = 254 , TR_KEY_remote_session_port = 255 , TR_KEY_remote_session_requres_authentication = 256 , TR_KEY_remote_session_username = 257 , TR_KEY_removed = 258 , TR_KEY_rename_partial_files = 259 , TR_KEY_reqq = 260 , TR_KEY_result = 261 , TR_KEY_rpc_authentication_required = 262 , TR_KEY_rpc_bind_address = 263 , TR_KEY_rpc_enabled = 264 , TR_KEY_rpc_host_whitelist = 265 , TR_KEY_rpc_host_whitelist_enabled = 266 , TR_KEY_rpc_password = 267 , TR_KEY_rpc_port = 268 , TR_KEY_rpc_url = 269 , TR_KEY_rpc_username = 270 , TR_KEY_rpc_version = 271 , TR_KEY_rpc_version_minimum = 272 , TR_KEY_rpc_whitelist = 273 , TR_KEY_rpc_whitelist_enabled = 274 , TR_KEY_scrape = 275 , TR_KEY_scrape_paused_torrents_enabled = 276 , TR_KEY_scrapeState = 277 , TR_KEY_script_torrent_done_enabled = 278 , TR_KEY_script_torrent_done_filename = 279 , TR_KEY_seconds_active = 280 , TR_KEY_secondsActive = 281 , TR_KEY_secondsDownloading = 282 , TR_KEY_secondsSeeding = 283 , TR_KEY_seed_queue_enabled = 284 , TR_KEY_seed_queue_size = 285 , TR_KEY_seedIdleLimit = 286 , TR_KEY_seedIdleMode = 287 , TR_KEY_seedRatioLimit = 288 , TR_KEY_seedRatioLimited = 289 , TR_KEY_seedRatioMode = 290 , TR_KEY_seederCount = 291 , TR_KEY_seeding_time_seconds = 292 , TR_KEY_session_count = 293 , TR_KEY_session_id = 294 , TR_KEY_sessionCount = 295 , TR_KEY_show_backup_trackers = 296 , TR_KEY_show_extra_peer_details = 297 , TR_KEY_show_filterbar = 298 , TR_KEY_show_notification_area_icon = 299 , TR_KEY_show_options_window = 300 , TR_KEY_show_statusbar = 301 , TR_KEY_show_toolbar = 302 , TR_KEY_show_tracker_scrapes = 303 , TR_KEY_size_bytes = 304 , TR_KEY_size_units = 305 , TR_KEY_sizeWhenDone = 306 , TR_KEY_sort_mode = 307 , TR_KEY_sort_reversed = 308 , TR_KEY_speed = 309 , TR_KEY_speed_Bps = 310 , TR_KEY_speed_bytes = 311 , TR_KEY_speed_limit_down = 312 , TR_KEY_speed_limit_down_enabled = 313 , TR_KEY_speed_limit_up = 314 , TR_KEY_speed_limit_up_enabled = 315 , TR_KEY_speed_units = 316 , TR_KEY_start_added_torrents = 317 , TR_KEY_start_minimized = 318 , TR_KEY_startDate = 319 , TR_KEY_status = 320 , TR_KEY_statusbar_stats = 321 , TR_KEY_tag = 322 , TR_KEY_tier = 323 , TR_KEY_time_checked = 324 , TR_KEY_torrent_added = 325 , TR_KEY_torrent_added_notification_command = 326 , TR_KEY_torrent_added_notification_enabled = 327 , TR_KEY_torrent_complete_notification_command = 328 , TR_KEY_torrent_complete_notification_enabled = 329 , TR_KEY_torrent_complete_sound_command = 330 , TR_KEY_torrent_complete_sound_enabled = 331 , TR_KEY_torrent_duplicate = 332 , TR_KEY_torrent_get = 333 , TR_KEY_torrent_set = 334 , TR_KEY_torrent_set_location = 335 , TR_KEY_torrentCount = 336 , TR_KEY_torrentFile = 337 , TR_KEY_torrents = 338 , TR_KEY_totalSize = 339 , TR_KEY_total_size = 340 , TR_KEY_tracker_id = 341 , TR_KEY_trackerAdd = 342 , TR_KEY_trackerRemove = 343 , TR_KEY_trackerReplace = 344 , TR_KEY_trackerStats = 345 , TR_KEY_trackers = 346 , TR_KEY_trash_can_enabled = 347 , TR_KEY_trash_original_torrent_files = 348 , TR_KEY_umask = 349 , TR_KEY_units = 350 , TR_KEY_upload_slots_per_torrent = 351 , TR_KEY_uploadLimit = 352 , TR_KEY_uploadLimited = 353 , TR_KEY_uploadRatio = 354 , TR_KEY_uploadSpeed = 355 , TR_KEY_upload_only = 356 , TR_KEY_uploaded = 357 , TR_KEY_uploaded_bytes = 358 , TR_KEY_uploadedBytes = 359 , TR_KEY_uploadedEver = 360 , TR_KEY_url_list = 361 , TR_KEY_use_global_speed_limit = 362 , TR_KEY_use_speed_limit = 363 , TR_KEY_user_has_given_informed_consent = 364 , TR_KEY_ut_comment = 365 , TR_KEY_ut_holepunch = 366 , TR_KEY_ut_metadata = 367 , TR_KEY_ut_pex = 368 , TR_KEY_ut_recommend = 369 , TR_KEY_utp_enabled = 370 , TR_KEY_v = 371 , TR_KEY_version = 372 , TR_KEY_wanted = 373 , TR_KEY_warning_message = 374 , TR_KEY_watch_dir = 375 , TR_KEY_watch_dir_enabled = 376 , TR_KEY_webseeds = 377 , TR_KEY_webseedsSendingToUs = 378 , TR_N_KEYS = 379 , } extern "C" { # [ doc = " Find the quark that matches the specified string" ] # [ doc = "" ] # [ doc = " @return true if the specified string exists as a quark" ] pub fn tr_quark_lookup ( str : * const :: std :: os :: raw :: c_void , len : usize , setme : * mut tr_quark ) -> bool ; } extern "C" { # [ doc = " Get the string that corresponds to the specified quark" ] pub fn tr_quark_get_string ( quark : tr_quark , len : * mut usize ) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [ doc = " Create a new quark for the specified string. If a quark already" ] # [ doc = " exists for that string, it is returned so that no duplicates are" ] # [ doc = " created." ] pub fn tr_quark_new ( str : * const :: std :: os :: raw :: c_void , len : usize ) -> tr_quark ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct evbuffer { _unused : [ u8 ; 0 ] , } # [ repr ( u32 ) ] # [ doc = " @addtogroup tr_variant Variant" ] # [ doc = "" ] # [ doc = " An object that acts like a union for" ] # [ doc = " integers, strings, lists, dictionaries, booleans, and floating-point numbers." ] # [ doc = " The structure is named tr_variant due to the historical reason that it was" ] # [ doc = " originally tightly coupled with bencoded data. It currently supports" ] # [ doc = " being parsed from, and serialized to, both bencoded notation and json notation." ] # [ doc = "" ] # [ doc = " @{" ] # [ derive ( Debug , Copy , Clone , PartialEq , Eq , Hash ) ] pub enum tr_string_type { TR_STRING_TYPE_QUARK = 0 , TR_STRING_TYPE_HEAP = 1 , TR_STRING_TYPE_BUF = 2 , } # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub struct tr_variant_string { pub type_ : tr_string_type , pub quark : tr_quark , pub len : usize , pub str : tr_variant_string__bindgen_ty_1 , } # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub union tr_variant_string__bindgen_ty_1 { pub buf : [ :: std :: os :: raw :: c_char ; 16usize ] , pub str : * const :: std :: os :: raw :: c_char , _bindgen_union_align : [ u64 ; 2usize ] , } pub const TR_VARIANT_TYPE_INT : _bindgen_ty_5 = _bindgen_ty_5 :: TR_VARIANT_TYPE_INT ; pub const TR_VARIANT_TYPE_STR : _bindgen_ty_5 = _bindgen_ty_5 :: TR_VARIANT_TYPE_STR ; pub const TR_VARIANT_TYPE_LIST : _bindgen_ty_5 = _bindgen_ty_5 :: TR_VARIANT_TYPE_LIST ; pub const TR_VARIANT_TYPE_DICT : _bindgen_ty_5 = _bindgen_ty_5 :: TR_VARIANT_TYPE_DICT ; pub const TR_VARIANT_TYPE_BOOL : _bindgen_ty_5 = _bindgen_ty_5 :: TR_VARIANT_TYPE_BOOL ; pub const TR_VARIANT_TYPE_REAL : _bindgen_ty_5 = _bindgen_ty_5 :: TR_VARIANT_TYPE_REAL ; # [ repr ( u32 ) ] # [ derive ( Debug , Copy , Clone , PartialEq , Eq , Hash ) ] pub enum _bindgen_ty_5 { TR_VARIANT_TYPE_INT = 1 , TR_VARIANT_TYPE_STR = 2 , TR_VARIANT_TYPE_LIST = 4 , TR_VARIANT_TYPE_DICT = 8 , TR_VARIANT_TYPE_BOOL = 16 , TR_VARIANT_TYPE_REAL = 32 , } # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub struct tr_variant { pub type_ : :: std :: os :: raw :: c_char , pub key : tr_quark , pub val : tr_variant__bindgen_ty_1 , } # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub union tr_variant__bindgen_ty_1 { pub b : bool , pub d : f64 , pub i : i64 , pub s : tr_variant_string , pub l : tr_variant__bindgen_ty_1__bindgen_ty_1 , _bindgen_union_align : [ u64 ; 5usize ] , } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct tr_variant__bindgen_ty_1__bindgen_ty_1 { pub alloc : usize , pub count : usize , pub vals : * mut tr_variant , } extern "C" { pub fn tr_variantFree ( arg1 : * mut tr_variant ) ; } # [ repr ( u32 ) ] # [ doc = "  Serialization / Deserialization" ] # [ derive ( Debug , Copy , Clone , PartialEq , Eq , Hash ) ] pub enum tr_variant_fmt { TR_VARIANT_FMT_BENC = 0 , TR_VARIANT_FMT_JSON = 1 , TR_VARIANT_FMT_JSON_LEAN = 2 , } extern "C" { pub fn tr_variantToFile ( variant : * const tr_variant , fmt : tr_variant_fmt , filename : * const :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn tr_variantToStr ( variant : * const tr_variant , fmt : tr_variant_fmt , len : * mut usize ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn tr_variantToBuf ( variant : * const tr_variant , fmt : tr_variant_fmt ) -> * mut evbuffer ; } extern "C" { pub fn tr_variantFromFile ( setme : * mut tr_variant , fmt : tr_variant_fmt , filename : * const :: std :: os :: raw :: c_char , error : * mut * mut tr_error ) -> bool ; } extern "C" { pub fn tr_variantFromBuf ( setme : * mut tr_variant , fmt : tr_variant_fmt , buf : * const :: std :: os :: raw :: c_void , buflen : usize , optional_source : * const :: std :: os :: raw :: c_char , setme_end : * mut * const :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn tr_variantGetStr ( variant : * const tr_variant , setme_str : * mut * const :: std :: os :: raw :: c_char , setme_len : * mut usize ) -> bool ; } extern "C" { pub fn tr_variantInitStr ( initme : * mut tr_variant , str : * const :: std :: os :: raw :: c_void , str_len : usize ) ; } extern "C" { pub fn tr_variantInitQuark ( initme : * mut tr_variant , quark : tr_quark ) ; } extern "C" { pub fn tr_variantInitRaw ( initme : * mut tr_variant , raw : * const :: std :: os :: raw :: c_void , raw_len : usize ) ; } extern "C" { pub fn tr_variantGetRaw ( variant : * const tr_variant , raw_setme : * mut * const u8 , len_setme : * mut usize ) -> bool ; } extern "C" { pub fn tr_variantInitReal ( initme : * mut tr_variant , value : f64 ) ; } extern "C" { pub fn tr_variantGetReal ( variant : * const tr_variant , value_setme : * mut f64 ) -> bool ; } extern "C" { pub fn tr_variantInitBool ( initme : * mut tr_variant , value : bool ) ; } extern "C" { pub fn tr_variantGetBool ( variant : * const tr_variant , setme : * mut bool ) -> bool ; } extern "C" { pub fn tr_variantInitInt ( variant : * mut tr_variant , value : i64 ) ; } extern "C" { pub fn tr_variantGetInt ( val : * const tr_variant , setme : * mut i64 ) -> bool ; } extern "C" { pub fn tr_variantInitList ( list : * mut tr_variant , reserve_count : usize ) ; } extern "C" { pub fn tr_variantListReserve ( list : * mut tr_variant , reserve_count : usize ) ; } extern "C" { pub fn tr_variantListAdd ( list : * mut tr_variant ) -> * mut tr_variant ; } extern "C" { pub fn tr_variantListAddBool ( list : * mut tr_variant , addme : bool ) -> * mut tr_variant ; } extern "C" { pub fn tr_variantListAddInt ( list : * mut tr_variant , addme : i64 ) -> * mut tr_variant ; } extern "C" { pub fn tr_variantListAddReal ( list : * mut tr_variant , addme : f64 ) -> * mut tr_variant ; } extern "C" { pub fn tr_variantListAddStr ( list : * mut tr_variant , addme : * const :: std :: os :: raw :: c_char ) -> * mut tr_variant ; } extern "C" { pub fn tr_variantListAddQuark ( list : * mut tr_variant , addme : tr_quark ) -> * mut tr_variant ; } extern "C" { pub fn tr_variantListAddRaw ( list : * mut tr_variant , addme_value : * const :: std :: os :: raw :: c_void , addme_len : usize ) -> * mut tr_variant ; } extern "C" { pub fn tr_variantListAddList ( list : * mut tr_variant , reserve_count : usize ) -> * mut tr_variant ; } extern "C" { pub fn tr_variantListAddDict ( list : * mut tr_variant , reserve_count : usize ) -> * mut tr_variant ; } extern "C" { pub fn tr_variantListChild ( list : * mut tr_variant , pos : usize ) -> * mut tr_variant ; } extern "C" { pub fn tr_variantListRemove ( list : * mut tr_variant , pos : usize ) -> bool ; } extern "C" { pub fn tr_variantListSize ( list : * const tr_variant ) -> usize ; } extern "C" { pub fn tr_variantInitDict ( initme : * mut tr_variant , reserve_count : usize ) ; } extern "C" { pub fn tr_variantDictReserve ( dict : * mut tr_variant , reserve_count : usize ) ; } extern "C" { pub fn tr_variantDictRemove ( dict : * mut tr_variant , key : tr_quark ) -> bool ; } extern "C" { pub fn tr_variantDictAdd ( dict : * mut tr_variant , key : tr_quark ) -> * mut tr_variant ; } extern "C" { pub fn tr_variantDictAddReal ( dict : * mut tr_variant , key : tr_quark , value : f64 ) -> * mut tr_variant ; } extern "C" { pub fn tr_variantDictAddInt ( dict : * mut tr_variant , key : tr_quark , value : i64 ) -> * mut tr_variant ; } extern "C" { pub fn tr_variantDictAddBool ( dict : * mut tr_variant , key : tr_quark , value : bool ) -> * mut tr_variant ; } extern "C" { pub fn tr_variantDictAddStr ( dict : * mut tr_variant , key : tr_quark , value : * const :: std :: os :: raw :: c_char ) -> * mut tr_variant ; } extern "C" { pub fn tr_variantDictAddQuark ( dict : * mut tr_variant , key : tr_quark , val : tr_quark ) -> * mut tr_variant ; } extern "C" { pub fn tr_variantDictAddList ( dict : * mut tr_variant , key : tr_quark , reserve_count : usize ) -> * mut tr_variant ; } extern "C" { pub fn tr_variantDictAddDict ( dict : * mut tr_variant , key : tr_quark , reserve_count : usize ) -> * mut tr_variant ; } extern "C" { pub fn tr_variantDictSteal ( dict : * mut tr_variant , key : tr_quark , value : * mut tr_variant ) -> * mut tr_variant ; } extern "C" { pub fn tr_variantDictAddRaw ( dict : * mut tr_variant , key : tr_quark , value : * const :: std :: os :: raw :: c_void , len : usize ) -> * mut tr_variant ; } extern "C" { pub fn tr_variantDictChild ( dict : * mut tr_variant , pos : usize , setme_key : * mut tr_quark , setme_value : * mut * mut tr_variant ) -> bool ; } extern "C" { pub fn tr_variantDictFind ( dict : * mut tr_variant , key : tr_quark ) -> * mut tr_variant ; } extern "C" { pub fn tr_variantDictFindList ( dict : * mut tr_variant , key : tr_quark , setme : * mut * mut tr_variant ) -> bool ; } extern "C" { pub fn tr_variantDictFindDict ( dict : * mut tr_variant , key : tr_quark , setme_value : * mut * mut tr_variant ) -> bool ; } extern "C" { pub fn tr_variantDictFindInt ( dict : * mut tr_variant , key : tr_quark , setme : * mut i64 ) -> bool ; } extern "C" { pub fn tr_variantDictFindReal ( dict : * mut tr_variant , key : tr_quark , setme : * mut f64 ) -> bool ; } extern "C" { pub fn tr_variantDictFindBool ( dict : * mut tr_variant , key : tr_quark , setme : * mut bool ) -> bool ; } extern "C" { pub fn tr_variantDictFindStr ( dict : * mut tr_variant , key : tr_quark , setme : * mut * const :: std :: os :: raw :: c_char , len : * mut usize ) -> bool ; } extern "C" { pub fn tr_variantDictFindRaw ( dict : * mut tr_variant , key : tr_quark , setme_raw : * mut * const u8 , setme_len : * mut usize ) -> bool ; } extern "C" { pub fn tr_variantMergeDicts ( dict_target : * mut tr_variant , dict_source : * const tr_variant ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct tr_metainfo_builder_file { pub filename : * mut :: std :: os :: raw :: c_char , pub size : u64 , } # [ repr ( u32 ) ] # [ derive ( Debug , Copy , Clone , PartialEq , Eq , Hash ) ] pub enum tr_metainfo_builder_err { TR_MAKEMETA_OK = 0 , TR_MAKEMETA_URL = 1 , TR_MAKEMETA_CANCELLED = 2 , TR_MAKEMETA_IO_READ = 3 , TR_MAKEMETA_IO_WRITE = 4 , } # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub struct tr_metainfo_builder { # [ doc = "  These are set by tr_makeMetaInfoBuilderCreate()" ] # [ doc = "  and cleaned up by tr_metaInfoBuilderFree()" ] pub top : * mut :: std :: os :: raw :: c_char , pub files : * mut tr_metainfo_builder_file , pub totalSize : u64 , pub fileCount : u32 , pub pieceSize : u32 , pub pieceCount : u32 , pub isFolder : bool , # [ doc = "  These are set inside tr_makeMetaInfo()" ] # [ doc = "  by copying the arguments passed to it," ] # [ doc = "  and cleaned up by tr_metaInfoBuilderFree()" ] pub trackers : * mut tr_tracker_info , pub trackerCount : :: std :: os :: raw :: c_int , pub comment : * mut :: std :: os :: raw :: c_char , pub outputFile : * mut :: std :: os :: raw :: c_char , pub isPrivate : bool , # [ doc = "  These are set inside tr_makeMetaInfo() so the client" ] # [ doc = "  can poll periodically to see what the status is." ] # [ doc = "  The client can also set abortFlag to nonzero to" ] # [ doc = "  tell tr_makeMetaInfo() to abort and clean up after itself." ] pub pieceIndex : u32 , pub abortFlag : bool , pub isDone : bool , pub result : tr_metainfo_builder_err , pub errfile : [ :: std :: os :: raw :: c_char ; 2048usize ] , pub my_errno : :: std :: os :: raw :: c_int , # [ doc = "  This is an implementation detail." ] # [ doc = "  The client should never use these fields." ] pub nextBuilder : * mut tr_metainfo_builder , } extern "C" { pub fn tr_metaInfoBuilderCreate ( topFile : * const :: std :: os :: raw :: c_char ) -> * mut tr_metainfo_builder ; } extern "C" { # [ doc = " Call this before tr_makeMetaInfo() to override the builder.pieceSize" ] # [ doc = " and builder.pieceCount values that were set by tr_metainfoBuilderCreate()" ] # [ doc = "" ] # [ doc = " @return false if the piece size isn\'t valid; eg, isn\'t a power of two." ] pub fn tr_metaInfoBuilderSetPieceSize ( builder : * mut tr_metainfo_builder , bytes : u32 ) -> bool ; } extern "C" { pub fn tr_metaInfoBuilderFree ( arg1 : * mut tr_metainfo_builder ) ; } extern "C" { # [ doc = " @brief create a new .torrent file" ] # [ doc = "" ] # [ doc = " This is actually done in a worker thread, not the main thread!" ] # [ doc = " Otherwise the client\'s interface would lock up while this runs." ] # [ doc = "" ] # [ doc = " It is the caller\'s responsibility to poll builder->isDone" ] # [ doc = " from time to time!  When the worker thread sets that flag," ] # [ doc = " the caller must pass the builder to tr_metaInfoBuilderFree()." ] # [ doc = "" ] # [ doc = " @param outputFile if NULL, builder->top + \".torrent\" will be used." ] # [ doc = "" ] # [ doc = " @param trackers An array of trackers, sorted by tier from first to last." ] # [ doc = "                 NOTE: only the `tier\' and `announce\' fields are used." ] # [ doc = "" ] # [ doc = " @param trackerCount size of the `trackers\' array" ] pub fn tr_makeMetaInfo ( builder : * mut tr_metainfo_builder , outputFile : * const :: std :: os :: raw :: c_char , trackers : * const tr_tracker_info , trackerCount : :: std :: os :: raw :: c_int , comment : * const :: std :: os :: raw :: c_char , isPrivate : bool ) ; } pub type va_list = __builtin_va_list ; pub type __gnuc_va_list = __builtin_va_list ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct event { _unused : [ u8 ; 0 ] , } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct timeval { _unused : [ u8 ; 0 ] , } extern "C" { # [ doc = " @addtogroup utils Utilities" ] # [ doc = " @{" ] pub fn tr_strip_positional_args ( fmt : * const :: std :: os :: raw :: c_char ) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [ doc = " @brief Rich Salz\'s classic implementation of shell-style pattern matching for ?, \\, [], and * characters." ] # [ doc = " @return 1 if the pattern matches, 0 if it doesn\'t, or -1 if an error occured" ] pub fn tr_wildmat ( text : * const :: std :: os :: raw :: c_char , pattern : * const :: std :: os :: raw :: c_char ) -> bool ; } extern "C" { # [ doc = " @brief Loads a file and returns its contents." ] # [ doc = " On failure, NULL is returned and errno is set." ] pub fn tr_loadFile ( filename : * const :: std :: os :: raw :: c_char , size : * mut usize , error : * mut * mut tr_error ) -> * mut u8 ; } extern "C" { # [ doc = " @brief build a filename from a series of elements using the" ] # [ doc = "platform\'s correct directory separator." ] pub fn tr_buildPath ( first_element : * const :: std :: os :: raw :: c_char , ... ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { # [ doc = " @brief Get available disk space (in bytes) for the specified folder." ] # [ doc = " @return zero or positive integer on success, -1 in case of error." ] pub fn tr_getDirFreeSpace ( path : * const :: std :: os :: raw :: c_char ) -> i64 ; } extern "C" { # [ doc = " @brief Convenience wrapper around timer_add() to have a timer wake up in a number of seconds and microseconds" ] # [ doc = " @param timer         the timer to set" ] # [ doc = " @param seconds       seconds to wait" ] # [ doc = " @param microseconds  microseconds to wait" ] pub fn tr_timerAdd ( timer : * mut event , seconds : :: std :: os :: raw :: c_int , microseconds : :: std :: os :: raw :: c_int ) ; } extern "C" { # [ doc = " @brief Convenience wrapper around timer_add() to have a timer wake up in a number of milliseconds" ] # [ doc = " @param timer         the timer to set" ] # [ doc = " @param milliseconds  milliseconds to wait" ] pub fn tr_timerAddMsec ( timer : * mut event , milliseconds : :: std :: os :: raw :: c_int ) ; } extern "C" { # [ doc = " @brief return the current date in milliseconds" ] pub fn tr_time_msec ( ) -> u64 ; } extern "C" { # [ doc = " @brief sleep the specified number of milliseconds" ] pub fn tr_wait_msec ( delay_milliseconds : :: std :: os :: raw :: c_long ) ; } extern "C" { # [ doc = " @brief make a copy of \'str\' whose non-utf8 content has been corrected or stripped" ] # [ doc = " @return a newly-allocated string that must be freed with tr_free()" ] # [ doc = " @param str the string to make a clean copy of" ] # [ doc = " @param len the length of the string to copy. If -1, the entire string is used." ] pub fn tr_utf8clean ( str : * const :: std :: os :: raw :: c_char , len : usize ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { # [ doc = " @brief Portability wrapper around malloc() in which `0\' is a safe argument" ] pub fn tr_malloc ( size : usize ) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { # [ doc = " @brief Portability wrapper around calloc() in which `0\' is a safe argument" ] pub fn tr_malloc0 ( size : usize ) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { # [ doc = " @brief Portability wrapper around reallocf() in which `0\' is a safe argument" ] pub fn tr_realloc ( p : * mut :: std :: os :: raw :: c_void , size : usize ) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { # [ doc = " @brief Portability wrapper around free() in which `NULL\' is a safe argument" ] pub fn tr_free ( p : * mut :: std :: os :: raw :: c_void ) ; } extern "C" { # [ doc = " @brief Free pointers in a NULL-terminated array (the array itself is not freed)" ] pub fn tr_free_ptrv ( p : * const * mut :: std :: os :: raw :: c_void ) ; } extern "C" { # [ doc = " @brief make a newly-allocated copy of a chunk of memory" ] # [ doc = " @param src the memory to copy" ] # [ doc = " @param byteCount the number of bytes to copy" ] # [ doc = " @return a newly-allocated copy of `src\' that can be freed with tr_free()" ] pub fn tr_memdup ( src : * const :: std :: os :: raw :: c_void , byteCount : usize ) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { pub fn tr_valloc ( bufLen : usize ) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { # [ doc = " @brief make a newly-allocated copy of a substring" ] # [ doc = " @param in is a void* so that callers can pass in both signed & unsigned without a cast" ] # [ doc = " @param len length of the substring to copy. if a length less than zero is passed in, strlen(len) is used" ] # [ doc = " @return a newly-allocated copy of `in\' that can be freed with tr_free()" ] pub fn tr_strndup ( in_ : * const :: std :: os :: raw :: c_void , len : usize ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { # [ doc = " @brief make a newly-allocated copy of a string" ] # [ doc = " @param in is a void* so that callers can pass in both signed & unsigned without a cast" ] # [ doc = " @return a newly-allocated copy of `in\' that can be freed with tr_free()" ] pub fn tr_strdup ( in_ : * const :: std :: os :: raw :: c_void ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { # [ doc = " @brief like strcmp() but gracefully handles NULL strings" ] pub fn tr_strcmp0 ( str1 : * const :: std :: os :: raw :: c_char , str2 : * const :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " @brief like memcmp() but gracefully handles NULL pointers" ] pub fn tr_memcmp0 ( lhs : * const :: std :: os :: raw :: c_void , rhs : * const :: std :: os :: raw :: c_void , size : usize ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn evbuffer_free_to_str ( buf : * mut evbuffer , result_len : * mut usize ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { # [ doc = " @brief similar to bsearch() but returns the index of the lower bound" ] pub fn tr_lowerBound ( key : * const :: std :: os :: raw :: c_void , base : * const :: std :: os :: raw :: c_void , nmemb : usize , size : usize , compar : :: std :: option :: Option < unsafe extern "C" fn ( key : * const :: std :: os :: raw :: c_void , arrayMember : * const :: std :: os :: raw :: c_void ) -> :: std :: os :: raw :: c_int > , exact_match : * mut bool ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " @brief moves the best k items to the first slots in the array. O(n)" ] pub fn tr_quickfindFirstK ( base : * mut :: std :: os :: raw :: c_void , nmemb : usize , size : usize , compar : :: std :: option :: Option < unsafe extern "C" fn ( arg1 : * const :: std :: os :: raw :: c_void , arg2 : * const :: std :: os :: raw :: c_void ) -> :: std :: os :: raw :: c_int > , k : usize ) ; } extern "C" { # [ doc = " @brief sprintf() a string into a newly-allocated buffer large enough to hold it" ] # [ doc = " @return a newly-allocated string that can be freed with tr_free()" ] pub fn tr_strdup_printf ( fmt : * const :: std :: os :: raw :: c_char , ... ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn tr_strdup_vprintf ( fmt : * const :: std :: os :: raw :: c_char , args : * mut __va_list_tag ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { # [ doc = " @brief Portability wrapper for strlcpy() that uses the system implementation if available" ] pub fn tr_strlcpy ( dst : * mut :: std :: os :: raw :: c_char , src : * const :: std :: os :: raw :: c_void , siz : usize ) -> usize ; } extern "C" { # [ doc = " @brief Portability wrapper for snprintf() that uses the system implementation if available" ] pub fn tr_snprintf ( buf : * mut :: std :: os :: raw :: c_char , buflen : usize , fmt : * const :: std :: os :: raw :: c_char , ... ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " @brief Convenience wrapper around strerorr() guaranteed to not return NULL" ] # [ doc = "@param errnum the error number to describe" ] pub fn tr_strerror ( errnum : :: std :: os :: raw :: c_int ) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [ doc = " @brief strips leading and trailing whitspace from a string" ] # [ doc = "@return the stripped string" ] pub fn tr_strstrip ( str : * mut :: std :: os :: raw :: c_char ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { # [ doc = " @brief Returns true if the string ends with the specified case-insensitive suffix" ] pub fn tr_str_has_suffix ( str : * const :: std :: os :: raw :: c_char , suffix : * const :: std :: os :: raw :: c_char ) -> bool ; } extern "C" { # [ doc = " @brief Portability wrapper for memmem() that uses the system implementation if available" ] pub fn tr_memmem ( haystack : * const :: std :: os :: raw :: c_char , haystack_len : usize , needle : * const :: std :: os :: raw :: c_char , needle_len : usize ) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [ doc = " @brief Portability wrapper for strsep() that uses the system implementation if available" ] pub fn tr_strsep ( str : * mut * mut :: std :: os :: raw :: c_char , delim : * const :: std :: os :: raw :: c_char ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn compareInt ( va : * const :: std :: os :: raw :: c_void , vb : * const :: std :: os :: raw :: c_void ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn tr_binary_to_hex ( input : * const :: std :: os :: raw :: c_void , output : * mut :: std :: os :: raw :: c_char , byte_length : usize ) ; } extern "C" { pub fn tr_hex_to_binary ( input : * const :: std :: os :: raw :: c_char , output : * mut :: std :: os :: raw :: c_void , byte_length : usize ) ; } extern "C" { # [ doc = " @brief convenience function to determine if an address is an IP address (IPv4 or IPv6)" ] pub fn tr_addressIsIP ( address : * const :: std :: os :: raw :: c_char ) -> bool ; } extern "C" { # [ doc = " @brief return true if the url is a http or https or UDP url that Transmission understands" ] pub fn tr_urlIsValidTracker ( url : * const :: std :: os :: raw :: c_char ) -> bool ; } extern "C" { # [ doc = " @brief return true if the url is a [ http, https, ftp, sftp ] url that Transmission understands" ] pub fn tr_urlIsValid ( url : * const :: std :: os :: raw :: c_char , url_len : usize ) -> bool ; } extern "C" { # [ doc = " @brief parse a URL into its component parts" ] # [ doc = "@return True on success or false if an error occurred" ] pub fn tr_urlParse ( url : * const :: std :: os :: raw :: c_char , url_len : usize , setme_scheme : * mut * mut :: std :: os :: raw :: c_char , setme_host : * mut * mut :: std :: os :: raw :: c_char , setme_port : * mut :: std :: os :: raw :: c_int , setme_path : * mut * mut :: std :: os :: raw :: c_char ) -> bool ; } extern "C" { # [ doc = " @brief return TR_RATIO_NA, TR_RATIO_INF, or a number in [0..1]" ] # [ doc = "@return TR_RATIO_NA, TR_RATIO_INF, or a number in [0..1]" ] pub fn tr_getRatio ( numerator : u64 , denominator : u64 ) -> f64 ; } extern "C" { # [ doc = " @brief Given a string like \"1-4\" or \"1-4,6,9,14-51\", this returns a" ] # [ doc = "        newly-allocated array of all the integers in the set." ] # [ doc = " @return a newly-allocated array of integers that must be freed with tr_free()," ] # [ doc = "         or NULL if a fragment of the string can\'t be parsed." ] # [ doc = "" ] # [ doc = " For example, \"5-8\" will return [ 5, 6, 7, 8 ] and setmeCount will be 4." ] pub fn tr_parseNumberRange ( str : * const :: std :: os :: raw :: c_char , str_len : usize , setmeCount : * mut :: std :: os :: raw :: c_int ) -> * mut :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " @brief truncate a double value at a given number of decimal places." ] # [ doc = "" ] # [ doc = " this can be used to prevent a printf() call from rounding up:" ] # [ doc = " call with the decimal_places argument equal to the number of" ] # [ doc = " decimal places in the printf()\'s precision:" ] # [ doc = "" ] # [ doc = " - printf(\"%.2f%%\", 99.999) ==> \"100.00%\"" ] # [ doc = "" ] # [ doc = " - printf(\"%.2f%%\", tr_truncd(99.999, 2)) ==> \"99.99%\"" ] # [ doc = "             ^                        ^" ] # [ doc = "             |   These should match   |" ] # [ doc = "             +------------------------+" ] pub fn tr_truncd ( x : f64 , decimal_places : :: std :: os :: raw :: c_int ) -> f64 ; } extern "C" { pub fn tr_strpercent ( buf : * mut :: std :: os :: raw :: c_char , x : f64 , buflen : usize ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { # [ doc = " @param buf      the buffer to write the string to" ] # [ doc = " @param buflen   buf\'s size" ] # [ doc = " @param ratio    the ratio to convert to a string" ] # [ doc = " @param infinity the string represntation of \"infinity\"" ] pub fn tr_strratio ( buf : * mut :: std :: os :: raw :: c_char , buflen : usize , ratio : f64 , infinity : * const :: std :: os :: raw :: c_char ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { # [ doc = " @brief Portability wrapper for localtime_r() that uses the system implementation if available" ] pub fn tr_localtime_r ( _clock : * const time_t , _result : * mut tm ) -> * mut tm ; } extern "C" { # [ doc = " @brief Portability wrapper for gettimeofday(), with tz argument dropped" ] pub fn tr_gettimeofday ( tv : * mut timeval ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " @brief move a file" ] # [ doc = " @return `True` on success, `false` otherwise (with `error` set accordingly)." ] pub fn tr_moveFile ( oldpath : * const :: std :: os :: raw :: c_char , newpath : * const :: std :: os :: raw :: c_char , error : * mut * mut tr_error ) -> bool ; } extern "C" { # [ doc = " @brief convenience function to remove an item from an array" ] pub fn tr_removeElementFromArray ( array : * mut :: std :: os :: raw :: c_void , index_to_remove : :: std :: os :: raw :: c_uint , sizeof_element : usize , nmemb : usize ) ; } extern "C" { # [ link_name = "\u{1}__tr_current_time" ] pub static mut __tr_current_time : time_t ; } extern "C" { # [ doc = " @brief Portability wrapper for htonll() that uses the system implementation if available" ] pub fn tr_htonll ( arg1 : u64 ) -> u64 ; } extern "C" { # [ doc = " @brief Portability wrapper for htonll() that uses the system implementation if available" ] pub fn tr_ntohll ( arg1 : u64 ) -> u64 ; } extern "C" { pub fn tr_formatter_size_init ( kilo : :: std :: os :: raw :: c_uint , kb : * const :: std :: os :: raw :: c_char , mb : * const :: std :: os :: raw :: c_char , gb : * const :: std :: os :: raw :: c_char , tb : * const :: std :: os :: raw :: c_char ) ; } extern "C" { pub fn tr_formatter_speed_init ( kilo : :: std :: os :: raw :: c_uint , kb : * const :: std :: os :: raw :: c_char , mb : * const :: std :: os :: raw :: c_char , gb : * const :: std :: os :: raw :: c_char , tb : * const :: std :: os :: raw :: c_char ) ; } extern "C" { pub fn tr_formatter_mem_init ( kilo : :: std :: os :: raw :: c_uint , kb : * const :: std :: os :: raw :: c_char , mb : * const :: std :: os :: raw :: c_char , gb : * const :: std :: os :: raw :: c_char , tb : * const :: std :: os :: raw :: c_char ) ; } extern "C" { # [ link_name = "\u{1}tr_speed_K" ] pub static mut tr_speed_K : :: std :: os :: raw :: c_uint ; } extern "C" { # [ link_name = "\u{1}tr_mem_K" ] pub static mut tr_mem_K : :: std :: os :: raw :: c_uint ; } extern "C" { # [ link_name = "\u{1}tr_size_K" ] pub static mut tr_size_K : :: std :: os :: raw :: c_uint ; } extern "C" { pub fn tr_formatter_speed_KBps ( buf : * mut :: std :: os :: raw :: c_char , KBps : f64 , buflen : usize ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn tr_formatter_mem_B ( buf : * mut :: std :: os :: raw :: c_char , bytes : i64 , buflen : usize ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn tr_formatter_size_B ( buf : * mut :: std :: os :: raw :: c_char , bytes : i64 , buflen : usize ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn tr_formatter_get_units ( dict : * mut :: std :: os :: raw :: c_void ) ; } extern "C" { # [ doc = " @brief Check if environment variable exists." ] pub fn tr_env_key_exists ( key : * const :: std :: os :: raw :: c_char ) -> bool ; } extern "C" { # [ doc = " @brief Get environment variable value as int." ] pub fn tr_env_get_int ( key : * const :: std :: os :: raw :: c_char , default_value : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " @brief Get environment variable value as string (should be freed afterwards)." ] pub fn tr_env_get_string ( key : * const :: std :: os :: raw :: c_char , default_value : * const :: std :: os :: raw :: c_char ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn tr_net_init ( ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct __locale_data { pub _address : u8 , } pub type __builtin_va_list = [ __va_list_tag ; 1usize ] ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct __va_list_tag { pub gp_offset : :: std :: os :: raw :: c_uint , pub fp_offset : :: std :: os :: raw :: c_uint , pub overflow_arg_area : * mut :: std :: os :: raw :: c_void , pub reg_save_area : * mut :: std :: os :: raw :: c_void , }