diff options
author | Coren[m] <Break@Ocean> | 2013-09-16 09:29:08 +0200 |
---|---|---|
committer | Coren[m] <Break@Ocean> | 2013-09-16 09:29:08 +0200 |
commit | 57d10f0a805b606c6f2df81879f71de0ed09dd96 (patch) | |
tree | 36ad8501efabe2ac85ed2f69aa5f0cd2fc4ffdab /toxcore/util.h | |
parent | a341b259b6342962e209f1b50708abe40f1cdad2 (diff) | |
parent | 7a69f2de287747eb31e143fd502951dd7d4ab2de (diff) |
Merge remote-tracking branch 'upstream/master' into MessengerLoadSave
Conflicts:
toxcore/Messenger.c
toxcore/util.c
toxcore/util.h
Diffstat (limited to 'toxcore/util.h')
-rw-r--r-- | toxcore/util.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/toxcore/util.h b/toxcore/util.h index 00482862..6937f7d4 100644 --- a/toxcore/util.h +++ b/toxcore/util.h | |||
@@ -8,9 +8,11 @@ | |||
8 | #ifndef __UTIL_H__ | 8 | #ifndef __UTIL_H__ |
9 | #define __UTIL_H__ | 9 | #define __UTIL_H__ |
10 | 10 | ||
11 | #include <stdbool.h> | ||
12 | #include <stdint.h> | ||
13 | |||
11 | uint64_t now(); | 14 | uint64_t now(); |
12 | uint64_t random_64b(); | 15 | uint64_t random_64b(); |
13 | bool ipp_eq(IP_Port a, IP_Port b); | ||
14 | bool id_eq(uint8_t *dest, uint8_t *src); | 16 | bool id_eq(uint8_t *dest, uint8_t *src); |
15 | void id_cpy(uint8_t *dest, uint8_t *src); | 17 | void id_cpy(uint8_t *dest, uint8_t *src); |
16 | 18 | ||
@@ -18,4 +20,13 @@ typedef int (*load_state_callback_func)(void *outer, uint8_t *data, uint32_t len | |||
18 | int load_state(load_state_callback_func load_state_callback, void *outer, | 20 | int load_state(load_state_callback_func load_state_callback, void *outer, |
19 | uint8_t *data, uint32_t length, uint16_t cookie_inner); | 21 | uint8_t *data, uint32_t length, uint16_t cookie_inner); |
20 | 22 | ||
23 | #undef LOGGING | ||
24 | /* #define LOGGING */ | ||
25 | #ifdef LOGGING | ||
26 | extern char logbuffer[512]; | ||
27 | void loginit(uint16_t port); | ||
28 | void loglog(char *text); | ||
29 | void logexit(); | ||
30 | #endif | ||
31 | |||
21 | #endif /* __UTIL_H__ */ | 32 | #endif /* __UTIL_H__ */ |