Base Framework
Classes | Public Member Functions | Static Public Member Functions | List of all members
MediaBlob Class Reference

#include <base/media/Media.h>

Classes

class  KeyValue
 

Public Member Functions

 MediaBlob ()
 
 MediaBlob (const String &key, const String &bytes, bool encode=false)
 
 MediaBlob (String &&key, String &&bytes, bool encode=false)
 
MediaBlobadd (const String &key, const String &bytes, bool encode=false)
 
MediaBlobadd (String &&key, String &&bytes, bool encode=false)
 
bool hasKey (const String &key) const noexcept
 
MemorySize getSize () const noexcept
 
const KeyValuebegin () const noexcept
 
const KeyValueend () const noexcept
 
ClingMimeBundle getBundle () const
 

Static Public Member Functions

static const StringgetPlainType ()
 
static const StringgetHTMLType ()
 

Detailed Description

Media blob. Lower level object with minimum dependencies.

Constructor & Destructor Documentation

◆ MediaBlob() [1/3]

MediaBlob::MediaBlob ( )

Initializes media blob.

◆ MediaBlob() [2/3]

MediaBlob::MediaBlob ( const String key,
const String bytes,
bool  encode = false 
)

Initializes media blob.

◆ MediaBlob() [3/3]

MediaBlob::MediaBlob ( String &&  key,
String &&  bytes,
bool  encode = false 
)

Initializes media blob.

Member Function Documentation

◆ add() [1/2]

MediaBlob& MediaBlob::add ( const String key,
const String bytes,
bool  encode = false 
)

Adds key.

◆ add() [2/2]

MediaBlob& MediaBlob::add ( String &&  key,
String &&  bytes,
bool  encode = false 
)

Adds key.

◆ begin()

const KeyValue* MediaBlob::begin ( ) const
inlinenoexcept

Returns the begin iterator.

◆ end()

const KeyValue* MediaBlob::end ( ) const
inlinenoexcept

Returns the end iterator.

◆ getBundle()

ClingMimeBundle MediaBlob::getBundle ( ) const
inline

Returns bundle.

◆ getHTMLType()

static const String& MediaBlob::getHTMLType ( )
static

Returns 'text/html'.

◆ getPlainType()

static const String& MediaBlob::getPlainType ( )
static

Returns 'text/plain'.

◆ getSize()

MemorySize MediaBlob::getSize ( ) const
inlinenoexcept

Returns the size.

◆ hasKey()

bool MediaBlob::hasKey ( const String key) const
noexcept

Returns true if the key exists.