diff options
author | latex <latex@disroot.org> | 2023-01-25 01:10:44 +0100 |
---|---|---|
committer | latex <latex@disroot.org> | 2023-01-25 01:10:44 +0100 |
commit | 170025ac5d96f1c46483a88ca4372254a5da6161 (patch) | |
tree | e791e4e1e9f3d82d9da0c7e1c0b62e50359e6658 /include | |
parent | e8d5b17975a687fd115167c1df1544c949088f42 (diff) | |
download | libumumble-170025ac5d96f1c46483a88ca4372254a5da6161.tar.gz |
add context initialization and uv loop
Diffstat (limited to 'include')
-rw-r--r-- | include/libumumble.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/include/libumumble.h b/include/libumumble.h new file mode 100644 index 0000000..2605688 --- /dev/null +++ b/include/libumumble.h @@ -0,0 +1,34 @@ +#ifndef LIBUMUMBLE_H +#define LIBUMUMBLE_H + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +#include <uv.h> + +typedef struct mumble_ctx { + uv_loop_t uv_loop; +} mumble_ctx_t; + +/* Initializes a mumble context object. + * This function will allocate initial memory needed for storing e.g. the channel layout. + * Make sure to call mumble_free_ctx() when you're done! + * + * \param ctx the context object to initialize. + * \return int indicating success + * \retval 1 error + */ +int mumble_init_ctx(mumble_ctx_t ctx); + +/* Free a mumble context. + * + * \param ctx the context object to free. + */ +void mumble_free_ctx(mumble_ctx_t ctx); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* LIBUMUMBLE_H */ |