abouttreesummaryrefslogcommitdiff
path: root/Readme.md
diff options
context:
space:
mode:
authorpatrick-scho2025-04-28 11:31:40 +0200
committerpatrick-scho2025-04-28 11:31:40 +0200
commitc86eeb6e2a53dfdfb9c205f07d5913c27178ff7e (patch)
tree412e649b5f4aa78d6b18869518cd937b3a649366 /Readme.md
parentee50fbf1bedef4702a177c2e4e0ef326ba548ae2 (diff)
downloadmatrix_esp_thesis-c86eeb6e2a53dfdfb9c205f07d5913c27178ff7e.tar.gz
matrix_esp_thesis-c86eeb6e2a53dfdfb9c205f07d5913c27178ff7e.zip
update code block to include 'c' specifier
Diffstat (limited to 'Readme.md')
-rw-r--r--Readme.md12
1 files changed, 6 insertions, 6 deletions
diff --git a/Readme.md b/Readme.md
index 9e90f9a..81b3c2f 100644
--- a/Readme.md
+++ b/Readme.md
@@ -32,7 +32,7 @@ There are currently two, SendEncrypted and Verify.
The example can be set in `esp32/esp_project(_risc_v)/main/CMakeLists.txt` as the second argument after SRCS.
Any code using the library should compile under ESP-IDF if the following code is added at the end of the file:
-```
+```c
#include "wifi.h"
void
@@ -61,7 +61,7 @@ To use the library in an ESP-IDF project:
## Examples
### (De)Initialization
-```
+```c
MatrixClient * client = (MatrixClient*)malloc(sizeof(MatrixClient));
MatrixClientInit(client);
@@ -79,14 +79,14 @@ MatrixHttpDeinit(&client->hc);
```
### Uploading keys
-```
+```c
MatrixClientGenerateOnetimeKeys(client, 10);
MatrixClientUploadOnetimeKeys(client);
MatrixClientUploadDeviceKeys(client);
```
### Sending an encrypted message
-```
+```c
MatrixMegolmOutSession * megolmOutSession;
MatrixClientNewMegolmOutSession(&client,
ROOM_ID,
@@ -104,7 +104,7 @@ MatrixClientSendEventEncrypted(&client,
```
### Verification
-```
+```c
// Request an encrypted event to enable verification
STATIC char eventBuffer[1024];
MatrixClientGetRoomEvent(client,
@@ -119,4 +119,4 @@ STATIC char nextBatch[1024];
while (! client->verified) {
MatrixClientSync(client, syncBuffer, SYNC_BUFFER_SIZE, nextBatch, 1024);
}
-``` \ No newline at end of file
+```