about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorSteffen Jaeckel <jaeckel-floss@eyet-services.de>2021-10-27 15:05:39 +0200
committerSteffen Jaeckel <jaeckel-floss@eyet-services.de>2021-10-27 22:45:44 +0200
commitffc0b49ab19dc976ecd113dbf163c2fe03a651fa (patch)
tree4f7a765a3b39f92b2d36081b88fb3f4f2d112902
parentb4d65335f63351c551f27a6e59edbb11e0dd5f52 (diff)
downloadprofani-tty-ffc0b49ab19dc976ecd113dbf163c2fe03a651fa.tar.gz
first step to remove libmesode
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
-rw-r--r--configure.ac15
-rw-r--r--src/command/cmd_funcs.c25
-rw-r--r--src/main.c5
-rw-r--r--src/xmpp/blocking.c6
-rw-r--r--src/xmpp/bookmark.c6
-rw-r--r--src/xmpp/capabilities.c6
-rw-r--r--src/xmpp/capabilities.h6
-rw-r--r--src/xmpp/connection.c6
-rw-r--r--src/xmpp/form.c6
-rw-r--r--src/xmpp/form.h6
-rw-r--r--src/xmpp/iq.c6
-rw-r--r--src/xmpp/message.c6
-rw-r--r--src/xmpp/presence.c6
-rw-r--r--src/xmpp/roster.c6
-rw-r--r--src/xmpp/stanza.c6
-rw-r--r--src/xmpp/stanza.h6
-rw-r--r--src/xmpp/xmpp.h6
17 files changed, 4 insertions, 125 deletions
diff --git a/configure.ac b/configure.ac
index ce79743d..1dc08907 100644
--- a/configure.ac
+++ b/configure.ac
@@ -134,21 +134,14 @@ LIBS="$PTHREAD_LIBS $LIBS"
 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
 AS_IF([test "x$PTHREAD_CC" != x], [ CC="$PTHREAD_CC" ])
 
