summaryrefslogtreecommitdiffhomepage
path: root/dev/libMsg/MsgKit
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-07-04 18:58:57 +0200
committerAmlal El Mahrouss <amlal@nekernel.org>2025-07-04 18:58:57 +0200
commit95ae0f42a5f22bd913a713db987729520c42a123 (patch)
treeb0da5c9d6d1940bc9b1c6b0331abe4487d00e0f1 /dev/libMsg/MsgKit
parent32edc6508c91e51316d67b92eb86b4e72d0a41a4 (diff)
feat: see below.
feat: Rework `OpenMSG` into `LibMSG` feat: Rename `generic_kits` to `misc` Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'dev/libMsg/MsgKit')
-rw-r--r--dev/libMsg/MsgKit/Network.h9
-rw-r--r--dev/libMsg/MsgKit/Server.h36
2 files changed, 45 insertions, 0 deletions
diff --git a/dev/libMsg/MsgKit/Network.h b/dev/libMsg/MsgKit/Network.h
new file mode 100644
index 00000000..c7b562a2
--- /dev/null
+++ b/dev/libMsg/MsgKit/Network.h
@@ -0,0 +1,9 @@
+/* -------------------------------------------
+
+ Copyright (C) 2025, Amlal El Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <libMsg/MsgKit/Server.h> \ No newline at end of file
diff --git a/dev/libMsg/MsgKit/Server.h b/dev/libMsg/MsgKit/Server.h
new file mode 100644
index 00000000..33d10407
--- /dev/null
+++ b/dev/libMsg/MsgKit/Server.h
@@ -0,0 +1,36 @@
+/* -------------------------------------------
+
+ Copyright (C) 2025, Amlal El Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#ifdef __cplusplus
+#include <public/frameworks/CoreFoundation.fwrk/headers/String.h>
+#else
+#include <libSystem/SystemKit/System.h>
+#endif
+
+struct LIBMSG_EXPR;
+
+/// @brief an expression chain of LibMSG.
+struct LIBMSG_EXPR final {
+#ifdef __cplusplus
+ CF::CFString* l_key{nullptr};
+ CF::CFString* l_value{nullptr};
+#else
+ VoidPtr l_key{nullptr};
+ VoidPtr l_value{nullptr};
+#endif
+
+ LIBMSG_EXPR* l_head{nullptr};
+ LIBMSG_EXPR* l_tail{nullptr};
+ LIBMSG_EXPR* l_child{nullptr};
+};
+
+typedef Void (*libmsg_func_t)(LIBMSG_EXPR* arg);
+
+IMPORT_C Void libmsg_init_library(libmsg_func_t* funcs, SizeT cnt);
+IMPORT_C UInt32 libmsg_eval_library(struct LIBMSG_EXPR* head);
+IMPORT_C UInt32 libmsg_close_library(Void);