aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAlexey Rusakov <Kitsune-Ral@users.sf.net>2022-05-20 18:40:07 +0200
committerGitHub <noreply@github.com>2022-05-20 18:40:07 +0200
commit004cbef8c2fb138310a12439f4b5907862df5654 (patch)
tree9097c1f5033006fe600f29e5ea144840be185164 /lib
parenta8076b9a2394150e11381dc8fc2e3af2bbd03f39 (diff)
parent7787df0119e52621a03b3d4ad30d27165191fd77 (diff)
downloadlibquotient-004cbef8c2fb138310a12439f4b5907862df5654.tar.gz
libquotient-004cbef8c2fb138310a12439f4b5907862df5654.zip
Merge pull request #552 from TobiasFella/work/encryptionsupported
Add function to check if e2ee is supported
Diffstat (limited to 'lib')
-rw-r--r--lib/util.cpp9
-rw-r--r--lib/util.h1
2 files changed, 10 insertions, 0 deletions
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