libQuotient
A Qt library for building matrix clients
Quotient::KeylessStateEventBase< EventT, ContentT > Class Template Reference

#include <stateevent.h>

Inheritance diagram for Quotient::KeylessStateEventBase< EventT, ContentT >:
Collaboration diagram for Quotient::KeylessStateEventBase< EventT, ContentT >:

Public Member Functions

template<typename... ContentParamTs>
 KeylessStateEventBase (ContentParamTs &&... contentParams)
 
- Public Member Functions inherited from Quotient::EventTemplate< EventT, StateEvent, ContentT >
 EventTemplate (const QJsonObject &fullJson)
 
template<typename... ContentParamTs>
 EventTemplate (const QString &stateKey, ContentParamTs &&... contentParams)
 
const ContentT & content () const
 
template<typename VisitorT >
void editContent (VisitorT &&visitor)
 
const std::optional< ContentT > & prevContent () const
 
QString prevSenderId () const
 
- Public Member Functions inherited from Quotient::StateEvent
 StateEvent (event_type_t type, const QString &stateKey={}, const QJsonObject &contentJson={})
 
QString replacedState () const
 
virtual bool repeatsState () const
 
- Public Member Functions inherited from Quotient::RoomEvent
 ~RoomEvent () override
 
QString id () const
 
QDateTime originTimestamp () const
 
QString roomId () const
 
QString senderId () const
 
bool isRedacted () const
 
const event_ptr_tt< RedactionEvent > & redactedBecause () const
 
QString redactionReason () const
 
QString transactionId () const
 
QString stateKey () const
 
void setRoomId (const QString &roomId)
 Fill the pending event object with the room id. More...
 
void setSender (const QString &senderId)
 Fill the pending event object with the sender id. More...
 
void setTransactionId (const QString &txnId)
 Fill the pending event object with the transaction id. More...
 
void addId (const QString &newId)
 Add an event id to locally created events after they are sent. More...
 
void setOriginalEvent (event_ptr_tt< EncryptedEvent > &&originalEvent)
 
const EncryptedEventoriginalEvent () const
 
const QJsonObject encryptedJson () const
 
- Public Member Functions inherited from Quotient::Event
virtual const AbstractEventMetaTypemetaType () const
 
 Event (Event &&) noexcept=default
 
Eventoperator= (Event &&)=delete
 
virtual ~Event ()
 
QString matrixType () const
 Exact Matrix type stored in JSON. More...
 
template<EventClass EventT>
bool is () const
 
template<typename... VisitorTs>
auto switchOnType (VisitorTs &&... visitors) const
 Apply one of the visitors based on the actual event type. More...
 
const QJsonObject & fullJson () const
 
const QJsonObject contentJson () const
 
template<typename T , typename KeyT >
const T contentPart (KeyT &&key) const
 Get a part of the content object, assuming a given type. More...
 
const QJsonObject unsignedJson () const
 
template<typename T , typename KeyT >
const T unsignedPart (KeyT &&key) const
 Get a part of the unsigned object, assuming a given type. More...
 
bool isStateEvent () const
 

Protected Member Functions

 KeylessStateEventBase (const QJsonObject &fullJson)
 
- Protected Member Functions inherited from Quotient::StateEvent
 StateEvent (const QJsonObject &json)
 
void dumpTo (QDebug dbg) const override
 
- Protected Member Functions inherited from Quotient::RoomEvent
 RoomEvent (const QJsonObject &json)
 
- Protected Member Functions inherited from Quotient::Event
 Event (const QJsonObject &json)
 
QJsonObject & editJson ()
 

Additional Inherited Members

- Public Types inherited from Quotient::EventTemplate< EventT, StateEvent, ContentT >
using content_type = ContentT
 
- Static Public Member Functions inherited from Quotient::StateEvent
static bool isValid (const QJsonObject &fullJson)
 
static QJsonObject basicJson (const QString &matrixTypeId, const QString &stateKey={}, const QJsonObject &contentJson={})
 Make a minimal correct Matrix state event JSON. More...
 
- Static Public Member Functions inherited from Quotient::Event
static QJsonObject basicJson (const QString &matrixType, const QJsonObject &content)
 Make a minimal correct Matrix event JSON. More...
 
- Static Public Attributes inherited from Quotient::StateEvent
static constexpr auto needsStateKey = false
 Static setting of whether a given even type uses state keys. More...
 
- Static Public Attributes inherited from Quotient::Event
static EventMetaType< EventBaseMetaType { "Event" }
 

Detailed Description

template<typename EventT, typename ContentT>
class Quotient::KeylessStateEventBase< EventT, ContentT >

Definition at line 118 of file stateevent.h.

Constructor & Destructor Documentation

◆ KeylessStateEventBase() [1/2]

template<typename EventT , typename ContentT >
template<typename... ContentParamTs>
Quotient::KeylessStateEventBase< EventT, ContentT >::KeylessStateEventBase ( ContentParamTs &&...  contentParams)
inlineexplicit

Definition at line 125 of file stateevent.h.

◆ KeylessStateEventBase() [2/2]

template<typename EventT , typename ContentT >
Quotient::KeylessStateEventBase< EventT, ContentT >::KeylessStateEventBase ( const QJsonObject &  fullJson)
inlineexplicitprotected

Definition at line 130 of file stateevent.h.


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