![]() |
libQuotient
A Qt library for building matrix clients
|
#include "../converters.h"#include "../expected.h"#include <QtCore/QMetaType>#include <QtCore/QStringBuilder>#include <olm/error.h>#include <array>#include <span>#include <variant>

Go to the source code of this file.
Classes | |
| class | Quotient::FixedBufferBase |
| Non-template base for owning byte span classes. More... | |
| class | Quotient::FixedBuffer< ExtentN, DataIsWriteable > |
| class | Quotient::PicklingKey |
| struct | Quotient::IdentityKeys |
| struct | Quotient::UnsignedOneTimeKeys |
| Struct representing the one-time keys. More... | |
| class | Quotient::SignedOneTimeKey |
Namespaces | |
| namespace | Quotient |
Macros | |
| #define | QOLM_INTERNAL_ERROR_X(Message_, LastError_) qFatal("%s, internal error: %s", QUO_CSTR(Message_), LastError_) |
| #define | QOLM_INTERNAL_ERROR(Message_) QOLM_INTERNAL_ERROR_X((Message_), lastError()) |
| #define | QOLM_FAIL_OR_LOG_X(InternalCondition_, Message_, LastErrorText_) |
| #define | QOLM_FAIL_OR_LOG(InternalFailureValue_, Message_) QOLM_FAIL_OR_LOG_X(lastErrorCode() == (InternalFailureValue_), (Message_), lastError()) |
Typedefs | |
| template<typename T > | |
| using | Quotient::QOlmExpected = std::expected< T, OlmErrorCode > |
| using | Quotient::byte_t = uint8_t |
| template<size_t N = std::dynamic_extent> | |
| using | Quotient::byte_view_t = std::span< const byte_t, N > |
| template<size_t N = std::dynamic_extent> | |
| using | Quotient::byte_span_t = std::span< byte_t, N > |
| using | Quotient::OneTimeKeys = QHash< QString, std::variant< QString, SignedOneTimeKey > > |
Functions | |
| bool | Quotient::isSupportedAlgorithm (const QString &algorithm) |
| QUOTIENT_API QByteArray | Quotient::byteArrayForOlm (size_t bufferSize) |
| Initialise a buffer object for use with Olm calls. | |
| size_t | Quotient::unsignedSize (const auto &buffer) |
| Get a size of a container coerced to size_t. | |
| template<size_t N = std::dynamic_extent> | |
| auto | Quotient::asCBytes (const auto &buf) |
| Obtain a std::span<const byte_t, N> looking into the passed buffer. | |
| template<size_t N = std::dynamic_extent> | |
| auto | Quotient::asWritableCBytes (auto &buf) |
| Obtain a std::span<byte_t, N> looking into the passed buffer. | |
| auto | Quotient::viewAsByteArray (const auto &aRange) -> auto |
| auto | Quotient::getRandom (size_t bytes) |
| template<size_t SizeN> | |
| auto | Quotient::getRandom () |
| QUOTIENT_API void | Quotient::fillFromSecureRng (std::span< byte_t > bytes) |
| Fill the buffer with the securely generated random bytes. | |
Variables | |
| constexpr auto | Quotient::AlgorithmKeyL = "algorithm"_L1 |
| constexpr auto | Quotient::RotationPeriodMsKeyL = "rotation_period_ms"_L1 |
| constexpr auto | Quotient::RotationPeriodMsgsKeyL = "rotation_period_msgs"_L1 |
| constexpr auto | Quotient::AlgorithmKey = "algorithm"_L1 |
| constexpr auto | Quotient::RotationPeriodMsKey = "rotation_period_ms"_L1 |
| constexpr auto | Quotient::RotationPeriodMsgsKey = "rotation_period_msgs"_L1 |
| constexpr auto | Quotient::Ed25519Key = "ed25519"_L1 |
| constexpr auto | Quotient::Curve25519Key = "curve25519"_L1 |
| constexpr auto | Quotient::SignedCurve25519Key = "signed_curve25519"_L1 |
| constexpr auto | Quotient::OlmV1Curve25519AesSha2AlgoKey = "m.olm.v1.curve25519-aes-sha2"_L1 |
| constexpr std::array | Quotient::SupportedAlgorithms |
| #define QOLM_FAIL_OR_LOG | ( | InternalFailureValue_, | |
| Message_ | |||
| ) | QOLM_FAIL_OR_LOG_X(lastErrorCode() == (InternalFailureValue_), (Message_), lastError()) |
Definition at line 57 of file e2ee_common.h.
| #define QOLM_FAIL_OR_LOG_X | ( | InternalCondition_, | |
| Message_, | |||
| LastErrorText_ | |||
| ) |
Definition at line 50 of file e2ee_common.h.
| #define QOLM_INTERNAL_ERROR | ( | Message_ | ) | QOLM_INTERNAL_ERROR_X((Message_), lastError()) |
Definition at line 47 of file e2ee_common.h.
| #define QOLM_INTERNAL_ERROR_X | ( | Message_, | |
| LastError_ | |||
| ) | qFatal("%s, internal error: %s", QUO_CSTR(Message_), LastError_) |
Definition at line 44 of file e2ee_common.h.