mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-13 21:15:11 +00:00
[MOD/WIP] Kill off the stanza sending function
The stanza sender is dead. All hail the Stanza Builder.
This commit is contained in:
parent
f6b0d741d5
commit
ffc0679493
8 changed files with 379 additions and 184 deletions
22
src/include/StanzaBuilder.h
Normal file
22
src/include/StanzaBuilder.h
Normal 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
|
||||
|
|
@ -34,8 +34,6 @@ extern bool XMPPJoinMUC(XMPPComponent *comp, char *fr, char *muc);
|
|||
extern void XMPPLeaveMUC(XMPPComponent *comp, char *fr, char *muc, char *r);
|
||||
|
||||
/* TODO: XMPP stuff, I don't fucking know, I'm not a Jabbernerd. */
|
||||
extern void XMPPSendPlain(XMPPComponent *comp, char *fr, char *to, char *msg, char *type, char *rst, char *rse, char *event_id, char *oob, char *id);
|
||||
extern void XMPPSendPlainID(XMPPComponent *comp, char *fr, char *to, char *msg, char *type, char *rst, char *rse, char *event_id, char *oob, char *id, char *sid);
|
||||
extern void XMPPRetract(XMPPComponent *comp, char *fr, char *to, char *type, char *redact);
|
||||
|
||||
/* Finishes a component stream, and doesn't free it. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue