mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-13 21:15:11 +00:00
[MOD] One-way Matrix->XMPP comms.
This is not sanitised. I need to make an XML writer.
This commit is contained in:
parent
868f0e4d9c
commit
bdb4fd2f68
17 changed files with 421 additions and 61 deletions
|
|
@ -3,17 +3,26 @@
|
|||
|
||||
#include <Cytoplasm/Stream.h>
|
||||
|
||||
typedef struct XMPPComponent {
|
||||
char *host;
|
||||
Stream *stream;
|
||||
} XMPPComponent;
|
||||
|
||||
/* Initialises a raw component stream to host, with an optional port.
|
||||
* If said port is 0, then it is set to the default Prosody port */
|
||||
extern Stream * XMPPInitialiseCompStream(char *host, int port);
|
||||
extern XMPPComponent * XMPPInitialiseCompStream(char *host, int port);
|
||||
|
||||
/* Authenticates a component stream with a given shared secret,
|
||||
* with a stream ID from the server. This should be called right
|
||||
* after XMPPInitialiseCompStream. */
|
||||
extern bool XMPPAuthenticateCompStream(Stream *stream, char *as, char *shared);
|
||||
extern bool XMPPAuthenticateCompStream(XMPPComponent *comp, char *shared);
|
||||
|
||||
/* Sends a presence to a user */
|
||||
extern void XMPPSendPresence(XMPPComponent *comp, char *fr, char *to);
|
||||
|
||||
/* TODO: XMPP stuff, I don't fucking know, I'm not a Jabbernerd. */
|
||||
extern void XMPPSendPlain(XMPPComponent *c, char *f, char *t, char *m, char *type);
|
||||
|
||||
/* Closes a raw component stream. */
|
||||
extern void XMPPEndCompStream(Stream *stream);
|
||||
extern void XMPPEndCompStream(XMPPComponent *stream);
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue