]> gitweb.ps.run Git - matrix_esp_thesis/blobdiff - src/matrix.h
dont need length variables everywhere (i think)
[matrix_esp_thesis] / src / matrix.h
index b7f3a5ba2f91a7c318ce2b47f434b2f91c6a3ba2..cd109ce87d81cb863404628606f70fd34beb320f 100644 (file)
@@ -21,11 +21,11 @@ typedef struct MatrixClient {
     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];\r
+    char accessTokenBuffer[ACCESS_TOKEN_SIZE];\r
+    char deviceIdBuffer[DEVICE_ID_SIZE];\r
+    char expireMsBuffer[EXPIRE_MS_SIZE];\r
+    char refreshTokenBuffer[REFRESH_TOKEN_SIZE];\r
 \r
     void * httpUserData;\r
 } MatrixClient;\r
@@ -33,14 +33,14 @@ typedef struct MatrixClient {
 bool\r
 MatrixClientInit(\r
     MatrixClient * client,\r
-    char * server, int serverLen);\r
+    const char * server);\r
 \r
 bool\r
 MatrixClientLoginPassword(\r
     MatrixClient * client,\r
-    char * username, int usernameLen,\r
-    char * password, int passwordLen,\r
-    char * displayName, int displayNameLen);\r
+    const char * username,\r
+    const char * password,\r
+    const char * displayName);\r
 \r
 bool\r
 MatrixHttpInit(\r
@@ -54,13 +54,13 @@ bool
 MatrixHttpGet(\r
     MatrixClient * client,\r
     const char * url,\r
-    char * outResponseBuffer, int outResponseCap, int * outResponseLen);\r
+    char * outResponseBuffer, int outResponseCap);\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
+    const char * requestBuffer,\r
+    char * outResponseBuffer, int outResponseCap);\r
 \r
 #endif\r