traversity/traversity

Add the core init and uninit functions

20 months ago, Gary Kramlich
0c6f1f4a3f79
Parents 76bc12bbf02e
Children 31f4fd3abe51
Add the core init and uninit functions

Testing Done:
compiled

Reviewed at https://reviews.imfreedom.org/r/1887/
--- a/traversity/meson.build Tue Oct 04 02:30:28 2022 -0500
+++ b/traversity/meson.build Tue Oct 04 02:31:35 2022 -0500
@@ -1,4 +1,5 @@
TRAVERSITY_SOURCES = [
+ 'traversitycore.c',
'traversitydiscoverer.c',
'traversityupnpdiscoverer.c',
]
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/traversity/traversitycore.c Tue Oct 04 02:31:35 2022 -0500
@@ -0,0 +1,14 @@
+#include "traversitycore.h"
+
+/******************************************************************************
+ * Public API
+ *****************************************************************************/
+void
+traveristy_core_init(TraversityCoreFlags flags) {
+ /* Nothing to do yet... */
+}
+
+void
+traversity_core_uninit(void) {
+ /* Nothing to do yet... */
+}
--- a/traversity/traversitycore.h Tue Oct 04 02:30:28 2022 -0500
+++ b/traversity/traversitycore.h Tue Oct 04 02:31:35 2022 -0500
@@ -7,10 +7,48 @@
#include <glib.h>
+/**
+ * TRAVERSITY_DOMAIN:
+ *
+ * The error domain that the library uses.
+ *
+ * Since: 1.0.0
+ */
#define TRAVERSITY_DOMAIN (g_quark_from_static_string("traversity"))
+/**
+ * TraveristyCoreFlags:
+ * @TRAVERSITY_CORE_FLAGS_NONE: A place holder for no flags.
+ *
+ * Flags that may be passed to [func@Traversity.core_init].
+ *
+ * Since: 1.0.0
+ */
+typedef enum /*< flags >*/ {
+ TRAVERSITY_CORE_FLAGS_NONE = 1 << 0,
+} TraversityCoreFlags;
+
G_BEGIN_DECLS
+/**
+ * traversity_core_init:
+ * @flags: The [flags@Traversity.CoreFlags] to use.
+ *
+ * Initializes the library with @flags.
+ *
+ * Since: 1.0.0
+ */
+void traveristy_core_init(TraversityCoreFlags flags);
+
+/**
+ * traversity_core_uninit:
+ *
+ * Uninitializes the library.
+ *
+ * Since: 1.0.0
+ */
+void traversity_core_uninit(void);
+
G_END_DECLS
#endif /* TRAVERSITY_CORE_H */