diff options
| author | patrick-scho | 2025-04-28 11:31:40 +0200 |
|---|---|---|
| committer | patrick-scho | 2025-04-28 11:31:40 +0200 |
| commit | c86eeb6e2a53dfdfb9c205f07d5913c27178ff7e (patch) | |
| tree | 412e649b5f4aa78d6b18869518cd937b3a649366 | |
| parent | ee50fbf1bedef4702a177c2e4e0ef326ba548ae2 (diff) | |
| download | matrix_esp_thesis-c86eeb6e2a53dfdfb9c205f07d5913c27178ff7e.tar.gz matrix_esp_thesis-c86eeb6e2a53dfdfb9c205f07d5913c27178ff7e.zip | |
update code block to include 'c' specifier
| -rw-r--r-- | Readme.md | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -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 +```
|
