xmppipe_send: move internal functions

master
Michael Santos 5 years ago
parent 31d6a03bfc
commit ad1bf58c55

@ -128,8 +128,6 @@ void xmppipe_muc_subject(xmppipe_state_t *, char *);
void xmppipe_muc_unlock(xmppipe_state_t *);
void xmppipe_send_stanza(xmppipe_state_t *, char *, size_t);
void xmppipe_send_stanza_fmt(xmppipe_state_t *state, char *buf, size_t len);
void xmppipe_send_message(xmppipe_state_t *, char *, char *, char *, size_t);
void xmppipe_send(xmppipe_state_t *, xmpp_stanza_t *const);
int xmppipe_fmt_init(void);

@ -14,11 +14,17 @@
*/
#include "xmppipe.h"
void xmppipe_send_oob(xmppipe_state_t *state, char *to, char *type, char *buf,
size_t len);
static void xmppipe_send_stanza_fmt(xmppipe_state_t *state, char *buf,
size_t len);
void xmppipe_send_http_upload(xmppipe_state_t *state, char *to, char *type,
char *buf, size_t len);
static void xmppipe_send_message(xmppipe_state_t *state, char *to, char *type,
char *buf, size_t len);
static void xmppipe_send_oob(xmppipe_state_t *state, char *to, char *type,
char *buf, size_t len);
static void xmppipe_send_http_upload(xmppipe_state_t *state, char *to,
char *type, char *buf, size_t len);
void xmppipe_send_stanza(xmppipe_state_t *state, char *buf, size_t len) {
switch (state->format) {
@ -40,7 +46,8 @@ void xmppipe_send_stanza(xmppipe_state_t *state, char *buf, size_t len) {
}
}
void xmppipe_send_stanza_fmt(xmppipe_state_t *state, char *buf, size_t len) {
static void xmppipe_send_stanza_fmt(xmppipe_state_t *state, char *buf,
size_t len) {
char *to = NULL;
char *type = NULL;
char *default_type;
@ -155,8 +162,8 @@ XMPPIPE_DONE:
free(body);
}
void xmppipe_send_message(xmppipe_state_t *state, char *to, char *type,
char *buf, size_t len) {
static void xmppipe_send_message(xmppipe_state_t *state, char *to, char *type,
char *buf, size_t len) {
xmpp_stanza_t *message = NULL;
char *id = NULL;
@ -184,8 +191,8 @@ void xmppipe_send_message(xmppipe_state_t *state, char *to, char *type,
xmpp_free(state->ctx, id);
}
void xmppipe_send_oob(xmppipe_state_t *state, char *to, char *type, char *buf,
size_t len) {
static void xmppipe_send_oob(xmppipe_state_t *state, char *to, char *type,
char *buf, size_t len) {
xmpp_stanza_t *message;
xmpp_stanza_t *x;
xmpp_stanza_t *url;
@ -224,8 +231,8 @@ void xmppipe_send_oob(xmppipe_state_t *state, char *to, char *type, char *buf,
xmpp_free(state->ctx, id);
}
void xmppipe_send_http_upload(xmppipe_state_t *state, char *to, char *type,
char *buf, size_t len) {
static void xmppipe_send_http_upload(xmppipe_state_t *state, char *to,
char *type, char *buf, size_t len) {
xmpp_stanza_t *iq;
xmpp_stanza_t *request;
char *id;

Loading…
Cancel
Save