From 1baff0c5049e64475686f85c07afca47f354f0f2 Mon Sep 17 00:00:00 2001 From: Konstantinos Sideris <sideris.konstantin@gmail.com> Date: Sat, 31 Mar 2018 14:30:06 +0300 Subject: [PATCH] Use olm::Account instead of olm::Account::Account --- Makefile | 1 - src/crypto.cpp | 8 ++++---- src/crypto.hpp | 6 +++--- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index e07c45ac0..9495dcfc8 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,6 @@ debug: -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl \ -DBUILD_OLM=1 @cmake --build build - @cp build/compile_commands.json . release: @cmake -GNinja -H. -Bbuild -DCMAKE_BUILD_TYPE=Release diff --git a/src/crypto.cpp b/src/crypto.cpp index f8883fa3e..b8c39ab81 100644 --- a/src/crypto.cpp +++ b/src/crypto.cpp @@ -2,10 +2,10 @@ using json = nlohmann::json; -std::shared_ptr<olm::Account::Account> +std::shared_ptr<olm::Account> mtx::client::crypto::olm_new_account() { - auto olm_account = std::make_shared<olm::Account::Account>(); + auto olm_account = std::make_shared<olm::Account>(); const auto buf_size = olm_account->new_account_random_length(); auto account_buf = std::make_unique<uint8_t[]>(buf_size); @@ -18,7 +18,7 @@ mtx::client::crypto::olm_new_account() } json -mtx::client::crypto::identity_keys(std::shared_ptr<olm::Account::Account> account) +mtx::client::crypto::identity_keys(std::shared_ptr<olm::Account> account) { const auto buf_size = account->get_identity_json_length(); auto json_buf = std::make_unique<uint8_t[]>(buf_size); @@ -34,7 +34,7 @@ mtx::client::crypto::identity_keys(std::shared_ptr<olm::Account::Account> accoun } json -mtx::client::crypto::one_time_keys(std::shared_ptr<olm::Account::Account> account) +mtx::client::crypto::one_time_keys(std::shared_ptr<olm::Account> account) { const auto buf_size = account->get_one_time_keys_json_length(); auto json_buf = std::make_unique<uint8_t[]>(buf_size); diff --git a/src/crypto.hpp b/src/crypto.hpp index 0e24ded41..bd6240a95 100644 --- a/src/crypto.hpp +++ b/src/crypto.hpp @@ -30,16 +30,16 @@ private: }; //! Create a new olm Account. -std::shared_ptr<olm::Account::Account> +std::shared_ptr<olm::Account> olm_new_account(); //! Retrieve the json representation of the identity keys for the given account. nlohmann::json -identity_keys(std::shared_ptr<olm::Account::Account> user); +identity_keys(std::shared_ptr<olm::Account> user); //! Retrieve the json representation of the one time keys for the given account. nlohmann::json -one_time_keys(std::shared_ptr<olm::Account::Account> user); +one_time_keys(std::shared_ptr<olm::Account> user); } // namespace crypto } // namespace client -- GitLab