libQuotient
A Qt library for building matrix clients
Quotient::QOlmMessage Class Reference

A wrapper around an olm encrypted message. More...

#include <qolmmessage.h>

Inheritance diagram for Quotient::QOlmMessage:
Collaboration diagram for Quotient::QOlmMessage:

Public Types

enum  Type { PreKey = OLM_MESSAGE_TYPE_PRE_KEY , General = OLM_MESSAGE_TYPE_MESSAGE }
 

Public Member Functions

 QOlmMessage (QByteArray ciphertext, Type type=General)
 
Q_INVOKABLE Type type () const
 
Q_INVOKABLE QByteArray toCiphertext () const
 

Static Public Member Functions

static QOlmMessage fromCiphertext (const QByteArray &ciphertext)
 

Detailed Description

A wrapper around an olm encrypted message.

This class encapsulates a Matrix olm encrypted message, passed in either of 2 forms: a general message or a pre-key message.

The class provides functions to get a type and the ciphertext.

Definition at line 22 of file qolmmessage.h.

Member Enumeration Documentation

◆ Type

Enumerator
PreKey 
General 

Definition at line 25 of file qolmmessage.h.

Constructor & Destructor Documentation

◆ QOlmMessage()

Quotient::QOlmMessage::QOlmMessage ( QByteArray  ciphertext,
Type  type = General 
)
explicit

Member Function Documentation

◆ fromCiphertext()

static QOlmMessage Quotient::QOlmMessage::fromCiphertext ( const QByteArray &  ciphertext)
static

◆ toCiphertext()

Q_INVOKABLE QByteArray Quotient::QOlmMessage::toCiphertext ( ) const

◆ type()

Q_INVOKABLE Type Quotient::QOlmMessage::type ( ) const

The documentation for this class was generated from the following file: