]> gitweb.ps.run Git - matrix_esp_thesis/blobdiff - src/matrix.h
mongoose as http client
[matrix_esp_thesis] / src / matrix.h
index d37474f3017899ce4579e768d5f4cc918939aae8..b7f3a5ba2f91a7c318ce2b47f434b2f91c6a3ba2 100644 (file)
 \r
 \r
 typedef struct MatrixClient {\r
 \r
 \r
 typedef struct MatrixClient {\r
-    void * httpUserData;\r
     OlmAccount * olmAccount;\r
     OlmSession * olmSession;\r
     OlmAccount * olmAccount;\r
     OlmSession * olmSession;\r
+    \r
     char server[SERVER_SIZE]; int serverLen;\r
     char accessTokenBuffer[ACCESS_TOKEN_SIZE]; int accessTokenLen;\r
     char deviceIdBuffer[DEVICE_ID_SIZE]; int deviceIdLen;\r
     char expireMsBuffer[EXPIRE_MS_SIZE]; int expireMsLen;\r
     char refreshTokenBuffer[REFRESH_TOKEN_SIZE]; int refreshTokenLen;\r
     char server[SERVER_SIZE]; int serverLen;\r
     char accessTokenBuffer[ACCESS_TOKEN_SIZE]; int accessTokenLen;\r
     char deviceIdBuffer[DEVICE_ID_SIZE]; int deviceIdLen;\r
     char expireMsBuffer[EXPIRE_MS_SIZE]; int expireMsLen;\r
     char refreshTokenBuffer[REFRESH_TOKEN_SIZE]; int refreshTokenLen;\r
+\r
+    void * httpUserData;\r
 } MatrixClient;\r
 \r
 bool\r
 MatrixClientInit(\r
     MatrixClient * client,\r
 } MatrixClient;\r
 \r
 bool\r
 MatrixClientInit(\r
     MatrixClient * client,\r
-    char * server, int serverLen\r
-);\r
+    char * server, int serverLen);\r
 \r
 bool\r
 MatrixClientLoginPassword(\r
     MatrixClient * client,\r
     char * username, int usernameLen,\r
     char * password, int passwordLen,\r
 \r
 bool\r
 MatrixClientLoginPassword(\r
     MatrixClient * client,\r
     char * username, int usernameLen,\r
     char * password, int passwordLen,\r
-    char * displayName, int displayNameLen\r
-);\r
+    char * displayName, int displayNameLen);\r
+\r
+bool\r
+MatrixHttpInit(\r
+    MatrixClient * client);\r
+\r
+bool\r
+MatrixHttpDeinit(\r
+    MatrixClient * client);\r
+\r
+bool\r
+MatrixHttpGet(\r
+    MatrixClient * client,\r
+    const char * url,\r
+    char * outResponseBuffer, int outResponseCap, int * outResponseLen);\r
 \r
 bool\r
 MatrixHttpPost(\r
     MatrixClient * client,\r
     const char * url,\r
     char * requestBuffer, int requestLen,\r
 \r
 bool\r
 MatrixHttpPost(\r
     MatrixClient * client,\r
     const char * url,\r
     char * requestBuffer, int requestLen,\r
-    char * outResponseBuffer, int outResponseCap, int * outResponseLen\r
-);\r
+    char * outResponseBuffer, int outResponseCap, int * outResponseLen);\r
 \r
 #endif\r
 \r
 #endif\r