X-Git-Url: https://gitweb.ps.run/matrix_esp_thesis/blobdiff_plain/f2840d9dd5b8a0683abee189e408c5a6de294eb7..464bfb1912d0806143386f61c33dd45fbafc38e8:/src/matrix.h diff --git a/src/matrix.h b/src/matrix.h index 5963d7d..91ed208 100644 --- a/src/matrix.h +++ b/src/matrix.h @@ -50,18 +50,6 @@ #define NUM_OLM_SESSIONS 10 #define NUM_DEVICES 10 -void -Randomize(uint8_t * random, int randomLen); - -bool -JsonEscape( - const char * sIn, int sInLen, - char * sOut, int sOutCap); - -bool JsonSign( - const char * sIn, int sInLen, - char * sOut, int sOutCap); - // Matrix Device typedef struct MatrixDevice { @@ -93,7 +81,7 @@ typedef struct MatrixOlmSession { } MatrixOlmSession; bool -MatrixOlmSessionFrom( +MatrixOlmSessionTo( MatrixOlmSession * session, OlmAccount * olmAccount, const char * deviceId, @@ -168,6 +156,16 @@ MatrixClientInit( MatrixClient * client, const char * server); +bool +MatrixClientSave( + MatrixClient * client, + const char * filename); + +bool +MatrixClientLoad( + MatrixClient * client, + const char * filename); + bool MatrixClientSetAccessToken( MatrixClient * client, @@ -295,6 +293,7 @@ MatrixClientRequestDeviceKeys( + bool MatrixHttpInit( MatrixClient * client); @@ -330,4 +329,19 @@ MatrixHttpPut( char * outResponseBuffer, int outResponseCap, bool authenticated); +// util + +void +Randomize(uint8_t * random, int randomLen); + +bool +JsonEscape( + const char * sIn, int sInLen, + char * sOut, int sOutCap); + +bool JsonSign( + MatrixClient * client, + const char * sIn, int sInLen, + char * sOut, int sOutCap); + #endif