Fork me on GitHub
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
utils.h
Go to the documentation of this file.
1 
12 #ifndef _JANUS_UTILS_H
13 #define _JANUS_UTILS_H
14 
15 #include <stdint.h>
16 #include <glib.h>
17 
21 gint64 janus_get_monotonic_time(void);
22 
29 char *janus_string_replace(char *message, const char *old_string, const char *new_string) G_GNUC_WARN_UNUSED_RESULT;
30 
34 gboolean janus_is_true(const char *value);
35 
40 gboolean janus_strcmp_const_time(const void *str1, const void *str2);
41 
44 
45 
46 typedef uint32_t janus_flags;
47 
50 void janus_flags_reset(janus_flags *flags);
51 
55 void janus_flags_set(janus_flags *flags, uint32_t flag);
56 
60 void janus_flags_clear(janus_flags *flags, uint32_t flag);
61 
66 gboolean janus_flags_is_set(janus_flags *flags, uint32_t flag);
68 
74 int janus_mkdir(const char *dir, mode_t mode);
75 
79 int janus_get_opus_pt(const char *sdp);
80 
84 int janus_get_vp8_pt(const char *sdp);
85 
90 gboolean janus_is_ip_valid(const char *ip, int *family);
91 #endif