From c7db078615a64c8c625487f91098a46fe4c53c9b Mon Sep 17 00:00:00 2001 From: Olivier Mehani Date: Wed, 29 May 2019 11:15:31 +1000 Subject: [PATCH 1/3] Separate carbon metadata and function prototypes in headers This is needed to successfully build dependent projects such as Lurch4Adium Signed-off-by: Olivier Mehani --- src/carbons.c | 1 + src/carbons.h | 13 ------------- src/carbons_int.h | 17 +++++++++++++++++ test/test_carbons.c | 3 ++- 4 files changed, 20 insertions(+), 14 deletions(-) create mode 100644 src/carbons_int.h diff --git a/src/carbons.c b/src/carbons.c index c182ad0..6a5de42 100644 --- a/src/carbons.c +++ b/src/carbons.c @@ -27,6 +27,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "iq.h" #include "carbons.h" +#include "carbons_int.h" #define JABBER_PROTOCOL_ID "prpl-jabber" diff --git a/src/carbons.h b/src/carbons.h index 4e3265e..69be605 100644 --- a/src/carbons.h +++ b/src/carbons.h @@ -4,17 +4,4 @@ # define CARBONS_VERSION "0.2.2" # define CARBONS_AUTHOR "Richard Bayerle " -void carbons_xml_received_cb(PurpleConnection * gc_p, xmlnode ** stanza_pp); -void carbons_xml_stripped_cb(PurpleConnection * gc_p, xmlnode ** stanza_pp); -void carbons_discover(PurpleAccount * acc_p); -void carbons_discover_cb(JabberStream * js_p, const char * from, - JabberIqType type, const char * id, - xmlnode * packet_p, gpointer data_p); -void carbons_enable_cb(JabberStream * js_p, const char * from, - JabberIqType type, const char * id, - xmlnode * packet_p, gpointer data_p); - -void carbons_account_connect_cb(PurpleAccount * acc_p); -gboolean carbons_plugin_load(PurplePlugin * plugin_p); - #endif /* __CARBONS_H */ diff --git a/src/carbons_int.h b/src/carbons_int.h new file mode 100644 index 0000000..eb00161 --- /dev/null +++ b/src/carbons_int.h @@ -0,0 +1,17 @@ +#ifndef __CARBONS_INT_H +# define __CARBONS_INT_H + +void carbons_xml_received_cb(PurpleConnection * gc_p, xmlnode ** stanza_pp); +void carbons_xml_stripped_cb(PurpleConnection * gc_p, xmlnode ** stanza_pp); +void carbons_discover(PurpleAccount * acc_p); +void carbons_discover_cb(JabberStream * js_p, const char * from, + JabberIqType type, const char * id, + xmlnode * packet_p, gpointer data_p); +void carbons_enable_cb(JabberStream * js_p, const char * from, + JabberIqType type, const char * id, + xmlnode * packet_p, gpointer data_p); + +void carbons_account_connect_cb(PurpleAccount * acc_p); +gboolean carbons_plugin_load(PurplePlugin * plugin_p); + +#endif /* __CARBONS_INT_H */ diff --git a/test/test_carbons.c b/test/test_carbons.c index 2e615b1..1e61315 100644 --- a/test/test_carbons.c +++ b/test/test_carbons.c @@ -6,6 +6,7 @@ #include "jabber.h" #include "../src/carbons.h" +#include "../src/carbons_int.h" #include "mocks.c" /** @@ -898,4 +899,4 @@ int main(void) { }; return cmocka_run_group_tests(tests, NULL, NULL); -} \ No newline at end of file +} From 38751dc6f701695e35a9a3b3995ea2e2e881a317 Mon Sep 17 00:00:00 2001 From: Olivier Mehani Date: Wed, 9 Dec 2020 15:45:30 +1100 Subject: [PATCH 2/3] fixup! Separate carbon metadata and function prototypes in headers --- src/carbons.c | 2 +- src/{carbons_int.h => carbons_internal.h} | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename src/{carbons_int.h => carbons_internal.h} (96%) diff --git a/src/carbons.c b/src/carbons.c index 6a5de42..95c5392 100644 --- a/src/carbons.c +++ b/src/carbons.c @@ -27,7 +27,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "iq.h" #include "carbons.h" -#include "carbons_int.h" +#include "carbons_internal.h" #define JABBER_PROTOCOL_ID "prpl-jabber" diff --git a/src/carbons_int.h b/src/carbons_internal.h similarity index 96% rename from src/carbons_int.h rename to src/carbons_internal.h index eb00161..413af91 100644 --- a/src/carbons_int.h +++ b/src/carbons_internal.h @@ -14,4 +14,4 @@ void carbons_enable_cb(JabberStream * js_p, const char * from, void carbons_account_connect_cb(PurpleAccount * acc_p); gboolean carbons_plugin_load(PurplePlugin * plugin_p); -#endif /* __CARBONS_INT_H */ +#endif /* CARBONS_INTERNAL_H */ From 7d73c20a613357932c1cc2ba50858ce889b14b59 Mon Sep 17 00:00:00 2001 From: Olivier Mehani Date: Wed, 23 Dec 2020 16:52:57 +1100 Subject: [PATCH 3/3] fixup! fixup! Separate carbon metadata and function prototypes in headers --- test/test_carbons.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_carbons.c b/test/test_carbons.c index 1e61315..dc98ff0 100644 --- a/test/test_carbons.c +++ b/test/test_carbons.c @@ -6,7 +6,7 @@ #include "jabber.h" #include "../src/carbons.h" -#include "../src/carbons_int.h" +#include "../src/carbons_internal.h" #include "mocks.c" /**