Moved more functions to stanza module

This commit is contained in:
James Booth
2015-05-15 00:12:47 +01:00
parent c6fe602fd8
commit debac69cbb
4 changed files with 32 additions and 22 deletions

View File

@@ -3,8 +3,10 @@
#include "server/stanza.h"
static GList *stanzas;
void
show_stanza(XMPPStanza *stanza)
stanza_show(XMPPStanza *stanza)
{
printf("NAME : %s\n", stanza->name);
@@ -27,8 +29,26 @@ show_stanza(XMPPStanza *stanza)
GList *curr_child = stanza->children;
while (curr_child) {
XMPPStanza *child = curr_child->data;
show_stanza(child);
stanza_show(child);
curr_child = g_list_next(curr_child);
}
}
}
void
stanza_show_all(void)
{
GList *curr = stanzas;
while (curr) {
XMPPStanza *stanza = curr->data;
stanza_show(stanza);
printf("\n");
curr = g_list_next(curr);
}
}
void
stanza_add(XMPPStanza *stanza)
{
stanzas = g_list_append(stanzas, stanza);
}