#include <nawa/util/MimeMultipart.h>
Classes | |
class | Part |
Public Types | |
using | HeadersMap = std::unordered_map< std::string, std::string > |
Public Member Functions | |
virtual | ~MimeMultipart () |
MimeMultipart () | |
MimeMultipart (MimeMultipart const &other) | |
MimeMultipart & | operator= (const MimeMultipart &other) |
MimeMultipart (MimeMultipart &&other) noexcept | |
MimeMultipart & | operator= (MimeMultipart &&other) noexcept |
MimeMultipart (std::string const &contentType, std::string content) | |
void | parse (std::string const &contentType, std::string content) |
std::vector< Part > & | parts () noexcept |
std::vector< Part > const & | parts () const noexcept |
MimeMultipart & | parts (std::vector< Part > value) noexcept |
void | clear () |
Class for parsing MIME multipart data, usually transmitted through POST. Currently, only parsing (and not creating) is supported, but it could be extended in future to create MIME for emails as well. The implementation currently does NOT support nested MIME parts.
Definition at line 39 of file MimeMultipart.h.
using nawa::MimeMultipart::HeadersMap = std::unordered_map<std::string, std::string> |
Definition at line 43 of file MimeMultipart.h.
|
virtual |
nawa::MimeMultipart::MimeMultipart | ( | ) |
nawa::MimeMultipart::MimeMultipart | ( | MimeMultipart const & | other | ) |
|
noexcept |
MimeMultipart::MimeMultipart | ( | std::string const & | contentType, |
std::string | content | ||
) |
Construct a MimeMultipart container and parse content. Throws a nawa::Exception in case of a parsing error (see parse() for details).
contentType | Content type of the data in content, including the boundary. |
content | A MIME multipart source according to RFC 2046. |
Definition at line 82 of file MimeMultipart.cpp.
MimeMultipart & nawa::MimeMultipart::operator= | ( | const MimeMultipart & | other | ) |
|
noexcept |
void MimeMultipart::parse | ( | std::string const & | contentType, |
std::string | content | ||
) |
Parse content into the MimeMultipart container. Clears the existing content before. Throws a nawa::Exception in case of a parsing error. Error codes:
contentType | Content type of the data in content, including the boundary. |
content | A MIME multipart source according to RFC 2046. |
Definition at line 86 of file MimeMultipart.cpp.
|
noexcept |
Access the MIME parts generated by the parser (in future, this class may be able to generate MIME using these parts, therefore, it is already possible to set them).
|
noexcept |
|
noexcept |
void MimeMultipart::clear | ( | ) |
Clear the existing content in the container.
Definition at line 162 of file MimeMultipart.cpp.