From: Patrick Date: Thu, 29 Jun 2023 05:12:19 +0000 (+0200) Subject: add libolm.a to Makefile X-Git-Url: https://gitweb.ps.run/matrix_esp_thesis/commitdiff_plain/a8515e0eed66fa9d48297d4d5b2176ca564193ce add libolm.a to Makefile --- diff --git a/Makefile b/Makefile index 8197ee5..bfcb1de 100644 --- a/Makefile +++ b/Makefile @@ -26,4 +26,9 @@ out/examples/%: examples/%.c src/* .PHONY: examples -examples: out/examples/Login out/examples/Send out/examples/SendEncrypted out/examples/Sync \ No newline at end of file +examples: out/examples/Login out/examples/Send out/examples/SendEncrypted out/examples/Sync + +out/olm/libolm.a: + cd out/olm + cmake -DBUILD_SHARED_LIBS=OFF -DOLM_TESTS=OFF ../../ext/olm + cmake --build . \ No newline at end of file diff --git a/examples/Keys.c b/examples/Keys.c new file mode 100644 index 0000000..77196ba --- /dev/null +++ b/examples/Keys.c @@ -0,0 +1,28 @@ +#include +#include + +#define SERVER "https://matrix.org" +#define ACCESS_TOKEN "syt_cHNjaG8_yBvTjVTquGCikvsAenOJ_49mBMO" +#define DEVICE_ID "MAZNCCZLBR" +#define USER_ID "@pscho:matrix.org" +#define ROOM_ID "!XKFUjAsGrSSrpDFIxB:matrix.org" + +int +main(void) +{ + MatrixClient client; + MatrixClientInit(&client, + SERVER); + + MatrixHttpInit(&client); + + MatrixClientGenerateOnetimeKeys(&client, + 10); + + MatrixClientUploadDeviceKeys(&client); + MatrixClientUploadOnetimeKeys(&client); + + MatrixHttpDeinit(&client); + + return 0; +}