libQuotient
A Qt library for building matrix clients
Quotient::EventContent::Thumbnail Struct Reference

An auxiliary class for an info type that carries a thumbnail. More...

#include <eventcontent.h>

Inheritance diagram for Quotient::EventContent::Thumbnail:
Collaboration diagram for Quotient::EventContent::Thumbnail:

Public Member Functions

 Thumbnail (const QJsonObject &infoJson)
 
void dumpTo (QJsonObject &infoJson) const
 Add thumbnail information to the passed info JSON object. More...
 
 ImageInfo ()=default
 
 ImageInfo (const QFileInfo &fi, QSize imageSize={})
 
 ImageInfo (FileSourceInfo sourceInfo, qint64 fileSize=-1, const QMimeType &type={}, QSize imageSize={}, const QString &originalFilename={})
 
 ImageInfo (FileSourceInfo sourceInfo, const QJsonObject &infoJson, const QString &originalFilename={})
 
- Public Member Functions inherited from Quotient::EventContent::ImageInfo
 ImageInfo ()=default
 
 ImageInfo (const QFileInfo &fi, QSize imageSize={})
 
 ImageInfo (FileSourceInfo sourceInfo, qint64 fileSize=-1, const QMimeType &type={}, QSize imageSize={}, const QString &originalFilename={})
 
 ImageInfo (FileSourceInfo sourceInfo, const QJsonObject &infoJson, const QString &originalFilename={})
 
- Public Member Functions inherited from Quotient::EventContent::FileInfo
 FileInfo ()=default
 
 FileInfo (const QFileInfo &fi)
 Construct from a QFileInfo object. More...
 
 FileInfo (FileSourceInfo sourceInfo, qint64 payloadSize=-1, const QMimeType &mimeType={}, QString originalFilename={})
 
 FileInfo (FileSourceInfo sourceInfo, const QJsonObject &infoJson, QString originalFilename={})
 Construct from a JSON info payload. More...
 
bool isValid () const
 
QUrl url () const
 
QString mediaId () const
 Extract media id from the URL. More...
 

Additional Inherited Members

- Public Attributes inherited from Quotient::EventContent::ImageInfo
QSize imageSize
 
- Public Attributes inherited from Quotient::EventContent::FileInfo
FileSourceInfo source
 
QJsonObject originalInfoJson
 
QMimeType mimeType
 
qint64 payloadSize = 0
 
QString originalName
 

Detailed Description

An auxiliary class for an info type that carries a thumbnail.

This class saves/loads a thumbnail to/from info subobject of the JSON representation of event content; namely, info/thumbnail_url (or, in case of an encrypted thumbnail, info/thumbnail_file) and info/thumbnail_info fields are used.

Definition at line 147 of file eventcontent.h.

Constructor & Destructor Documentation

◆ Thumbnail()

Quotient::EventContent::Thumbnail::Thumbnail ( const QJsonObject &  infoJson)
explicit

Member Function Documentation

◆ dumpTo()

void Quotient::EventContent::Thumbnail::dumpTo ( QJsonObject &  infoJson) const

Add thumbnail information to the passed info JSON object.

◆ ImageInfo() [1/4]

Quotient::EventContent::ImageInfo::ImageInfo
default

◆ ImageInfo() [2/4]

Quotient::EventContent::ImageInfo::ImageInfo
explicit

◆ ImageInfo() [3/4]

Quotient::EventContent::ImageInfo::ImageInfo

◆ ImageInfo() [4/4]

Quotient::EventContent::ImageInfo::ImageInfo
explicit

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