summaryrefslogtreecommitdiff
path: root/toxcore/util.h
diff options
context:
space:
mode:
authorCoren[m] <Break@Ocean>2013-09-16 09:29:08 +0200
committerCoren[m] <Break@Ocean>2013-09-16 09:29:08 +0200
commit57d10f0a805b606c6f2df81879f71de0ed09dd96 (patch)
tree36ad8501efabe2ac85ed2f69aa5f0cd2fc4ffdab /toxcore/util.h
parenta341b259b6342962e209f1b50708abe40f1cdad2 (diff)
parent7a69f2de287747eb31e143fd502951dd7d4ab2de (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.h13
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
11uint64_t now(); 14uint64_t now();
12uint64_t random_64b(); 15uint64_t random_64b();
13bool ipp_eq(IP_Port a, IP_Port b);
14bool id_eq(uint8_t *dest, uint8_t *src); 16bool id_eq(uint8_t *dest, uint8_t *src);
15void id_cpy(uint8_t *dest, uint8_t *src); 17void 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
18int load_state(load_state_callback_func load_state_callback, void *outer, 20int 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
26extern char logbuffer[512];
27void loginit(uint16_t port);
28void loglog(char *text);
29void logexit();
30#endif
31
21#endif /* __UTIL_H__ */ 32#endif /* __UTIL_H__ */