Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate carbon metadata and function prototypes in headers #33

Merged
merged 3 commits into from
Dec 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.2"
# 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);
}
}