summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2022-11-20 10:49:03 +0100
committerxengineering <me@xengineering.eu>2022-11-20 10:49:03 +0100
commitb377b8aa01f32fa5e6d59a64c84dfe8b50a6e63c (patch)
tree825a3685916d3ee128ac31baa356ad06234e3763
parenta4f88ce6fe9007a8d2a34d5607ee57c625034076 (diff)
downloadlimox-b377b8aa01f32fa5e6d59a64c84dfe8b50a6e63c.tar
limox-b377b8aa01f32fa5e6d59a64c84dfe8b50a6e63c.tar.zst
limox-b377b8aa01f32fa5e6d59a64c84dfe8b50a6e63c.zip
Introduce dummy as second XMPP implementation
It is currently evaluated if it is worth a trial to drop libstrophe as a dependency and use a raw TCP connection and a XML library like expat to implement the XMPP part. This would have the following advantages: - fewer dependencies - learning more about XMPP itself and less about libstrophe - slower, but maybe easier implementation (XMPP doc is far more readable / extensive) Because of these reasons the `limox_sdl2` version was switched to a dummy XMPP implementation `xmpp.c` which acts now as a test field for XMPP hacking.
-rw-r--r--meson.build4
-rw-r--r--strophe.c (renamed from net.c)0
-rw-r--r--xmpp.c14
3 files changed, 16 insertions, 2 deletions
diff --git a/meson.build b/meson.build
index e683f16..8a21907 100644
--- a/meson.build
+++ b/meson.build
@@ -2,5 +2,5 @@ project('LimoX', 'c')
gtkdep = dependency('gtk4')
strophedep = dependency('libstrophe')
sdl2dep = dependency('sdl2')
-executable('limox', ['main.c', 'gtk.c', 'net.c', 'data.c'], dependencies : [gtkdep, strophedep])
-executable('limox_sdl2', ['main.c', 'sdl2.c', 'net.c', 'data.c'], dependencies : [sdl2dep, strophedep])
+executable('limox', ['main.c', 'gtk.c', 'strophe.c', 'data.c'], dependencies : [gtkdep, strophedep])
+executable('limox_sdl2', ['main.c', 'sdl2.c', 'xmpp.c', 'data.c'], dependencies : [sdl2dep])
diff --git a/net.c b/strophe.c
index c037bc1..c037bc1 100644
--- a/net.c
+++ b/strophe.c
diff --git a/xmpp.c b/xmpp.c
new file mode 100644
index 0000000..d9645d1
--- /dev/null
+++ b/xmpp.c
@@ -0,0 +1,14 @@
+
+
+#include <stdio.h>
+
+
+void net_init(void)
+{
+ printf("net_init()\n");
+}
+
+void net_quit(void)
+{
+ printf("net_quit()\n");
+}