Interface against an attached file.
More...
#include <iattachment.h>
|
virtual | ~IAttachment () override=default |
| Default destructor.
|
|
virtual void | CreatorIndex (uint16_t creator)=0 |
| Sets the Creator index.
|
|
virtual uint16_t | CreatorIndex () const =0 |
| Returns the creator index.
|
|
virtual void | IsEmbedded (bool embed)=0 |
| Set true if embedded.
|
|
virtual bool | IsEmbedded () const =0 |
| True if embedded.
|
|
virtual void | IsCompressed (bool compress)=0 |
| Set true tp compress.
|
|
virtual bool | IsCompressed () const =0 |
| True if compressed.
|
|
virtual std::optional< std::string > | Md5 () const =0 |
| Return the MDG checksum if it exist.
|
|
virtual void | FileName (const std::string &filename)=0 |
| Sets the filename. Include path.
|
|
virtual const std::string & | FileName () const =0 |
| Returns the filename.
|
|
virtual void | FileType (const std::string &file_type)=0 |
| Sets the MIME type of the file.
|
|
virtual const std::string & | FileType () const =0 |
| Returns the MIME type of the string.
|
|
virtual IMetaData * | CreateMetaData ()=0 |
| Create a meta-data (MD) block.
|
|
virtual IMetaData * | MetaData () const =0 |
| Returns the meta-data (MD) block.
|
|
virtual | ~IBlock ()=default |
| Default destructor.
|
|
virtual int64_t | Index () const =0 |
| File position within the file.
|
|
virtual std::string | BlockType () const =0 |
| Returns the block type.
|
|
The attachment (AT) block is used to reference and/or embed the file content. Note that the filename must be a valid path if the file should be embedded.
◆ CreateMetaData()
virtual IMetaData * mdf::IAttachment::CreateMetaData |
( |
| ) |
|
|
nodiscardpure virtual |
Creates a meta-data (MD) block. Note that the AT block normally only have the description TX-tag included. See also IMetaData class.
- Returns
- Returns a pointer to an IMetaData class.
◆ CreatorIndex()
virtual uint16_t mdf::IAttachment::CreatorIndex |
( |
| ) |
const |
|
nodiscardpure virtual |
The index is actually the index to a File Header (FH) block in the file. The first FH block has index 0 while the next has index 1 and so on.
- Returns
- Index to FH block.
◆ FileName() [1/2]
virtual const std::string & mdf::IAttachment::FileName |
( |
| ) |
const |
|
nodiscardpure virtual |
Returns the filename.
- Returns
- Filename.
◆ FileName() [2/2]
virtual void mdf::IAttachment::FileName |
( |
const std::string & | filename | ) |
|
|
pure virtual |
Sets the filename. Include a valid path if MD5 and contents shall be included.
- Parameters
-
filename | Filename with valid path. |
◆ FileType() [1/2]
virtual const std::string & mdf::IAttachment::FileType |
( |
| ) |
const |
|
nodiscardpure virtual |
Returns the MIME type string
- Returns
◆ FileType() [2/2]
virtual void mdf::IAttachment::FileType |
( |
const std::string & | file_type | ) |
|
|
pure virtual |
The file type should be a MIME type string.
- Parameters
-
file_type | MIME type string. |
◆ Md5()
virtual std::optional< std::string > mdf::IAttachment::Md5 |
( |
| ) |
const |
|
nodiscardpure virtual |
Returns the MD5 checksum string if it is supplied.
- Returns
- MD5 checksum string.
◆ MetaData()
virtual IMetaData * mdf::IAttachment::MetaData |
( |
| ) |
const |
|
nodiscardpure virtual |
Returns existing meta-data block. Note, may return nullptr.
- Returns
- Pointer to a IMeteData block or nullptr if it doesn't exists.
The documentation for this class was generated from the following file: