mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-13 18:25:10 +00:00
[ADD] Add basic Matrix ID parser
This commit is contained in:
parent
fb511b4df0
commit
8042ccc0cc
8 changed files with 70 additions and 15 deletions
|
|
@ -3,6 +3,21 @@
|
|||
|
||||
#include <Cytoplasm/Json.h>
|
||||
|
||||
/* A simple representation of everything. It is not as complex as
|
||||
* Telodendria's CommonID parser, simply because Parsee does not
|
||||
* need such complexity. */
|
||||
typedef struct UserID {
|
||||
/* We're being extra leinent. */
|
||||
char localpart[256];
|
||||
char server[256];
|
||||
} UserID;
|
||||
|
||||
/** Parses a Matrix user ID, with no attention to detail.
|
||||
* -----------
|
||||
* Returns: a valid user ID[HEAP] | NULL
|
||||
* Thrasher: Free */
|
||||
extern UserID * MatrixParseID(char *user);
|
||||
|
||||
/* Creates an error message JSON, with the specified code and message. */
|
||||
extern HashMap * MatrixCreateError(char *err, char *msg);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue