diff options
| author | Patrick | 2023-05-28 15:07:34 +0200 |
|---|---|---|
| committer | Patrick | 2023-05-28 15:07:34 +0200 |
| commit | 5cb22046a33f24c1a696990f95e13d534efef497 (patch) | |
| tree | a2c3c1baa74b61c72c8bb3514ff694e2f65bc105 /src/matrix.h | |
| parent | 27a83e93114c31de4b7bd33320a85e5fad0196a3 (diff) | |
| download | matrix_esp_thesis-5cb22046a33f24c1a696990f95e13d534efef497.tar.gz matrix_esp_thesis-5cb22046a33f24c1a696990f95e13d534efef497.zip | |
mongoose as http client
Diffstat (limited to 'src/matrix.h')
| -rw-r--r-- | src/matrix.h | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/src/matrix.h b/src/matrix.h index d37474f..b7f3a5b 100644 --- a/src/matrix.h +++ b/src/matrix.h @@ -18,36 +18,49 @@ typedef struct MatrixClient {
- void * httpUserData;
OlmAccount * olmAccount;
OlmSession * olmSession;
+
char server[SERVER_SIZE]; int serverLen;
char accessTokenBuffer[ACCESS_TOKEN_SIZE]; int accessTokenLen;
char deviceIdBuffer[DEVICE_ID_SIZE]; int deviceIdLen;
char expireMsBuffer[EXPIRE_MS_SIZE]; int expireMsLen;
char refreshTokenBuffer[REFRESH_TOKEN_SIZE]; int refreshTokenLen;
+
+ void * httpUserData;
} MatrixClient;
bool
MatrixClientInit(
MatrixClient * client,
- char * server, int serverLen
-);
+ char * server, int serverLen);
bool
MatrixClientLoginPassword(
MatrixClient * client,
char * username, int usernameLen,
char * password, int passwordLen,
- char * displayName, int displayNameLen
-);
+ char * displayName, int displayNameLen);
+
+bool
+MatrixHttpInit(
+ MatrixClient * client);
+
+bool
+MatrixHttpDeinit(
+ MatrixClient * client);
+
+bool
+MatrixHttpGet(
+ MatrixClient * client,
+ const char * url,
+ char * outResponseBuffer, int outResponseCap, int * outResponseLen);
bool
MatrixHttpPost(
MatrixClient * client,
const char * url,
char * requestBuffer, int requestLen,
- char * outResponseBuffer, int outResponseCap, int * outResponseLen
-);
+ char * outResponseBuffer, int outResponseCap, int * outResponseLen);
#endif
|
