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

Classes

class  Base
 Base for all content types that can be stored in RoomMessageEvent. 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  Thumbnail
 An auxiliary class for an info type that carries a thumbnail. More...
 
class  FileContentBase
 The base for all file-based content classes. More...
 
class  TextContent
 Rich text content for m.text, m.emote, m.notice. More...
 
class  LocationContent
 Content class for m.location. More...
 
class  UrlBasedContent
 A template class for content types with a URL and additional info. More...
 
class  PlayableContent
 A base class for info types that include duration: audio and video. More...
 
struct  AliasesEventContent
 
struct  SingleKeyValue
 

Typedefs

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

Functions

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

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)