[MOD/WIP] Kill off the stanza sending function

The stanza sender is dead. All hail the Stanza Builder.
This commit is contained in:
LDA 2024-08-13 20:24:32 +02:00
commit ffc0679493
8 changed files with 379 additions and 184 deletions

View file

@ -0,0 +1,22 @@
#ifndef PARSEE_STANZABUILDER_H
#define PARSEE_STANZABUILDER_H
#include <XMPP.h>
#include <XML.h>
typedef struct StanzaBuilder StanzaBuilder;
extern StanzaBuilder * CreateStanzaBuilder(char *from, char *to, char *id);
extern StanzaBuilder * SetStanzaType(StanzaBuilder *builder, char *type);
extern StanzaBuilder * SetStanzaBody(StanzaBuilder *builder, char *body);
extern StanzaBuilder * SetStanzaReply(StanzaBuilder *builder, char *st, char *se);
extern StanzaBuilder * SetStanzaEdit(StanzaBuilder *builder, char *to);
extern StanzaBuilder * SetStanzaLink(StanzaBuilder *builder, char *oob);
extern StanzaBuilder * SetStanzaID(StanzaBuilder *builder, char *id);
extern StanzaBuilder * SetStanzaXParsee(StanzaBuilder *builder, HashMap *e);
extern StanzaBuilder * AddStanzaElem(StanzaBuilder *builder, XMLElement *item);
extern XMLElement * ExportStanza(StanzaBuilder *builder);
extern void WriteoutStanza(StanzaBuilder *builder, XMPPComponent *jabber);
extern void DestroyStanzaBuilder(StanzaBuilder *builder);
#endif