1 #ifndef C_TOXCORE_TESTING_MISC_TOOLS_H
2 #define C_TOXCORE_TESTING_MISC_TOOLS_H
3 
4 #include "../toxcore/tox.h"
5 
6 #ifdef __cplusplus
7 extern "C" {
8 #endif
9 
10 // Amount of time in milliseconds to wait between tox_iterate calls.
11 #define ITERATION_INTERVAL 200
12 
13 void c_sleep(uint32_t x);
14 
15 uint8_t *hex_string_to_bin(const char *hex_string);
16 void to_hex(char *out, uint8_t *in, int size);
17 int tox_strncasecmp(const char *s1, const char *s2, size_t n);
18 int cmdline_parsefor_ipv46(int argc, char **argv, bool *ipv6enabled);
19 
20 void print_debug_log(Tox *m, Tox_Log_Level level, const char *file, uint32_t line, const char *func,
21                      const char *message, void *user_data);
22 
23 Tox *tox_new_log(struct Tox_Options *options, Tox_Err_New *err, void *log_user_data);
24 Tox *tox_new_log_lan(struct Tox_Options *options, Tox_Err_New *err, void *log_user_data, bool lan_discovery);
25 
26 int use_test_rng(uint32_t seed);
27 
28 #ifdef __cplusplus
29 }
30 #endif
31 
32 #endif
33