libQuotient
A Qt library for building matrix clients
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages Concepts
Quotient::EventContent Namespace Reference

Classes

struct  AliasesEventContent
 
struct  AllowCondition
 Definition of an allow AllowCondition. More...
 
class  Base
 Base for all content types that can be stored in RoomMessageEvent. More...
 
class  FileContentBase
 The base for all file-based content classes. More...
 
struct  FileInfo
 Mix-in class representing info subobject in content JSON. More...
 
struct  ImageInfo
 A content info class for image/video content types and thumbnails. More...
 
struct  JoinRuleContent
 The content of a join rule event. More...
 
class  LocationContent
 Content class for m.location. More...
 
class  PlayableContent
 A base class for info types that include duration: audio and video. More...
 
struct  SingleKeyValue
 
class  TextContent
 Rich text content for m.text, m.emote, m.notice. More...
 
struct  Thumbnail
 An auxiliary class for an info type that carries a thumbnail. More...
 
class  UrlBasedContent
 A template class for content types with a URL and additional info. More...
 

Typedefs

using ImageContent = UrlBasedContent< ImageInfo >
 Content class for m.image.
 
using FileContent = UrlBasedContent< FileInfo >
 Content class for m.file.
 
using VideoContent = PlayableContent< ImageInfo >
 Content class for m.video.
 
using AudioContent = PlayableContent< FileInfo >
 Content class for m.audio.
 

Functions

QUOTIENT_API QJsonObject toInfoJson (const FileInfo &info)
 
QUOTIENT_API QJsonObject toInfoJson (const ImageInfo &info)
 

Variables

constexpr std::array JoinRuleStrings
 

Typedef Documentation

◆ AudioContent

Content class for m.audio.

Available fields:

  • corresponding to the top-level JSON:
    • url
    • filename (extension to the CS API spec)
  • corresponding to the "info" subobject:
    • payloadSize ("size" in JSON)
    • mimeType ("mimetype" in JSON)
    • duration
    • thumbnail.url ("thumbnail_url" in JSON)
  • corresponding to the "info/thumbnail_info" subobject: contents of thumbnail field, in the same vein as for "info":
    • payloadSize
    • mimeType
    • imageSize

Definition at line 344 of file eventcontent.h.

◆ FileContent

Content class for m.file.

Available fields:

  • corresponding to the top-level JSON:
    • source (corresponding to url or file in JSON)
    • filename
  • corresponding to the info subobject:
    • payloadSize (size in JSON)
    • mimeType (mimetype in JSON)
    • thumbnail.source (thumbnail_url or thumbnail_file in JSON)
  • corresponding to the info/thumbnail_info subobject:
    • thumbnail.payloadSize
    • thumbnail.mimeType
    • thumbnail.imageSize (QSize for h and w in JSON)

Definition at line 286 of file eventcontent.h.

◆ ImageContent

Content class for m.image.

Available fields:

  • corresponding to the top-level JSON:
    • source (corresponding to url or file in JSON)
    • filename (extension to the spec)
  • corresponding to the info subobject:
    • payloadSize (size in JSON)
    • mimeType (mimetype in JSON)
    • imageSize (QSize for a combination of h and w in JSON)
    • thumbnail.url (thumbnail_url in JSON)
  • corresponding to the info/thumbnail_info subobject: contents of thumbnail field, in the same vein as for the main image:
    • payloadSize
    • mimeType
    • imageSize

Definition at line 270 of file eventcontent.h.

◆ VideoContent

Content class for m.video.

Available fields:

  • corresponding to the top-level JSON:
    • url
    • filename (extension to the CS API spec)
  • corresponding to the "info" subobject:
    • payloadSize ("size" in JSON)
    • mimeType ("mimetype" in JSON)
    • duration
    • imageSize (QSize for a combination of "h" and "w" in JSON)
    • thumbnail.url ("thumbnail_url" in JSON)
  • corresponding to the "info/thumbnail_info" subobject: contents of thumbnail field, in the same vein as for "info":
    • payloadSize
    • mimeType
    • imageSize

Definition at line 326 of file eventcontent.h.

Function Documentation

◆ toInfoJson() [1/2]

QUOTIENT_API QJsonObject Quotient::EventContent::toInfoJson ( const FileInfo info)

◆ toInfoJson() [2/2]

QUOTIENT_API QJsonObject Quotient::EventContent::toInfoJson ( const ImageInfo info)

Variable Documentation

◆ JoinRuleStrings

constexpr std::array Quotient::EventContent::JoinRuleStrings
constexpr
Initial value:
{
"public"_L1,
"knock"_L1,
"invite"_L1,
"private"_L1,
"restricted"_L1,
"knock_restricted"_L1,
}

Definition at line 21 of file roomjoinrulesevent.h.