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

#include <eventitem.h>

Inheritance diagram for Quotient::PendingEventItem:
Collaboration diagram for Quotient::PendingEventItem:

Public Types

using future_type = QFuture< std::reference_wrapper< const RoomEvent > >
 
- Public Types inherited from Quotient::EventItemBase
using value_type = RoomEvent
 

Public Member Functions

 PendingEventItem (RoomEventPtr &&e)
 
EventStatus::Code deliveryStatus () const
 
QDateTime lastUpdated () const
 
QString annotation () const
 
void setDeparted ()
 
void setFileUploaded (const FileSourceInfo &uploadedFileData)
 
void setReachedServer (const QString &eventId)
 
void setMerged (const RoomEvent &intoEvent)
 
void setSendingFailed (QString errorText)
 
void resetStatus ()
 
future_type whenMerged () const
 Get a future for the moment when the item gets merged in the timeline. More...
 
- Public Member Functions inherited from Quotient::EventItemBase
 EventItemBase (RoomEventPtr &&e)
 
const RoomEventevent () const
 
const RoomEventget () const
 
template<EventClass< RoomEvent > EventT>
const EventT * viewAs () const
 
const RoomEventPtroperator-> () const
 
const RoomEventoperator* () const
 
RoomEventPtr replaceEvent (RoomEventPtr &&other)
 
void setUserData (std::any userData)
 Store arbitrary data with the event item. More...
 
const std::any & userdata () const
 Obtain custom data previously stored with the event item. More...
 
std::any & userData ()
 

Additional Inherited Members

- Protected Member Functions inherited from Quotient::EventItemBase
template<EventClass< RoomEvent > EventT>
EventT * getAs ()
 

Detailed Description

Definition at line 99 of file eventitem.h.

Member Typedef Documentation

◆ future_type

using Quotient::PendingEventItem::future_type = QFuture<std::reference_wrapper<const RoomEvent> >

Definition at line 101 of file eventitem.h.

Constructor & Destructor Documentation

◆ PendingEventItem()

Quotient::PendingEventItem::PendingEventItem ( RoomEventPtr &&  e)
inlineexplicit

Definition at line 103 of file eventitem.h.

Member Function Documentation

◆ annotation()

QString Quotient::PendingEventItem::annotation ( ) const
inline

Definition at line 110 of file eventitem.h.

◆ deliveryStatus()

EventStatus::Code Quotient::PendingEventItem::deliveryStatus ( ) const
inline

Definition at line 108 of file eventitem.h.

◆ lastUpdated()

QDateTime Quotient::PendingEventItem::lastUpdated ( ) const
inline

Definition at line 109 of file eventitem.h.

◆ resetStatus()

void Quotient::PendingEventItem::resetStatus ( )
inline

Definition at line 129 of file eventitem.h.

◆ setDeparted()

void Quotient::PendingEventItem::setDeparted ( )
inline

Definition at line 112 of file eventitem.h.

◆ setFileUploaded()

void Quotient::PendingEventItem::setFileUploaded ( const FileSourceInfo uploadedFileData)

◆ setMerged()

void Quotient::PendingEventItem::setMerged ( const RoomEvent intoEvent)
inline

Definition at line 119 of file eventitem.h.

◆ setReachedServer()

void Quotient::PendingEventItem::setReachedServer ( const QString &  eventId)
inline

Definition at line 114 of file eventitem.h.

◆ setSendingFailed()

void Quotient::PendingEventItem::setSendingFailed ( QString  errorText)
inline

Definition at line 124 of file eventitem.h.

◆ whenMerged()

future_type Quotient::PendingEventItem::whenMerged ( ) const
inline

Get a future for the moment when the item gets merged in the timeline.

The future will get finished just before this pending item is merged into its remote counterpart that comes with /sync. The pending item will always be in ReachedServer state. The future result has type implicitly convertible to const RoomEvent&.

Definition at line 136 of file eventitem.h.


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