-### Check for libmesode, fall back to libstrophe
-### TODO libmesode support will be removed in the future, rewrite this section
-PKG_CHECK_MODULES([libmesode], [libmesode >= 0.10.0],
-    [LIBS="$libmesode_LIBS $LIBS" CFLAGS="$CFLAGS $libmesode_CFLAGS" XMPP_LIB="libmesode" AC_DEFINE([HAVE_LIBMESODE], [1], [libmesode])],
-    [PKG_CHECK_MODULES([libstrophe], [libstrophe >= 0.10.0],
-        [LIBS="$libstrophe_LIBS $LIBS" CFLAGS="$CFLAGS $libstrophe_CFLAGS" XMPP_LIB="libstrophe" AC_DEFINE([HAVE_LIBSTROPHE], [1], [libstrophe])],
-        [XMPP_LIB=""])])
+### Check for libstrophe
+PKG_CHECK_MODULES([libstrophe], [libstrophe >= 0.10.0],
+    [LIBS="$libstrophe_LIBS $LIBS" CFLAGS="$CFLAGS $libstrophe_CFLAGS" XMPP_LIB="libstrophe" AC_DEFINE([HAVE_LIBSTROPHE], [1], [libstrophe])],
+    [XMPP_LIB=""])
 
 AC_MSG_CHECKING([whether ${XMPP_LIB} works])
 AC_LINK_IFELSE([AC_LANG_SOURCE([[
-    #ifdef HAVE_LIBMESODE
-    #include <mesode.h>
-    #else
     #include <strophe.h>
-    #endif
 
     int main() {
         xmpp_initialize();
diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c
index b8a103a7..c61b5c44 100644
--- a/src/command/cmd_funcs.c
+++ b/src/command/cmd_funcs.c
@@ -177,7 +177,6 @@ cmd_execute_connect(ProfWin* window, const char* const account)
 gboolean
 cmd_tls_certpath(ProfWin* window, const char* const command, gchar** args)
 {
-#ifdef HAVE_LIBMESODE
     if (g_strcmp0(args[1], "set") == 0) {
         if (args[2] == NULL) {
             cons_bad_cmd_usage(command);
@@ -212,16 +211,11 @@ cmd_tls_certpath(ProfWin* window, const char* const command, gchar** args)
         cons_bad_cmd_usage(command);
         return TRUE;
     }
-#else
-    cons_show("Certificate path setting only supported when built with libmesode.");
-    return TRUE;
-#endif
 }
 
 gboolean
 cmd_tls_trust(ProfWin* window, const char* const command, gchar** args)
 {
-#ifdef HAVE_LIBMESODE
     jabber_conn_status_t conn_status = connection_get_status();
     if (conn_status != JABBER_CONNECTED) {
         cons_show("You are currently not connected.");
@@ -245,16 +239,11 @@ cmd_tls_trust(ProfWin* window, const char* const command, gchar** args)
     tlscerts_add(cert);
     tlscerts_free(cert);
     return TRUE;
-#else
-    cons_show("Manual certificate trust only supported when built with libmesode.");
-    return TRUE;
-#endif
 }
 
 gboolean
 cmd_tls_trusted(ProfWin* window, const char* const command, gchar** args)
 {
-#ifdef HAVE_LIBMESODE
     GList* certs = tlscerts_list();
     GList* curr = certs;
 
@@ -272,16 +261,11 @@ cmd_tls_trusted(ProfWin* window, const char* const command, gchar** args)
     }
     g_list_free_full(certs, (GDestroyNotify)tlscerts_free);
     return TRUE;
-#else
-    cons_show("Manual certificate trust only supported when built with libmesode.");
-    return TRUE;
-#endif
 }
 
 gboolean
 cmd_tls_revoke(ProfWin* window, const char* const command, gchar** args)
 {
-#ifdef HAVE_LIBMESODE
     if (args[1] == NULL) {
         cons_bad_cmd_usage(command);
     } else {
@@ -293,16 +277,11 @@ cmd_tls_revoke(ProfWin* window, const char* const command, gchar** args)
         }
     }
     return TRUE;
-#else
-    cons_show("Manual certificate trust only supported when built with libmesode.");
-    return TRUE;
-#endif
 }
 
 gboolean
 cmd_tls_cert(ProfWin* window, const char* const command, gchar** args)
 {
-#ifdef HAVE_LIBMESODE
     if (args[1]) {
         TLSCertificate* cert = tlscerts_get_trusted(args[1]);
         if (!cert) {
@@ -332,10 +311,6 @@ cmd_tls_cert(ProfWin* window, const char* const command, gchar** args)
         tlscerts_free(cert);
         return TRUE;
     }
-#else
-    cons_show("Certificate fetching not supported.");
-    return TRUE;
-#endif
 }
 
 gboolean
diff --git a/src/main.c b/src/main.c
index 6ec9eff5..13871732 100644
--- a/src/main.c
+++ b/src/main.c
@@ -125,12 +125,7 @@ main(int argc, char** argv)
 
         g_print("Build information:\n");
 
-#ifdef HAVE_LIBMESODE
-        g_print("XMPP library: libmesode\n");
-#endif
-#ifdef HAVE_LIBSTROPHE
         g_print("XMPP library: libstrophe\n");
-#endif
 
         if (is_notify_enabled()) {
             g_print("Desktop notification support: Enabled\n");
diff --git a/src/xmpp/blocking.c b/src/xmpp/blocking.c
index 7c55b1bf..e68999d2 100644
--- a/src/xmpp/blocking.c
+++ b/src/xmpp/blocking.c
@@ -38,13 +38,7 @@
 #include <stdlib.h>
 #include <string.h>
 
-#ifdef HAVE_LIBMESODE
-#include <mesode.h>
-#endif
-
-#ifdef HAVE_LIBSTROPHE
 #include <strophe.h>
-#endif
 
 #include <glib.h>
 
diff --git a/src/xmpp/bookmark.c b/src/xmpp/bookmark.c
index 4e40e3ec..916c8195 100644
--- a/src/xmpp/bookmark.c
+++ b/src/xmpp/bookmark.c
@@ -41,13 +41,7 @@
 #include <string.h>
 #include <glib.h>
 
-#ifdef HAVE_LIBMESODE
-#include <mesode.h>
-#endif
-
-#ifdef HAVE_LIBSTROPHE
 #include <strophe.h>
-#endif
 
 #include "common.h"
 #include "log.h"
diff --git a/src/xmpp/capabilities.c b/src/xmpp/capabilities.c
index 98a5c399..638b2c90 100644
--- a/src/xmpp/capabilities.c
+++ b/src/xmpp/capabilities.c
@@ -45,13 +45,7 @@
 #include <glib.h>
 #include <glib/gstdio.h>
 
-#ifdef HAVE_LIBMESODE
-#include <mesode.h>
-#endif
-
-#ifdef HAVE_LIBSTROPHE
 #include <strophe.h>
-#endif
 
 #include "common.h"
 #include "log.h"
diff --git a/src/xmpp/capabilities.h b/src/xmpp/capabilities.h
index 0760f7d7..bbc1cf8e 100644
--- a/src/xmpp/capabilities.h
+++ b/src/xmpp/capabilities.h
@@ -38,13 +38,7 @@
 
 #include "config.h"
 
-#ifdef HAVE_LIBMESODE
-#include <mesode.h>
-#endif
-
-#ifdef HAVE_LIBSTROPHE
 #include <strophe.h>
-#endif
 
 #include "xmpp/xmpp.h"
 
diff --git a/src/xmpp/connection.c b/src/xmpp/connection.c
index 5570fb1a..90f25260 100644
--- a/src/xmpp/connection.c
+++ b/src/xmpp/connection.c
@@ -43,13 +43,7 @@
 #include <glib.h>
 #include <glib/gstdio.h>
 
-#ifdef HAVE_LIBMESODE
-#include <mesode.h>
-#endif
-
-#ifdef HAVE_LIBSTROPHE
 #include <strophe.h>
-#endif
 
 #include "common.h"
 #include "log.h"
diff --git a/src/xmpp/form.c b/src/xmpp/form.c
index dc8c583c..5290c83f 100644
--- a/src/xmpp/form.c
+++ b/src/xmpp/form.c
@@ -38,13 +38,7 @@
 #include <string.h>
 #include <stdlib.h>
 
-#ifdef HAVE_LIBMESODE
-#include <mesode.h>
-#endif
-
-#ifdef HAVE_LIBSTROPHE
 #include <strophe.h>
-#endif
 
 #include <glib.h>
 
diff --git a/src/xmpp/form.h b/src/xmpp/form.h
index b305addf..73a3d6c7 100644
--- a/src/xmpp/form.h
+++ b/src/xmpp/form.h
@@ -36,13 +36,7 @@
 #ifndef XMPP_FORM_H
 #define XMPP_FORM_H
 
-#ifdef HAVE_LIBMESODE
-#include <mesode.h>
-#endif
-
-#ifdef HAVE_LIBSTROPHE
 #include <strophe.h>
-#endif
 
 #include "xmpp/xmpp.h"
 
diff --git a/src/xmpp/iq.c b/src/xmpp/iq.c
index dd3c2423..ebc052fc 100644
--- a/src/xmpp/iq.c
+++ b/src/xmpp/iq.c
@@ -44,13 +44,7 @@
 #include <stdio.h>
 #include <glib.h>
 
-#ifdef HAVE_LIBMESODE
-#include <mesode.h>
-#endif
-
-#ifdef HAVE_LIBSTROPHE
 #include <strophe.h>
-#endif
 
 #include "profanity.h"
 #include "log.h"
diff --git a/src/xmpp/message.c b/src/xmpp/message.c
index 051d1ece..1a964846 100644
--- a/src/xmpp/message.c
+++ b/src/xmpp/message.c
@@ -39,13 +39,7 @@
 #include <stdlib.h>
 #include <string.h>
 
-#ifdef HAVE_LIBMESODE
-#include <mesode.h>
-#endif
-
-#ifdef HAVE_LIBSTROPHE
 #include <strophe.h>
-#endif
 
 #include "profanity.h"
 #include "log.h"
diff --git a/src/xmpp/presence.c b/src/xmpp/presence.c
index 2982274d..a9b07daa 100644
--- a/src/xmpp/presence.c
+++ b/src/xmpp/presence.c
@@ -42,13 +42,7 @@
 #include <glib.h>
 #include <glib/gprintf.h>
 
-#ifdef HAVE_LIBMESODE
-#include <mesode.h>
-#endif
-
-#ifdef HAVE_LIBSTROPHE
 #include <strophe.h>
-#endif
 
 #include "profanity.h"
 #include "log.h"
diff --git a/src/xmpp/roster.c b/src/xmpp/roster.c
index 2b5a1696..fd7ceecf 100644
--- a/src/xmpp/roster.c
+++ b/src/xmpp/roster.c
@@ -41,13 +41,7 @@
 
 #include <glib.h>
 
-#ifdef HAVE_LIBMESODE
-#include <mesode.h>
-#endif
-
-#ifdef HAVE_LIBSTROPHE
 #include <strophe.h>
-#endif
 
 #include "profanity.h"
 #include "log.h"
diff --git a/src/xmpp/stanza.c b/src/xmpp/stanza.c
index 3a1cb4a5..d28ed3d2 100644
--- a/src/xmpp/stanza.c
+++ b/src/xmpp/stanza.c
@@ -48,13 +48,7 @@
 
 #include <glib.h>
 
-#ifdef HAVE_LIBMESODE
-#include <mesode.h>
-#endif
-
-#ifdef HAVE_LIBSTROPHE
 #include <strophe.h>
-#endif
 
 #include "common.h"
 #include "log.h"
diff --git a/src/xmpp/stanza.h b/src/xmpp/stanza.h
index bd61f2f4..e2c22bd8 100644
--- a/src/xmpp/stanza.h
+++ b/src/xmpp/stanza.h
@@ -38,13 +38,7 @@
 
 #include "config.h"
 
-#ifdef HAVE_LIBMESODE
-#include <mesode.h>
-#endif
-
-#ifdef HAVE_LIBSTROPHE
 #include <strophe.h>
-#endif
 
 #include <xmpp/xmpp.h>
 
diff --git a/src/xmpp/xmpp.h b/src/xmpp/xmpp.h
index bb561080..2b3ca5f4 100644
--- a/src/xmpp/xmpp.h
+++ b/src/xmpp/xmpp.h
@@ -40,13 +40,7 @@
 
 #include "config.h"
 
-#ifdef HAVE_LIBMESODE
-#include <mesode.h>
-#endif
-
-#ifdef HAVE_LIBSTROPHE
 #include <strophe.h>
-#endif
 
 #include "config/accounts.h"
 #include "config/tlscerts.h"