Skip to content

Commit

Permalink
Separate carbon metadata and function prototypes in headers (#33)
Browse files Browse the repository at this point in the history
This is needed to successfully build dependent projects such as Lurch4Adium
  • Loading branch information
shtrom authored Dec 25, 2020
1 parent 7106144 commit f299fac
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 14 deletions.
1 change: 1 addition & 0 deletions src/carbons.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "iq.h"

#include "carbons.h"
#include "carbons_internal.h"

#define JABBER_PROTOCOL_ID "prpl-jabber"

Expand Down
13 changes: 0 additions & 13 deletions src/carbons.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,4 @@
# define CARBONS_VERSION "0.2.3-dev"
# define CARBONS_AUTHOR "Richard Bayerle <[email protected]>"

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 */
17 changes: 17 additions & 0 deletions src/carbons_internal.h
Original file line number Diff line number Diff line change
@@ -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_INTERNAL_H */
3 changes: 2 additions & 1 deletion test/test_carbons.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "jabber.h"

#include "../src/carbons.h"
#include "../src/carbons_internal.h"
#include "mocks.c"

/**
Expand Down Expand Up @@ -898,4 +899,4 @@ int main(void) {
};

return cmocka_run_group_tests(tests, NULL, NULL);
}
}

0 comments on commit f299fac

Please sign in to comment.