From 7787df0119e52621a03b3d4ad30d27165191fd77 Mon Sep 17 00:00:00 2001 From: Tobias Fella Date: Thu, 19 May 2022 22:33:03 +0200 Subject: Add function to check if e2ee is supported --- lib/util.cpp | 9 +++++++++ lib/util.h | 1 + 2 files changed, 10 insertions(+) (limited to 'lib') diff --git a/lib/util.cpp b/lib/util.cpp index 03ebf325..359b2959 100644 --- a/lib/util.cpp +++ b/lib/util.cpp @@ -135,3 +135,12 @@ int Quotient::patchVersion() { return Quotient_VERSION_PATCH; } + +bool Quotient::encryptionSupported() +{ +#ifdef Quotient_E2EE_ENABLED + return true; +#else + return false; +#endif +} diff --git a/lib/util.h b/lib/util.h index 3910059b..5dd69d74 100644 --- a/lib/util.h +++ b/lib/util.h @@ -199,4 +199,5 @@ QUOTIENT_API QString versionString(); QUOTIENT_API int majorVersion(); QUOTIENT_API int minorVersion(); QUOTIENT_API int patchVersion(); +QUOTIENT_API bool encryptionSupported(); } // namespace Quotient -- cgit v1.2.3