diff --git a/.ci/script.sh b/.ci/script.sh index 4f0c5397d9b7fed1b6c5f65bee1cd86b7f50fb82..a2f625126456365f9fa71222fe43b28d58f1d497 100755 --- a/.ci/script.sh +++ b/.ci/script.sh @@ -26,6 +26,8 @@ if [ $TRAVIS_OS_NAME == linux ]; then fi if [ $TRAVIS_OS_NAME == osx ]; then + brew update + brew upgrade cmake boost # Build dependencies. cmake -Hdeps -B.deps -DCMAKE_BUILD_TYPE=Release \ -DUSE_BUNDLED_BOOST=OFF \ diff --git a/.travis.yml b/.travis.yml index 31abe8f9995a58c6e4063e5c99f6ac44d15d4691..cff7bacd93f673297f21a6fac91d2560f6f61a27 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,6 +28,11 @@ matrix: - COVERAGE=ON install: + - | + if [ "$TRAVIS_OS_NAME" = "linux" ]; then + docker build -t nheko-reborn/mtxclient -f Dockerfile . + fi + - ./.ci/install.sh script: @@ -45,7 +50,7 @@ script: -e CC_VERSION=${CC_VERSION} \ -e COVERAGE=${COVERAGE} \ -e TRAVIS_OS_NAME=${TRAVIS_OS_NAME} \ - mujx/mtxclient-dev:0.1.0 \ + nheko-reborn/mtxclient \ /bin/bash -c "./.ci/script.sh" fi @@ -60,7 +65,7 @@ after_success: - | if [ $COVERAGE == ON ]; then docker run -v `pwd`:/build \ - --net=host mujx/mtxclient-dev:0.1.0 \ + --net=host nheko-reborn/mtxclient \ /bin/bash -c "make -C build -j1 test_coverage && ./.ci/coverage.sh" && \ bash <(curl -s https://codecov.io/bash) -f "!*tests*" || echo "Codecov failed" fi diff --git a/CMakeLists.txt b/CMakeLists.txt index 21447b9bf412b1f0dde73fe3828db51c36b83fc2..1b5ab4b3fcedfa35f1b58e1b21a248fb7c984580 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,15 +51,47 @@ if(NOT MSVC AND NOT APPLE) find_package(Threads REQUIRED) endif() -find_package(OpenSSL REQUIRED) -find_package(ZLIB REQUIRED) -find_package(Olm 2 REQUIRED) -find_package(sodium 1.0.14 REQUIRED) +include(FeatureSummary) + +find_package(OpenSSL) +set_package_properties(OpenSSL PROPERTIES + DESCRIPTION "Open source SSL and TLS implementation and cryptographic library" + URL "https://www.openssl.org/" + TYPE REQUIRED +) + +find_package(ZLIB) +set_package_properties(ZLIB PROPERTIES + DESCRIPTION "A free compression library unencumbered by patents" + URL "https://www.zlib.net/" + TYPE REQUIRED +) + +find_package(Olm 2) +set_package_properties(Olm PROPERTIES + DESCRIPTION "An implementation of the Double Ratchet cryptographic ratchet" + URL "https://git.matrix.org/git/olm/about/" + TYPE REQUIRED +) + +find_package(sodium 1.0.14) +set_package_properties(sodium PROPERTIES + DESCRIPTION "A modern, portable, easy to use crypto library" + URL "https://github.com/jedisct1/libsodium" + TYPE REQUIRED +) + +find_package(nlohmann_json 3.2.0) +set_package_properties(nlohmann_json PROPERTIES + DESCRIPTION "JSON for Modern C++, a C++11 header-only JSON class" + URL "https://nlohmann.github.io/json/" + TYPE REQUIRED +) set(Boost_USE_STATIC_LIBS OFF) set(Boost_USE_STATIC_RUNTIME OFF) set(Boost_USE_MULTITHREADED ON) -find_package(Boost 1.66 REQUIRED +find_package(Boost 1.66 COMPONENTS atomic chrono date_time @@ -68,6 +100,11 @@ find_package(Boost 1.66 REQUIRED regex system thread) +set_package_properties(Boost PROPERTIES + DESCRIPTION "Free peer-reviewed portable C++ source libraries" + URL "https://www.boost.org/" + TYPE REQUIRED +) add_library(matrix_client lib/http/client.cpp @@ -153,6 +190,8 @@ if(BUILD_LIB_EXAMPLES) add_subdirectory(examples) endif() +feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES) + # # Installation & Target configuration. # diff --git a/Dockerfile b/Dockerfile index 551a2a129af9a2e446b112ca99232e7e56ca3d75..534c73d48064ef16460cc6a905c31f389f5e64b6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ FROM ubuntu:14.04 ENV LIBSODIUM_VERSION=1.0.16 ENV SPDLOG_VERSION=1.1.0 ENV OLM_VERSION=2.2.2 - +ENV NLOHMANN_VERSION=v3.2.0 ENV CMAKE_VERSION=3.12.1 ENV CMAKE_SHORT_VERSION=3.12 @@ -68,12 +68,18 @@ RUN \ git clone https://git.matrix.org/git/olm.git && \ cd olm && mkdir -p cmake && \ git checkout ${OLM_VERSION} && \ - curl -L https://raw.githubusercontent.com/mujx/mtxclient/master/deps/cmake/OlmCMakeLists.txt -o CMakeLists.txt && \ - curl -L https://raw.githubusercontent.com/mujx/mtxclient/master/deps/cmake/OlmConfig.cmake.in -o cmake/OlmConfig.cmake.in && \ + curl -L https://raw.githubusercontent.com/Nheko-Reborn/mtxclient/master/deps/cmake/OlmCMakeLists.txt -o CMakeLists.txt && \ + curl -L https://raw.githubusercontent.com/Nheko-Reborn/mtxclient/master/deps/cmake/OlmConfig.cmake.in -o cmake/OlmConfig.cmake.in && \ cmake -H. -Bbuild -GNinja -DCMAKE_BUILD_TYPE=Release && \ cmake --build build --target install && \ # json.hpp - curl -L https://github.com/nlohmann/json/releases/download/v3.2.0/json.hpp -o /usr/local/include/json.hpp && \ + mkdir /build/json && cd /build/json && \ + git clone --branch ${NLOHMANN_VERSION} --depth 1 https://github.com/nlohmann/json && \ + cd json && \ + cmake . && \ + make && \ + make install && \ + #curl -L https://github.com/nlohmann/json/releases/download/v3.2.0/json.hpp -o /usr/local/include/json.hpp && \ rm -rf /build/* && \ rm -rf /var/lib/apt/lists/* && \ apt-get clean && \ diff --git a/README.md b/README.md index 2871395ace0bda8b7796309d7bedee95d9410d79..3a5a4b86339e88211cb91e7b3e1d942e8a3ad807 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ mtxclient --- -[](https://travis-ci.org/mujx/mtxclient) -[](https://ci.appveyor.com/project/mujx/mtxclient/branch/master) +[](https://travis-ci.org/Nheko-Reborn/mtxclient) +[](https://ci.appveyor.com/project/redsky17/mtxclient/branch/master) [](https://codecov.io/gh/mujx/mtxclient) [](http://github.com/badges/stability-badges) @@ -16,6 +16,7 @@ Client API library for the Matrix protocol, built on top of Boost.Asio. - C++ 14 compiler - CMake 3.1 or greater - Google Test (for testing) +- libsodium 1.0.14 or greater Boost and GTest will be built automatically by CMake if they're not found on your system. diff --git a/appveyor.yml b/appveyor.yml index e3a7b342dba0426cba09fdd85055dfcd75147105..e3a75c525ce9b0ed2844ba6816f516f88880fb38 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -17,6 +17,7 @@ install: - mingw32-make.exe --version - call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat" - vcpkg install + nlohmann-json:%PLATFORM%-windows boost-asio:%PLATFORM%-windows boost-beast:%PLATFORM%-windows boost-iostreams:%PLATFORM%-windows diff --git a/deps/CMakeLists.txt b/deps/CMakeLists.txt index 974324c7699a24d62f9ec46c24ebbcefff701b79..dffa616b057494664bc1c1f0aa3c29e4ca4c20f9 100644 --- a/deps/CMakeLists.txt +++ b/deps/CMakeLists.txt @@ -34,8 +34,8 @@ option(USE_EXISTING_SRC_DIR include(ExternalProject) if(USE_BUNDLED_BOOST) - # bundled boost is 1.68, which requires CMake 3.13 or greater. - cmake_minimum_required(VERSION 3.13) + # bundled boost is 1.68, which requires CMake 3.12 or greater. + cmake_minimum_required(VERSION 3.12) endif() set(BOOST_URL @@ -58,7 +58,7 @@ set(JSON_HEADER_URL set(JSON_HEADER_HASH ce6b5610a051ec6795fa11c33854abebb086f0fd67c311f5921c3c07f9531b44) -file(DOWNLOAD ${JSON_HEADER_URL} ${DEPS_INSTALL_DIR}/include/json.hpp +file(DOWNLOAD ${JSON_HEADER_URL} ${DEPS_INSTALL_DIR}/nlohmann/include/json.hpp EXPECTED_HASH SHA256=${JSON_HEADER_HASH}) if(USE_BUNDLED_BOOST) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index c609f5d8517115662a31fd0f7abd2e6f5a3c1932..85ef0925fceeab5eab00a67dbcaea4d3ad3c7027 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -1,4 +1,9 @@ -find_package(spdlog 1.0.0 CONFIG REQUIRED) +find_package(spdlog 1.0.0 CONFIG) +set_package_properties(spdlog PROPERTIES + DESCRIPTION "Very fast, header only, C++ logging library" + URL "https://github.com/gabime/spdlog" + TYPE REQUIRED +) include_directories(../tests) diff --git a/examples/crypto_bot.cpp b/examples/crypto_bot.cpp index 270ba5d86fce102aafc87bfbeb397b35d318a74f..b9c29b12ac595cf0322469ded2ca84db3ab738fe 100644 --- a/examples/crypto_bot.cpp +++ b/examples/crypto_bot.cpp @@ -11,7 +11,7 @@ #include <atomic> #include <fstream> #include <iostream> -#include <json.hpp> +#include <nlohmann/json.hpp> #include <stdexcept> #include <unistd.h> diff --git a/examples/simple_bot.cpp b/examples/simple_bot.cpp index 051584c9a7cadb543cdbdc6cb9dbd8c01a72bc9e..d228da6e4ce9e0960063e5becc8e93366377c95e 100644 --- a/examples/simple_bot.cpp +++ b/examples/simple_bot.cpp @@ -3,7 +3,7 @@ #include <boost/variant.hpp> #include <iostream> -#include <json.hpp> +#include <nlohmann/json.hpp> #include <unistd.h> #include <mtx.hpp> diff --git a/include/mtx/common.hpp b/include/mtx/common.hpp index 5fa2a17bfa8fce60a9d491936f128c8dd684c97c..6dbb8038768736273110c85f9eeee7cd1f763960 100644 --- a/include/mtx/common.hpp +++ b/include/mtx/common.hpp @@ -1,6 +1,6 @@ #pragma once -#include <json.hpp> +#include <nlohmann/json.hpp> #include <map> #include <string> diff --git a/include/mtx/errors.hpp b/include/mtx/errors.hpp index 52fb38f5e71a73223340564349eb0dfbd7dc1140..d433089b974b05d5a051340a274252addbc9584c 100644 --- a/include/mtx/errors.hpp +++ b/include/mtx/errors.hpp @@ -1,6 +1,6 @@ #pragma once -#include <json.hpp> +#include <nlohmann/json.hpp> #include <string> using json = nlohmann::json; diff --git a/include/mtx/events.hpp b/include/mtx/events.hpp index 38dac940a37c7adb623fdc71dd500e4e98b7b9a2..83bff9dc1a781d94685022854bbd33fb29d26770 100644 --- a/include/mtx/events.hpp +++ b/include/mtx/events.hpp @@ -1,6 +1,6 @@ #pragma once -#include <json.hpp> +#include <nlohmann/json.hpp> #include <iostream> diff --git a/include/mtx/events/aliases.hpp b/include/mtx/events/aliases.hpp index b2b18f748246c3c42f2f5deed4ebec24f0cee0ad..12542770dda8eeb376b601e4279c211d8f878d43 100644 --- a/include/mtx/events/aliases.hpp +++ b/include/mtx/events/aliases.hpp @@ -1,6 +1,6 @@ #pragma once -#include <json.hpp> +#include <nlohmann/json.hpp> using json = nlohmann::json; diff --git a/include/mtx/events/avatar.hpp b/include/mtx/events/avatar.hpp index a47490aa1af15b4f5f119464f239c349e7c05600..f554f9dfa48b15c634ac1112cb4d62c0c2ac8b75 100644 --- a/include/mtx/events/avatar.hpp +++ b/include/mtx/events/avatar.hpp @@ -1,6 +1,6 @@ #pragma once -#include <json.hpp> +#include <nlohmann/json.hpp> using json = nlohmann::json; diff --git a/include/mtx/events/canonical_alias.hpp b/include/mtx/events/canonical_alias.hpp index 23207ccd280dadee56e65fcc015dfd8ee00fd179..fc371a9ed8b52a70ba85e99a0f12fa3db2452209 100644 --- a/include/mtx/events/canonical_alias.hpp +++ b/include/mtx/events/canonical_alias.hpp @@ -1,6 +1,6 @@ #pragma once -#include <json.hpp> +#include <nlohmann/json.hpp> using json = nlohmann::json; diff --git a/include/mtx/events/common.hpp b/include/mtx/events/common.hpp index 88653909c90b7775ea9f8aab989dace1cb2b339d..7d9719185e33a1a3913a4417e6d851ba47f3e0aa 100644 --- a/include/mtx/events/common.hpp +++ b/include/mtx/events/common.hpp @@ -1,6 +1,6 @@ #pragma once -#include <json.hpp> +#include <nlohmann/json.hpp> using json = nlohmann::json; diff --git a/include/mtx/events/create.hpp b/include/mtx/events/create.hpp index e1b1b478e6b3db4c1072828ab938351a6e1e52bf..cf853897a70a4fb64f9aec05857d7dc5586dcd37 100644 --- a/include/mtx/events/create.hpp +++ b/include/mtx/events/create.hpp @@ -1,6 +1,6 @@ #pragma once -#include <json.hpp> +#include <nlohmann/json.hpp> using json = nlohmann::json; diff --git a/include/mtx/events/encrypted.hpp b/include/mtx/events/encrypted.hpp index 9df13e8dec54b94225dc83ea428ce0e7ea518cd8..2077c1c8ea2509c85acfa34894cb716fb9257002 100644 --- a/include/mtx/events/encrypted.hpp +++ b/include/mtx/events/encrypted.hpp @@ -1,6 +1,6 @@ #pragma once -#include <json.hpp> +#include <nlohmann/json.hpp> #include "mtx/events.hpp" diff --git a/include/mtx/events/encryption.hpp b/include/mtx/events/encryption.hpp index 962de5cb38cca5555896e43acaef16febeb1bd21..4eab0e77e9fe7525821842a5262b4b0f893bf00c 100644 --- a/include/mtx/events/encryption.hpp +++ b/include/mtx/events/encryption.hpp @@ -1,6 +1,6 @@ #pragma once -#include <json.hpp> +#include <nlohmann/json.hpp> using json = nlohmann::json; diff --git a/include/mtx/events/guest_access.hpp b/include/mtx/events/guest_access.hpp index 8333640e8f6fc962644f169bad0ae5177e3d6a83..6c8c8c25b180ee6627047e9d42155f8d897ccd05 100644 --- a/include/mtx/events/guest_access.hpp +++ b/include/mtx/events/guest_access.hpp @@ -1,6 +1,6 @@ #pragma once -#include <json.hpp> +#include <nlohmann/json.hpp> #include <string> using json = nlohmann::json; diff --git a/include/mtx/events/history_visibility.hpp b/include/mtx/events/history_visibility.hpp index 7a58ebc10ff057305a4a9994d09fd0b60b888ce1..ca277cb73eae4ab40e66edf85a40bd3beb0c2b8c 100644 --- a/include/mtx/events/history_visibility.hpp +++ b/include/mtx/events/history_visibility.hpp @@ -1,6 +1,6 @@ #pragma once -#include <json.hpp> +#include <nlohmann/json.hpp> #include <string> using json = nlohmann::json; diff --git a/include/mtx/events/join_rules.hpp b/include/mtx/events/join_rules.hpp index 290e20abaf4b2ac242e595c9d5ec25164f223fae..f3edc1703c7ece2014ac2778335d2883f9894d42 100644 --- a/include/mtx/events/join_rules.hpp +++ b/include/mtx/events/join_rules.hpp @@ -1,6 +1,6 @@ #pragma once -#include <json.hpp> +#include <nlohmann/json.hpp> #include <string> using json = nlohmann::json; diff --git a/include/mtx/events/member.hpp b/include/mtx/events/member.hpp index 30beeec4a386910807734ae38536478dd445da18..3815f1d5979c64138c4f9eb1283bcbbd36adb39b 100644 --- a/include/mtx/events/member.hpp +++ b/include/mtx/events/member.hpp @@ -1,6 +1,6 @@ #pragma once -#include <json.hpp> +#include <nlohmann/json.hpp> #include <string> using json = nlohmann::json; diff --git a/include/mtx/events/messages/audio.hpp b/include/mtx/events/messages/audio.hpp index 2b8a3b028f8893e62aed9da7eebd781e9e0fbb9a..f671a38571db4455d4172cc5f78135b96629ed0d 100644 --- a/include/mtx/events/messages/audio.hpp +++ b/include/mtx/events/messages/audio.hpp @@ -1,6 +1,6 @@ #pragma once -#include <json.hpp> +#include <nlohmann/json.hpp> #include <string> #include "mtx/events/common.hpp" diff --git a/include/mtx/events/messages/emote.hpp b/include/mtx/events/messages/emote.hpp index 3fafa2a900ed26361a539ad10dea5f21037b5391..5991471c8f9243f27de63a1416f80a9bca82b0ef 100644 --- a/include/mtx/events/messages/emote.hpp +++ b/include/mtx/events/messages/emote.hpp @@ -1,6 +1,6 @@ #pragma once -#include <json.hpp> +#include <nlohmann/json.hpp> #include <string> using json = nlohmann::json; diff --git a/include/mtx/events/messages/file.hpp b/include/mtx/events/messages/file.hpp index 848e984a7c117e7a6253eb594b3d3673c9b97174..9db6730925c4aa6df7c8df82904198df8c31881c 100644 --- a/include/mtx/events/messages/file.hpp +++ b/include/mtx/events/messages/file.hpp @@ -1,6 +1,6 @@ #pragma once -#include <json.hpp> +#include <nlohmann/json.hpp> #include <string> #include "mtx/events/common.hpp" diff --git a/include/mtx/events/messages/image.hpp b/include/mtx/events/messages/image.hpp index f536bf1316009bf48007f8140977c18fc25574f0..a42a9c368eee59f5b7ca3fd540700ca77e6fb66b 100644 --- a/include/mtx/events/messages/image.hpp +++ b/include/mtx/events/messages/image.hpp @@ -1,6 +1,6 @@ #pragma once -#include <json.hpp> +#include <nlohmann/json.hpp> #include <string> #include "mtx/events/common.hpp" diff --git a/include/mtx/events/messages/notice.hpp b/include/mtx/events/messages/notice.hpp index 4c4f4052691d6d8f3d93d120a639f8f78e5e80ea..df90af0b292fa7b97b08ebdb998145a630e586a4 100644 --- a/include/mtx/events/messages/notice.hpp +++ b/include/mtx/events/messages/notice.hpp @@ -1,6 +1,6 @@ #pragma once -#include <json.hpp> +#include <nlohmann/json.hpp> #include <string> using json = nlohmann::json; diff --git a/include/mtx/events/messages/text.hpp b/include/mtx/events/messages/text.hpp index e9849a095ba35299f61b24e21b84f2f9abdc06ea..3c7edcc46abe29a95e0705d2b37b37dd826d6dc5 100644 --- a/include/mtx/events/messages/text.hpp +++ b/include/mtx/events/messages/text.hpp @@ -1,6 +1,6 @@ #pragma once -#include <json.hpp> +#include <nlohmann/json.hpp> #include <string> using json = nlohmann::json; diff --git a/include/mtx/events/messages/video.hpp b/include/mtx/events/messages/video.hpp index 23001dbc335eed0a5f922ad1a67d02b539748bd4..2231de964965d5ff7d272182127433a4af63bcdb 100644 --- a/include/mtx/events/messages/video.hpp +++ b/include/mtx/events/messages/video.hpp @@ -1,6 +1,6 @@ #pragma once -#include <json.hpp> +#include <nlohmann/json.hpp> #include <string> #include "mtx/events/common.hpp" diff --git a/include/mtx/events/name.hpp b/include/mtx/events/name.hpp index f4c6a32cccc1c70bd06f923c363152a934801a70..1e5af1859dc8e6ee270ab2bebebece00dc6868a3 100644 --- a/include/mtx/events/name.hpp +++ b/include/mtx/events/name.hpp @@ -1,6 +1,6 @@ #pragma once -#include <json.hpp> +#include <nlohmann/json.hpp> #include <string> using json = nlohmann::json; diff --git a/include/mtx/events/pinned_events.hpp b/include/mtx/events/pinned_events.hpp index dc4d9308ac8eceb50e41c8c3ef02418c2ce3588c..5f4b16c994eeb9cd754d5f989aa404da0fb9a1e1 100644 --- a/include/mtx/events/pinned_events.hpp +++ b/include/mtx/events/pinned_events.hpp @@ -1,6 +1,6 @@ #pragma once -#include <json.hpp> +#include <nlohmann/json.hpp> #include <string> using json = nlohmann::json; diff --git a/include/mtx/events/power_levels.hpp b/include/mtx/events/power_levels.hpp index 16b3618574358a3fbc96e99cb6d0a74cb5f79417..9ce6bfa0dd0241f36c485d53473c9441bd8acb64 100644 --- a/include/mtx/events/power_levels.hpp +++ b/include/mtx/events/power_levels.hpp @@ -1,6 +1,6 @@ #pragma once -#include <json.hpp> +#include <nlohmann/json.hpp> #include <string> using json = nlohmann::json; diff --git a/include/mtx/events/redaction.hpp b/include/mtx/events/redaction.hpp index 74c17ecf3e7ecdcd0f2e1ec1ce83ee9761961d96..9125d9216d5b7178432d263d9ab5ab5de8035942 100644 --- a/include/mtx/events/redaction.hpp +++ b/include/mtx/events/redaction.hpp @@ -1,6 +1,6 @@ #pragma once -#include <json.hpp> +#include <nlohmann/json.hpp> #include <string> using json = nlohmann::json; diff --git a/include/mtx/events/tag.hpp b/include/mtx/events/tag.hpp index 1b9581c48842436a04dcc8e81f4bdd0ff52981c1..dcf16ab39f1606d38f29ad7efe884a2547bea68b 100644 --- a/include/mtx/events/tag.hpp +++ b/include/mtx/events/tag.hpp @@ -1,6 +1,6 @@ #pragma once -#include <json.hpp> +#include <nlohmann/json.hpp> #include <string> using json = nlohmann::json; diff --git a/include/mtx/events/topic.hpp b/include/mtx/events/topic.hpp index 2e7c33cb1ec1c9d4ba0f32dafb0b879a3dac5296..e44e49898ddaeb0298c21c53ac8ab70453e7cfc5 100644 --- a/include/mtx/events/topic.hpp +++ b/include/mtx/events/topic.hpp @@ -1,6 +1,6 @@ #pragma once -#include <json.hpp> +#include <nlohmann/json.hpp> #include <string> using json = nlohmann::json; diff --git a/include/mtx/identifiers.hpp b/include/mtx/identifiers.hpp index 1036c0079c2e3279a9c09429062a498ef2bea9e1..87acc4360e10c24eff78bcb51b6b2f02f93d5fff 100644 --- a/include/mtx/identifiers.hpp +++ b/include/mtx/identifiers.hpp @@ -3,7 +3,7 @@ #include <exception> #include <iostream> -#include <json.hpp> +#include <nlohmann/json.hpp> namespace mtx { namespace identifiers { diff --git a/include/mtx/requests.hpp b/include/mtx/requests.hpp index b073f1aa296ffde4814802b5c02db29a917a4686..b66842d2ae4f59677deb01e4edb04cf90d42467f 100644 --- a/include/mtx/requests.hpp +++ b/include/mtx/requests.hpp @@ -2,7 +2,7 @@ #include <string> -#include <json.hpp> +#include <nlohmann/json.hpp> #include <mtx/common.hpp> using json = nlohmann::json; diff --git a/include/mtx/responses/common.hpp b/include/mtx/responses/common.hpp index ef8e57cada07853ee23b40b606bfc23f0dba3871..2cda8c5d78207ad34eb8caf0955be2bf152dd9f8 100644 --- a/include/mtx/responses/common.hpp +++ b/include/mtx/responses/common.hpp @@ -1,6 +1,6 @@ #pragma once -#include <json.hpp> +#include <nlohmann/json.hpp> #include <string> #include <vector> diff --git a/include/mtx/responses/create_room.hpp b/include/mtx/responses/create_room.hpp index f5875d267a0bfc14bcc3a11098e8a04d53dec179..d460785dd9675b4b6b509ad6a04215e88d1aec7d 100644 --- a/include/mtx/responses/create_room.hpp +++ b/include/mtx/responses/create_room.hpp @@ -1,6 +1,6 @@ #pragma once -#include <json.hpp> +#include <nlohmann/json.hpp> namespace mtx { namespace responses { diff --git a/include/mtx/responses/crypto.hpp b/include/mtx/responses/crypto.hpp index 6d843ceeb86830936755c94d382abee779047cc1..fd750ac3387e1a100cf2639573aa8a6d2b3697d6 100644 --- a/include/mtx/responses/crypto.hpp +++ b/include/mtx/responses/crypto.hpp @@ -1,6 +1,6 @@ #pragma once -#include <json.hpp> +#include <nlohmann/json.hpp> #include "mtx/common.hpp" diff --git a/include/mtx/responses/empty.hpp b/include/mtx/responses/empty.hpp index 885d1c77afb60db06f3dbd60479fb2a5869b2bfb..60a3b70c6cb95e554cf9d5fe75ea98c197ea2b1e 100644 --- a/include/mtx/responses/empty.hpp +++ b/include/mtx/responses/empty.hpp @@ -2,7 +2,7 @@ #include <string> -#include <json.hpp> +#include <nlohmann/json.hpp> #include "mtx/identifiers.hpp" diff --git a/include/mtx/responses/groups.hpp b/include/mtx/responses/groups.hpp index c0fe71e9215c58dada549957e8ef30a635d93b83..fa7c01419bb4791fcf4f308c867d508da59a77a8 100644 --- a/include/mtx/responses/groups.hpp +++ b/include/mtx/responses/groups.hpp @@ -1,6 +1,6 @@ #pragma once -#include "json.hpp" +#include <nlohmann/json.hpp> namespace mtx { namespace responses { diff --git a/include/mtx/responses/login.hpp b/include/mtx/responses/login.hpp index 0d2490bfc21f68fe3facb4ec1b5ea2abe5116035..5aaf4e7d71d6f5ab58983a5337418adf9ce34764 100644 --- a/include/mtx/responses/login.hpp +++ b/include/mtx/responses/login.hpp @@ -2,7 +2,7 @@ #include <string> -#include <json.hpp> +#include <nlohmann/json.hpp> #include "mtx/identifiers.hpp" diff --git a/include/mtx/responses/media.hpp b/include/mtx/responses/media.hpp index a4d777041cde8b5833db457d4a4ca6c4467ef7da..ec60fed0c267b21de96289fa3d6373c9c3ce3074 100644 --- a/include/mtx/responses/media.hpp +++ b/include/mtx/responses/media.hpp @@ -1,6 +1,6 @@ #pragma once -#include <json.hpp> +#include <nlohmann/json.hpp> #include <string> namespace mtx { diff --git a/include/mtx/responses/messages.hpp b/include/mtx/responses/messages.hpp index 42817b5ae9d5583655ea6203ab0784fae2151cbb..3b09ef4c489439b6598bd3aedee974d3a351f1c7 100644 --- a/include/mtx/responses/messages.hpp +++ b/include/mtx/responses/messages.hpp @@ -2,7 +2,7 @@ #include <string> -#include <json.hpp> +#include <nlohmann/json.hpp> #include "mtx/events/collections.hpp" diff --git a/include/mtx/responses/notifications.hpp b/include/mtx/responses/notifications.hpp index 82d80c86aa4949cbed7ef38ec5d3402fb0d8c70f..d69853812077783920f7c54d742c865d8e37a0b8 100644 --- a/include/mtx/responses/notifications.hpp +++ b/include/mtx/responses/notifications.hpp @@ -1,6 +1,6 @@ #pragma once -#include <json.hpp> +#include <nlohmann/json.hpp> #include "mtx/events/collections.hpp" diff --git a/include/mtx/responses/profile.hpp b/include/mtx/responses/profile.hpp index 31087e8e2e478ad3c8b135d29b4a3191e3ebf5c2..47c3d1474cf20d066fd38df7ab1f77de656219fb 100644 --- a/include/mtx/responses/profile.hpp +++ b/include/mtx/responses/profile.hpp @@ -1,6 +1,6 @@ #pragma once -#include <json.hpp> +#include <nlohmann/json.hpp> namespace mtx { namespace responses { diff --git a/include/mtx/responses/register.hpp b/include/mtx/responses/register.hpp index b62a687bbc508399ae85a8ae1174b8d141494ea0..169dfea2761676398342e92a803dabd891ae1e26 100644 --- a/include/mtx/responses/register.hpp +++ b/include/mtx/responses/register.hpp @@ -2,7 +2,7 @@ #include <string> -#include <json.hpp> +#include <nlohmann/json.hpp> #include "mtx/identifiers.hpp" diff --git a/include/mtx/responses/sync.hpp b/include/mtx/responses/sync.hpp index 6bfc1760b7e6b5fa9493c3115f2f52c772250611..b23e2d42f3f0c70573c49bf22c7a942e60dcb155 100644 --- a/include/mtx/responses/sync.hpp +++ b/include/mtx/responses/sync.hpp @@ -7,7 +7,7 @@ #include "mtx/events.hpp" #include "mtx/events/collections.hpp" #include "mtx/identifiers.hpp" -#include <json.hpp> +#include <nlohmann/json.hpp> using json = nlohmann::json; diff --git a/include/mtx/responses/version.hpp b/include/mtx/responses/version.hpp index 69883b71ecc1efba14ca3f57e8c9d5f47f132cf1..bc0ab5c0178e477207699f7c633a1023822da5b1 100644 --- a/include/mtx/responses/version.hpp +++ b/include/mtx/responses/version.hpp @@ -1,6 +1,6 @@ #pragma once -#include <json.hpp> +#include <nlohmann/json.hpp> namespace mtx { namespace responses { diff --git a/include/mtxclient/crypto/client.hpp b/include/mtxclient/crypto/client.hpp index 740166becc1565267e983e1b5c1e217c059f0597..f9a354bd7e9f21660372bf0da648f68148806280 100644 --- a/include/mtxclient/crypto/client.hpp +++ b/include/mtxclient/crypto/client.hpp @@ -4,7 +4,7 @@ #include <memory> #include <new> -#include <json.hpp> +#include <nlohmann/json.hpp> #include <sodium.h> #include <mtx/identifiers.hpp> diff --git a/include/mtxclient/crypto/types.hpp b/include/mtxclient/crypto/types.hpp index 287757512fbb98ca1b9ba388f6c49e500053d3f0..675e2b1acbad65a40b24c2fc204a949956bab769 100644 --- a/include/mtxclient/crypto/types.hpp +++ b/include/mtxclient/crypto/types.hpp @@ -1,7 +1,7 @@ #pragma once #include "mtxclient/utils.hpp" -#include <json.hpp> +#include <nlohmann/json.hpp> STRONG_TYPE(UserId, std::string) STRONG_TYPE(DeviceId, std::string) diff --git a/include/mtxclient/http/client.hpp b/include/mtxclient/http/client.hpp index 263f09f86a4706f6c599a39f67dd017ca80812c0..5de17ab926d9bd4471a80239bc512142dda77cdf 100644 --- a/include/mtxclient/http/client.hpp +++ b/include/mtxclient/http/client.hpp @@ -12,7 +12,7 @@ #include <boost/signals2.hpp> #include <boost/signals2/signal_type.hpp> #include <boost/thread/thread.hpp> -#include <json.hpp> +#include <nlohmann/json.hpp> #include <mtx/requests.hpp> #include <mtx/responses.hpp> diff --git a/include/mtxclient/utils.hpp b/include/mtxclient/utils.hpp index a91c4d032867f58db7267af51503e2a1bb8bf3d3..3af32d8a86299f0eb70bd3db20aba765651cb718 100644 --- a/include/mtxclient/utils.hpp +++ b/include/mtxclient/utils.hpp @@ -4,7 +4,7 @@ #include <iosfwd> #include <map> -#include <json.hpp> +#include <nlohmann/json.hpp> namespace mtx { namespace client { diff --git a/lib/structs/events/aliases.cpp b/lib/structs/events/aliases.cpp index 89c882efd2e8ec300ba86fe47a62048c4855bbe3..fa44f2090f2892bcc7eccb704ba3468e7f11334d 100644 --- a/lib/structs/events/aliases.cpp +++ b/lib/structs/events/aliases.cpp @@ -1,4 +1,4 @@ -#include <json.hpp> +#include <nlohmann/json.hpp> using json = nlohmann::json; diff --git a/lib/structs/events/avatar.cpp b/lib/structs/events/avatar.cpp index af9bc94d13fa756ec0c183fd1fa58b88d566f4a9..2f1e620623feaaf50bd420c86725ad4fc9b3851f 100644 --- a/lib/structs/events/avatar.cpp +++ b/lib/structs/events/avatar.cpp @@ -1,6 +1,6 @@ #include <string> -#include <json.hpp> +#include <nlohmann/json.hpp> #include "mtx/events/avatar.hpp" diff --git a/lib/structs/events/canonical_alias.cpp b/lib/structs/events/canonical_alias.cpp index dbdb3a7f928011dece38a84a50610df1236d21f6..19473483f6916b18b57c589af517c3bcd95f8b55 100644 --- a/lib/structs/events/canonical_alias.cpp +++ b/lib/structs/events/canonical_alias.cpp @@ -1,6 +1,6 @@ #include <string> -#include <json.hpp> +#include <nlohmann/json.hpp> #include "mtx/events/canonical_alias.hpp" diff --git a/lib/structs/events/common.cpp b/lib/structs/events/common.cpp index 25fbd09da2f132437249251ed4f083e2559b087c..dc9717eaa2d193021c3166e14f4a033beeffe688 100644 --- a/lib/structs/events/common.cpp +++ b/lib/structs/events/common.cpp @@ -1,4 +1,4 @@ -#include <json.hpp> +#include <nlohmann/json.hpp> #include "mtx/events/common.hpp" diff --git a/lib/structs/events/guest_access.cpp b/lib/structs/events/guest_access.cpp index 0a92d715f8e0265beaf4197c21a1523eb3c1c0e8..20e9f40726036c25a5d3ffd74b73c2fcb8642bc4 100644 --- a/lib/structs/events/guest_access.cpp +++ b/lib/structs/events/guest_access.cpp @@ -1,4 +1,4 @@ -#include <json.hpp> +#include <nlohmann/json.hpp> #include <string> #include "mtx/events/guest_access.hpp" diff --git a/lib/structs/events/history_visibility.cpp b/lib/structs/events/history_visibility.cpp index cac92f0d0cc8a23b1992ae3af7fe2a4ab28beaa7..e5624f4b0e8e7884c9799e737fec6580ea05fe30 100644 --- a/lib/structs/events/history_visibility.cpp +++ b/lib/structs/events/history_visibility.cpp @@ -1,4 +1,4 @@ -#include <json.hpp> +#include <nlohmann/json.hpp> #include <string> #include "mtx/events/history_visibility.hpp" diff --git a/lib/structs/events/join_rules.cpp b/lib/structs/events/join_rules.cpp index d521c88ccee0ef1a49c49625b1721ee2169e0d5d..427c674b9698d0625acc26b06fe501ee85dd93b9 100644 --- a/lib/structs/events/join_rules.cpp +++ b/lib/structs/events/join_rules.cpp @@ -1,4 +1,4 @@ -#include <json.hpp> +#include <nlohmann/json.hpp> #include <string> #include "mtx/events/join_rules.hpp" diff --git a/lib/structs/events/member.cpp b/lib/structs/events/member.cpp index b38cc51f11085090b26abbc6d7df08b8094f61d7..4115b6d087e08a1e8a6300e4cc9c14ce4cfa8603 100644 --- a/lib/structs/events/member.cpp +++ b/lib/structs/events/member.cpp @@ -1,4 +1,4 @@ -#include <json.hpp> +#include <nlohmann/json.hpp> #include <string> #include "mtx/events/member.hpp" diff --git a/lib/structs/events/messages/audio.cpp b/lib/structs/events/messages/audio.cpp index 410472ce9ee8a2040d8d02e37b642b494d89df26..a2cd2269aec984d49f998af7d707ef1d566cde00 100644 --- a/lib/structs/events/messages/audio.cpp +++ b/lib/structs/events/messages/audio.cpp @@ -1,4 +1,4 @@ -#include <json.hpp> +#include <nlohmann/json.hpp> #include <string> #include "mtx/events/messages/audio.hpp" diff --git a/lib/structs/events/messages/emote.cpp b/lib/structs/events/messages/emote.cpp index 54ea890561ccabc76b5334225c461374896ded1c..2893b732584f3165dbf1c2946c3d8ecaf1feb3be 100644 --- a/lib/structs/events/messages/emote.cpp +++ b/lib/structs/events/messages/emote.cpp @@ -1,4 +1,4 @@ -#include <json.hpp> +#include <nlohmann/json.hpp> #include <string> #include "mtx/events/common.hpp" diff --git a/lib/structs/events/messages/file.cpp b/lib/structs/events/messages/file.cpp index 0d1c2c4db740252f28429fdc5d3c85fca1733c2b..add735a9cb0dbf11b367b57157d39b6da242bab9 100644 --- a/lib/structs/events/messages/file.cpp +++ b/lib/structs/events/messages/file.cpp @@ -1,4 +1,4 @@ -#include <json.hpp> +#include <nlohmann/json.hpp> #include <string> #include "mtx/events/messages/file.hpp" diff --git a/lib/structs/events/messages/image.cpp b/lib/structs/events/messages/image.cpp index c3e07269c7513c03d02c1650aa7f6ccc64b28ebb..f0e5200738994cac464853dc803fc5afde9a2270 100644 --- a/lib/structs/events/messages/image.cpp +++ b/lib/structs/events/messages/image.cpp @@ -1,4 +1,4 @@ -#include <json.hpp> +#include <nlohmann/json.hpp> #include <string> #include "mtx/events/messages/image.hpp" diff --git a/lib/structs/events/messages/notice.cpp b/lib/structs/events/messages/notice.cpp index 4658cd2162045c8d8133a467734f530d2820caf5..009e0b9e81abda68c71d443ed3fdf9770936dae7 100644 --- a/lib/structs/events/messages/notice.cpp +++ b/lib/structs/events/messages/notice.cpp @@ -1,4 +1,4 @@ -#include <json.hpp> +#include <nlohmann/json.hpp> #include <string> #include "mtx/events/common.hpp" diff --git a/lib/structs/events/messages/text.cpp b/lib/structs/events/messages/text.cpp index 344f12ec6d22120b93034ff52371a959604c6f46..de2515832c6827ac99b169cb2522c4258db5513f 100644 --- a/lib/structs/events/messages/text.cpp +++ b/lib/structs/events/messages/text.cpp @@ -1,4 +1,4 @@ -#include <json.hpp> +#include <nlohmann/json.hpp> #include <string> #include "mtx/events/common.hpp" diff --git a/lib/structs/events/messages/video.cpp b/lib/structs/events/messages/video.cpp index e4ff5714e92acf8c11187adfbae13910803034e9..bac206acc245ee6e41025e37b681f0aedd225f37 100644 --- a/lib/structs/events/messages/video.cpp +++ b/lib/structs/events/messages/video.cpp @@ -1,4 +1,4 @@ -#include <json.hpp> +#include <nlohmann/json.hpp> #include <string> #include "mtx/events/common.hpp" diff --git a/lib/structs/events/name.cpp b/lib/structs/events/name.cpp index a80fb4bb81a105cc0bd25c48c07774ec737a847c..81b1e8d3eda009953724dfceb1ec44a35318e55b 100644 --- a/lib/structs/events/name.cpp +++ b/lib/structs/events/name.cpp @@ -1,4 +1,4 @@ -#include <json.hpp> +#include <nlohmann/json.hpp> #include <string> #include "mtx/events/name.hpp" diff --git a/lib/structs/events/pinned_events.cpp b/lib/structs/events/pinned_events.cpp index 96f1e4d3bc131354ab1030b7e7d6ad1f14c49ad7..04c35d7902fbf4bc824346356852bdf0f33ee482 100644 --- a/lib/structs/events/pinned_events.cpp +++ b/lib/structs/events/pinned_events.cpp @@ -1,4 +1,4 @@ -#include <json.hpp> +#include <nlohmann/json.hpp> #include <string> #include "mtx/events/pinned_events.hpp" diff --git a/lib/structs/events/power_levels.cpp b/lib/structs/events/power_levels.cpp index 745d44bc7af3bdf4f653cb4730d4d9d629c44cb9..4df80c62c115a56f188c699a5a5b2bc863c95bbd 100644 --- a/lib/structs/events/power_levels.cpp +++ b/lib/structs/events/power_levels.cpp @@ -1,4 +1,4 @@ -#include <json.hpp> +#include <nlohmann/json.hpp> #include <string> #include "mtx/events/power_levels.hpp" diff --git a/lib/structs/events/redaction.cpp b/lib/structs/events/redaction.cpp index cde161eaf4772633c90d6f408c6157bc6b758a34..b727658d5be3e527a87493d8a875c9cb0be07ec3 100644 --- a/lib/structs/events/redaction.cpp +++ b/lib/structs/events/redaction.cpp @@ -1,4 +1,4 @@ -#include <json.hpp> +#include <nlohmann/json.hpp> #include <string> #include "mtx/events/redaction.hpp" diff --git a/tests/crypto.cpp b/tests/crypto.cpp index 857c0c322734d9ba0cc12896d5c690f646c51d81..2c4871ffe36ad93380fd405539af2813e0bd701a 100644 --- a/tests/crypto.cpp +++ b/tests/crypto.cpp @@ -1,5 +1,5 @@ #include <gtest/gtest.h> -#include <json.hpp> +#include <nlohmann/json.hpp> #include <mtx/common.hpp> diff --git a/tests/events.cpp b/tests/events.cpp index 28a98ddffcf08fdfb04146e8c32fccc629159e97..21bd18a2c2408610d7c2e64351f9236f8e8b87ce 100644 --- a/tests/events.cpp +++ b/tests/events.cpp @@ -1,6 +1,6 @@ #include <gtest/gtest.h> -#include <json.hpp> +#include <nlohmann/json.hpp> #include <mtx.hpp> using json = nlohmann::json; diff --git a/tests/messages.cpp b/tests/messages.cpp index c253879f36f563a8fce7dc193c67393b0b604847..f81f9fcfea2f030d57d8c10cad0981518a980737 100644 --- a/tests/messages.cpp +++ b/tests/messages.cpp @@ -1,6 +1,6 @@ #include <gtest/gtest.h> -#include <json.hpp> +#include <nlohmann/json.hpp> #include <mtx.hpp> using json = nlohmann::json; diff --git a/tests/requests.cpp b/tests/requests.cpp index f0aa7d9292f7337620eb54f68649049eba90d8d2..9d52491a602cdfed2372ca25f7c77f903400fa08 100644 --- a/tests/requests.cpp +++ b/tests/requests.cpp @@ -1,6 +1,6 @@ #include <gtest/gtest.h> -#include <json.hpp> +#include <nlohmann/json.hpp> #include <mtx/requests.hpp> diff --git a/tests/responses.cpp b/tests/responses.cpp index ec93597b31992590ffafc6c38efb4d6dfbab86cc..acdf677f93e07053f9f11684c447ae81324c44ba 100644 --- a/tests/responses.cpp +++ b/tests/responses.cpp @@ -3,7 +3,7 @@ #include <fstream> #include <boost/variant.hpp> -#include <json.hpp> +#include <nlohmann/json.hpp> #include <mtx.hpp> diff --git a/tests/utils.cpp b/tests/utils.cpp index 42bba6d546d313b5ea895ea7a3b39a191d841970..454aa3ab8c1245bc2a5e58b34c1c61b8c6c12d17 100644 --- a/tests/utils.cpp +++ b/tests/utils.cpp @@ -1,6 +1,6 @@ #include <gtest/gtest.h> -#include "json.hpp" +#include <nlohmann/json.hpp> #include <mtxclient/crypto/client.hpp> #include <olm/olm.h>