diff options
| author | Patrick | 2023-11-14 12:34:51 +0100 |
|---|---|---|
| committer | Patrick | 2023-11-14 12:34:51 +0100 |
| commit | 76e3b9268050341cc9e84bab764bcda3ac2961af (patch) | |
| tree | abd2461786059ab2562cebca8471b9b9c99803a1 | |
| parent | c351768df98c8239eb123ff9af036e574f47df99 (diff) | |
| download | matrix_esp_thesis-76e3b9268050341cc9e84bab764bcda3ac2961af.tar.gz matrix_esp_thesis-76e3b9268050341cc9e84bab764bcda3ac2961af.zip | |
update Readme
| -rw-r--r-- | Readme.md | 25 |
1 files changed, 25 insertions, 0 deletions
@@ -42,6 +42,31 @@ To use the library in an ESP-IDF project: ## Examples
+### (De)Initialization
+```
+MatrixClient * client = (MatrixClient*)malloc(sizeof(MatrixClient));
+MatrixClientInit(client);
+
+MatrixHttpInit(&client->hc, SERVER);
+MatrixClientSetUserId(client, USER_ID);
+
+MatrixClientLoginPassword(client,
+ "pscho",
+ "Wc23EbmB9G3faMq",
+ "Test1");
+
+MatrixClientDeleteDevice(client);
+
+MatrixHttpDeinit(&client->hc);
+```
+
+### Uploading keys
+```
+MatrixClientGenerateOnetimeKeys(client, 10);
+MatrixClientUploadOnetimeKeys(client);
+MatrixClientUploadDeviceKeys(client);
+```
+
### Sending an encrypted message
```
MatrixMegolmOutSession * megolmOutSession;
|
