From 2b88e2f1bffca2800b521214df6009da673a0835 Mon Sep 17 00:00:00 2001 From: James Booth Date: Mon, 21 Sep 2015 21:40:04 +0100 Subject: Check for libmesode, fall back to libstrophe --- src/xmpp/bookmark.c | 10 +++++++++- src/xmpp/capabilities.c | 8 +++++++- src/xmpp/capabilities.h | 7 +++++++ src/xmpp/connection.c | 7 +++++++ src/xmpp/connection.h | 7 +++++++ src/xmpp/form.c | 10 +++++++++- src/xmpp/iq.c | 6 ++++++ src/xmpp/message.c | 7 +++++++ src/xmpp/presence.c | 9 +++++++++ src/xmpp/roster.c | 8 ++++++++ src/xmpp/stanza.c | 8 ++++++++ src/xmpp/stanza.h | 8 ++++++++ src/xmpp/xmpp.h | 7 +++++++ 13 files changed, 99 insertions(+), 3 deletions(-) (limited to 'src/xmpp') diff --git a/src/xmpp/bookmark.c b/src/xmpp/bookmark.c index 68e66569..3705d699 100644 --- a/src/xmpp/bookmark.c +++ b/src/xmpp/bookmark.c @@ -32,12 +32,20 @@ * */ +#include "config.h" + #include #include #include #include #include + +#ifdef HAVE_LIBMESODE +#include +#endif +#ifdef HAVE_LIBSTROPHE #include +#endif #include "common.h" #include "log.h" @@ -468,4 +476,4 @@ _send_bookmarks(void) xmpp_send(conn, iq); xmpp_stanza_release(iq); -} \ No newline at end of file +} diff --git a/src/xmpp/capabilities.c b/src/xmpp/capabilities.c index 15d64e8a..adaea383 100644 --- a/src/xmpp/capabilities.c +++ b/src/xmpp/capabilities.c @@ -43,7 +43,13 @@ #include #include + +#ifdef HAVE_LIBMESODE +#include +#endif +#ifdef HAVE_LIBSTROPHE #include +#endif #include "common.h" #include "log.h" @@ -683,4 +689,4 @@ _save_cache(void) g_file_set_contents(cache_loc, g_cache_data, g_data_size, NULL); g_chmod(cache_loc, S_IRUSR | S_IWUSR); g_free(g_cache_data); -} \ No newline at end of file +} diff --git a/src/xmpp/capabilities.h b/src/xmpp/capabilities.h index 85f1d989..3e281d1c 100644 --- a/src/xmpp/capabilities.h +++ b/src/xmpp/capabilities.h @@ -35,7 +35,14 @@ #ifndef XMPP_CAPABILITIES_H #define XMPP_CAPABILITIES_H +#include "config.h" + +#ifdef HAVE_LIBMESODE +#include +#endif +#ifdef HAVE_LIBSTROPHE #include +#endif #include "xmpp/xmpp.h" diff --git a/src/xmpp/connection.c b/src/xmpp/connection.c index 3c9ba214..6f9de18d 100644 --- a/src/xmpp/connection.c +++ b/src/xmpp/connection.c @@ -32,11 +32,18 @@ * */ +#include "config.h" + #include #include #include +#ifdef HAVE_LIBMESODE +#include +#endif +#ifdef HAVE_LIBSTROPHE #include +#endif #include "chat_session.h" #include "common.h" diff --git a/src/xmpp/connection.h b/src/xmpp/connection.h index 63f7cde0..705dd129 100644 --- a/src/xmpp/connection.h +++ b/src/xmpp/connection.h @@ -35,7 +35,14 @@ #ifndef XMPP_CONNECTION_H #define XMPP_CONNECTION_H +#include "config.h" + +#ifdef HAVE_LIBMESODE +#include +#endif +#ifdef HAVE_LIBSTROPHE #include +#endif #include "resource.h" diff --git a/src/xmpp/form.c b/src/xmpp/form.c index e6213b64..fdec2a49 100644 --- a/src/xmpp/form.c +++ b/src/xmpp/form.c @@ -32,10 +32,18 @@ * */ +#include "config.h" + #include #include +#ifdef HAVE_LIBMESODE +#include +#endif +#ifdef HAVE_LIBSTROPHE #include +#endif + #include #include "log.h" @@ -714,4 +722,4 @@ form_reset_autocompleters(DataForm *form) autocomplete_reset(field->value_ac); curr_field = g_slist_next(curr_field); } -} \ No newline at end of file +} diff --git a/src/xmpp/iq.c b/src/xmpp/iq.c index 496e9caa..7b57c1af 100644 --- a/src/xmpp/iq.c +++ b/src/xmpp/iq.c @@ -42,7 +42,13 @@ #include #include + +#ifdef HAVE_LIBMESODE +#include +#endif +#ifdef HAVE_LIBSTROPHE #include +#endif #include "log.h" #include "muc.h" diff --git a/src/xmpp/message.c b/src/xmpp/message.c index 5581521c..ad75735b 100644 --- a/src/xmpp/message.c +++ b/src/xmpp/message.c @@ -32,10 +32,17 @@ * */ +#include "config.h" + #include #include +#ifdef HAVE_LIBMESODE +#include +#endif +#ifdef HAVE_LIBSTROPHE #include +#endif #include "chat_session.h" #include "config/preferences.h" diff --git a/src/xmpp/presence.c b/src/xmpp/presence.c index 42215322..ff34cc50 100644 --- a/src/xmpp/presence.c +++ b/src/xmpp/presence.c @@ -32,6 +32,8 @@ * */ +#include "config.h" + #include #include #include @@ -39,6 +41,13 @@ #include #include +#ifdef HAVE_LIBMESODE +#include +#endif +#ifdef HAVE_LIBSTROPHE +#include +#endif + #include "common.h" #include "config/preferences.h" #include "log.h" diff --git a/src/xmpp/roster.c b/src/xmpp/roster.c index 84a88d62..55695d75 100644 --- a/src/xmpp/roster.c +++ b/src/xmpp/roster.c @@ -32,12 +32,20 @@ * */ +#include "config.h" + #include #include #include #include + +#ifdef HAVE_LIBMESODE +#include +#endif +#ifdef HAVE_LIBSTROPHE #include +#endif #include "log.h" #include "profanity.h" diff --git a/src/xmpp/stanza.c b/src/xmpp/stanza.c index acee97fb..68ace83c 100644 --- a/src/xmpp/stanza.c +++ b/src/xmpp/stanza.c @@ -32,11 +32,19 @@ * */ +#include "config.h" + #include #include #include + +#ifdef HAVE_LIBMESODE +#include +#endif +#ifdef HAVE_LIBSTROPHE #include +#endif #include "common.h" #include "log.h" diff --git a/src/xmpp/stanza.h b/src/xmpp/stanza.h index 8cae0dc3..dbb09ab3 100644 --- a/src/xmpp/stanza.h +++ b/src/xmpp/stanza.h @@ -35,7 +35,15 @@ #ifndef XMPP_STANZA_H #define XMPP_STANZA_H +#include "config.h" + +#ifdef HAVE_LIBMESODE +#include +#endif +#ifdef HAVE_LIBSTROPHE #include +#endif + #include #define STANZA_NAME_ACTIVE "active" diff --git a/src/xmpp/xmpp.h b/src/xmpp/xmpp.h index 575f9ae1..5c5fa3ef 100644 --- a/src/xmpp/xmpp.h +++ b/src/xmpp/xmpp.h @@ -35,7 +35,14 @@ #ifndef XMPP_XMPP_H #define XMPP_XMPP_H +#include "config.h" + +#ifdef HAVE_LIBMESODE +#include +#endif +#ifdef HAVE_LIBSTROPHE #include +#endif #include "config/accounts.h" #include "contact.h" -- cgit 1.4.1-2-gfad0