CMSDK 2.0.1
Cross-platform C++ base library and SDK for the Psyclone AIOS platform
Loading...
Searching...
No Matches
cmlabs::JSONMEntry Struct Reference

Metadata for one binary attachment chunk inside a JSONM container. More...

#include <NetworkProtocols.h>

Collaboration diagram for cmlabs::JSONMEntry:
[legend]

Public Member Functions

std::string getInfoString ()
std::string toJSON ()

Public Attributes

uint32 chunk
 Chunk index within the container (1-based).
uint64 size
 Attachment size in bytes.
uint64 offset
 Byte offset of the attachment within the container data.
std::string name
 Attachment name.
std::string type
 MIME type of the attachment.

Detailed Description

Metadata for one binary attachment chunk inside a JSONM container.

Definition at line 326 of file NetworkProtocols.h.

Member Function Documentation

◆ getInfoString()

std::string cmlabs::JSONMEntry::getInfoString ( )
inline
Returns
A one-line human-readable summary of this entry.

Definition at line 333 of file NetworkProtocols.h.

References cmlabs::utils::BytifySize(), chunk, name, offset, size, cmlabs::utils::StringFormat(), and type.

◆ toJSON()

std::string cmlabs::JSONMEntry::toJSON ( )
inline
Returns
This entry's metadata as a JSON object string.

Definition at line 338 of file NetworkProtocols.h.

References name, size, cmlabs::utils::StringFormat(), and type.

Member Data Documentation

◆ chunk

uint32 cmlabs::JSONMEntry::chunk

Chunk index within the container (1-based).

Definition at line 327 of file NetworkProtocols.h.

Referenced by cmlabs::JSONM::addData(), and getInfoString().

◆ name

std::string cmlabs::JSONMEntry::name

Attachment name.

Definition at line 330 of file NetworkProtocols.h.

Referenced by cmlabs::JSONM::addData(), getInfoString(), and toJSON().

◆ offset

uint64 cmlabs::JSONMEntry::offset

Byte offset of the attachment within the container data.

Definition at line 329 of file NetworkProtocols.h.

Referenced by cmlabs::JSONM::addData(), and getInfoString().

◆ size

uint64 cmlabs::JSONMEntry::size

Attachment size in bytes.

Definition at line 328 of file NetworkProtocols.h.

Referenced by cmlabs::JSONM::addData(), getInfoString(), and toJSON().

◆ type

std::string cmlabs::JSONMEntry::type

MIME type of the attachment.

Definition at line 331 of file NetworkProtocols.h.

Referenced by cmlabs::JSONM::addData(), getInfoString(), and toJSON().


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