libQuotient
A Qt library for building matrix clients
Quotient::EventContent::UrlBasedContent< InfoT > Class Template Reference

A template class for content types with a URL and additional info. More...

#include <eventcontent.h>

Inheritance diagram for Quotient::EventContent::UrlBasedContent< InfoT >:
Collaboration diagram for Quotient::EventContent::UrlBasedContent< InfoT >:

Public Member Functions

 UrlBasedContent (const QJsonObject &json)
 
QMimeType type () const override
 
QUrl url () const override
 
FileInfo commonInfo () const override
 
- Public Member Functions inherited from Quotient::EventContent::FileContentBase
 FileContentBase (const QJsonObject &contentJson={})
 
- Public Member Functions inherited from Quotient::EventContent::Base
 Base (QJsonObject o={})
 
virtual ~Base ()=default
 
QJsonObject toJson () const
 
Baseoperator= (const Base &)=delete
 
Baseoperator= (Base &&)=delete
 

Protected Member Functions

QJsonObject makeInfoJson () const override
 
- Protected Member Functions inherited from Quotient::EventContent::FileContentBase
void fillJson (QJsonObject &json) const override
 
- Protected Member Functions inherited from Quotient::EventContent::Base
 Base (const Base &)=default
 
 Base (Base &&) noexcept=default
 

Additional Inherited Members

- Public Attributes inherited from Quotient::EventContent::FileContentBase
Thumbnail thumbnail
 
- Public Attributes inherited from Quotient::EventContent::Base
QJsonObject originalJson
 

Detailed Description

template<std::derived_from< FileInfo > InfoT>
class Quotient::EventContent::UrlBasedContent< InfoT >

A template class for content types with a URL and additional info.

Types that derive from this class template take url (or, if the file is encrypted, file) and, optionally, filename values from the top-level JSON object and the rest of information from the info subobject, as defined by the parameter type.

Template Parameters
InfoTbase info class - FileInfo or ImageInfo

Definition at line 233 of file eventcontent.h.

Constructor & Destructor Documentation

◆ UrlBasedContent()

template<std::derived_from< FileInfo > InfoT>
Quotient::EventContent::UrlBasedContent< InfoT >::UrlBasedContent ( const QJsonObject &  json)
inlineexplicit

Definition at line 236 of file eventcontent.h.

Member Function Documentation

◆ commonInfo()

template<std::derived_from< FileInfo > InfoT>
FileInfo Quotient::EventContent::UrlBasedContent< InfoT >::commonInfo ( ) const
inlineoverridevirtual

Implements Quotient::EventContent::FileContentBase.

Definition at line 248 of file eventcontent.h.

◆ makeInfoJson()

template<std::derived_from< FileInfo > InfoT>
QJsonObject Quotient::EventContent::UrlBasedContent< InfoT >::makeInfoJson ( ) const
inlineoverrideprotectedvirtual

◆ type()

template<std::derived_from< FileInfo > InfoT>
QMimeType Quotient::EventContent::UrlBasedContent< InfoT >::type ( ) const
inlineoverridevirtual

Implements Quotient::EventContent::Base.

Definition at line 246 of file eventcontent.h.

◆ url()

template<std::derived_from< FileInfo > InfoT>
QUrl Quotient::EventContent::UrlBasedContent< InfoT >::url ( ) const
inlineoverridevirtual

Implements Quotient::EventContent::FileContentBase.

Definition at line 247 of file eventcontent.h.


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