about summary refs log tree commit diff stats
path: root/include/libumumble.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/libumumble.h')
-rw-r--r--include/libumumble.h34
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 */