mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-13 16:45:10 +00:00
[ADD/WIP] Matrix<->XMPP DMs.
There is still this fun issue with the blocking XML parser leaking memory on pthread_cancel, I'll try to deal with that later, maybe with a test stanza. I also apologise for swearing in the last commit. I promise it won't happen again, Prosody.
This commit is contained in:
parent
bdb4fd2f68
commit
2cc4b0ed17
11 changed files with 325 additions and 63 deletions
|
|
@ -62,10 +62,7 @@ extern void ParseeConfigFree(void);
|
|||
extern ParseeData * ParseeInitData(XMPPComponent *);
|
||||
extern void ParseeFreeData(ParseeData *);
|
||||
|
||||
/* HTTP server handler for Parsee, takes in a config. */
|
||||
extern void ParseeRequest(HttpServerContext *, void *);
|
||||
|
||||
extern HttpClientContext * ParseeCreateRequest(ParseeConfig *, HttpRequestMethod, char *);
|
||||
extern HttpClientContext * ParseeCreateRequest(const ParseeConfig *, HttpRequestMethod, char *);
|
||||
|
||||
/* Sends headers, and writes the JSON object. */
|
||||
extern HttpStatus ParseeSetRequestJSON(HttpClientContext *, HashMap *);
|
||||
|
|
@ -79,9 +76,36 @@ extern bool ParseeIsPuppet(const ParseeConfig *, char *);
|
|||
/* Decodes a local JID for a user into a string. */
|
||||
extern char * ParseeDecodeLocalJID(const ParseeConfig *, char *);
|
||||
|
||||
/* Encodes a JID into a Parsee localpart */
|
||||
extern char * ParseeEncodeJID(const ParseeConfig *, char *);
|
||||
|
||||
/* Gets the localpart of a MXID */
|
||||
extern char * ParseeGetLocal(char *);
|
||||
|
||||
/* Encodes an MXID to a valid Jabber ID head */
|
||||
extern char * ParseeEncodeMXID(char *);
|
||||
|
||||
/* Decodes a Jabber ID head into a valid MXID */
|
||||
extern char * ParseeDecodeMXID(char *);
|
||||
|
||||
|
||||
/* HTTP server handler for Parsee, takes in a config. */
|
||||
extern void ParseeRequest(HttpServerContext *, void *);
|
||||
|
||||
/* A pthread callback used for listening to a component */
|
||||
extern void * ParseeXMPPThread(void *data);
|
||||
|
||||
|
||||
/* Finds the room a DM is associated to, from a Matrix user and a Jabber
|
||||
* ID. */
|
||||
extern char * ParseeFindDMRoom(ParseeData *data, char *mxid, char *jid);
|
||||
|
||||
/* Gets a DM ID from a Matrix and Jabber user */
|
||||
extern char * ParseeGetDMID(char *mxid, char *jid);
|
||||
|
||||
/* Creates a DM mapping in the database */
|
||||
extern void ParseePushDMRoom(ParseeData *, char *mxid, char *jid, char *r);
|
||||
|
||||
/* Trims the component from a JID */
|
||||
extern char * ParseeTrimJID(char *jid);
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue