add context initialization and uv loop
This commit is contained in:
parent
e8d5b17975
commit
170025ac5d
|
@ -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 */
|
Loading…
Reference in New Issue