X-Git-Url: https://gitweb.ps.run/matrix_esp_thesis/blobdiff_plain/8d8ae609f0201ec4640738ff49b768e899695423..30bde47d1d5d9b6f0b59c318ff16caed6268d1a8:/src/matrix.h diff --git a/src/matrix.h b/src/matrix.h index b51d0e9..20cdc8c 100644 --- a/src/matrix.h +++ b/src/matrix.h @@ -119,6 +119,13 @@ MatrixOlmSessionEncrypt( const char * plaintext, char * outBuffer, int outBufferCap); +bool +MatrixOlmSessionDecrypt( + MatrixOlmSession * session, + size_t messageType, + char * encrypted, + char * outBuffer, int outBufferCap); + // Matrix Megolm Session @@ -126,6 +133,12 @@ typedef struct MatrixMegolmInSession { OlmInboundGroupSession * session; } MatrixMegolmInSession; +bool +MatrixMegolmInSessionDecrypt( + MatrixMegolmInSession * megolmInSession, + const char * encrypted, + char * outDecrypted, int outDecryptedCap); + typedef struct MatrixMegolmOutSession { char roomId[ROOM_ID_SIZE]; @@ -264,6 +277,13 @@ MatrixClientSync( MatrixClient * client, char * outSync, int outSyncCap); +bool +MatrixClientGetRoomEvent( + MatrixClient * client, + const char * roomId, + const char * eventId, + char * outEvent, int outEventCap); + bool MatrixClientShareMegolmOutSession( MatrixClient * client, @@ -294,6 +314,16 @@ bool MatrixClientInitMegolmOutSession( MatrixClient * client, const char * roomId); + +bool +MatrixClientRequestMegolmInSession( + MatrixClient * client, + const char * roomId, + const char * sessionId, + const char * senderKey, + const char * userId, + const char * deviceId, // TODO: remove deviceId (query all devices) + MatrixMegolmInSession * outMegolmInSession); bool MatrixClientGetOlmSession( @@ -318,6 +348,12 @@ MatrixClientSendToDeviceEncrypted( const char * message, const char * msgType); +bool +MatrixClientSendDummy( + MatrixClient * client, + const char * userId, + const char * deviceId); + bool MatrixClientRequestDeviceKey( MatrixClient * client,