]> gitweb.ps.run Git - matrix_esp_thesis/blob - src/matrix.h
refactor fixedbuffer, add mjson
[matrix_esp_thesis] / src / matrix.h
1 #ifndef MATRIX__H\r
2 #define MATRIX__H\r
3 \r
4 #include <stdbool.h>\r
5 #include <string.h>\r
6 \r
7 #include <olm/olm.h>\r
8 \r
9 #include "fixedbuffer.h"\r
10 \r
11 \r
12 \r
13 #define ACCESS_TOKEN_LEN 20 // TODO: fix\r
14 \r
15 typedef struct MatrixClient {\r
16     OlmAccount * olmAcc;\r
17     char accessToken[ACCESS_TOKEN_LEN];\r
18 } MatrixClient;\r
19 \r
20 bool\r
21 MatrixClientInit(\r
22     MatrixClient * client,\r
23     FixedBuffer server\r
24 );\r
25 \r
26 bool\r
27 MatrixClientLoginPassword(\r
28     MatrixClient * client,\r
29     FixedBuffer username,\r
30     FixedBuffer password\r
31 );\r
32 \r
33 bool\r
34 MatrixClientGetAccessToken(\r
35     MatrixClient * client,\r
36     FixedBuffer * outBuffer\r
37 );\r
38 \r
39 #endif\r