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  TypedBase
 
class  UrlBasedContent
 A template class for content types with a URL and additional info. More...
 
struct  AliasesEventContent
 
class  TextContent
 
class  LocationContent
 
class  PlayableContent
 
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 >
 
using AudioContent = PlayableContent< FileInfo >
 

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 - extension to the spec)
  • corresponding to the "info/thumbnail_info" subobject: contents of thumbnail field (extension to the spec):
    • payloadSize
    • mimeType
    • imageSize

Definition at line 218 of file roommessageevent.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 248 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 232 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 198 of file roommessageevent.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)