HydraExpress™ C++ 2019 |
HydraExpress™ C++ API Reference Guide |
Product Documentation: HydraExpress C++ Documentation Home |
Represents a MIME attachment in generated code. More...
#include <rwsf/webservice/MessageAttachment.h>
Public Member Functions | |
MessageAttachment () | |
MessageAttachment (const std::string &uid, const std::string &ct="application/binary") | |
MessageAttachment (const MessageAttachment &m) | |
std::string | getContentId () const |
std::string | getContentLocation () const |
std::string | getContentType () const |
std::string | getPayload () const |
std::string | getUniqueId () const |
MessageAttachment & | operator= (const MessageAttachment &m) |
void | setContentId (const std::string &ci) |
void | setContentLocation (const std::string &cl) |
void | setContentType (const std::string &ct) |
void | setPayload (const std::string &payload) |
void | setUniqueId (const std::string &uid) |
const rwsf::MimeHeaders & | headers () const |
rwsf::MimeHeaders & | headers () |
In generated code, RWSF represents WSDL-defined message parts that have a Multipurpose Internet Mail Extensions (MIME) binding as type rwsf::MessageAttachment. This class encapsulates the message payload, its Content-Type
, and any custom-defined Content-Id
or Content-Location
data.
rwsf::MessageAttachment::MessageAttachment | ( | ) |
Default constructor. The message is assigned a default, unique Content-ID
header, and a Content-Type
of 'application/binary'.
rwsf::MessageAttachment::MessageAttachment | ( | const std::string & | uid, |
const std::string & | ct = "application/binary" |
||
) |
Constructs a MessageAttachment with the specified Unique ID uid and Content-Type ct. The uid should be in the form of a URL. If the URL is of the cid
scheme, a Content-ID
header is associated with that value, otherwise a Content-Location
is used.
rwsf::MessageAttachment::MessageAttachment | ( | const MessageAttachment & | m | ) |
Copy constructor.
std::string rwsf::MessageAttachment::getContentId | ( | ) | const |
Gets the Content-ID
header associated with this instance. If it is not present, a null string is returned.
std::string rwsf::MessageAttachment::getContentLocation | ( | ) | const |
Gets the Content-Location
header associated with this instance. If it is not present, a null string is returned.
std::string rwsf::MessageAttachment::getContentType | ( | ) | const |
Gets the Content-Type
header associated with this instance. If it is not present, a null string is returned.
std::string rwsf::MessageAttachment::getPayload | ( | ) | const |
Gets the payload of the attachment.
std::string rwsf::MessageAttachment::getUniqueId | ( | ) | const |
Returns the Unique ID for this instance. If a Content-ID
header is present, it is used, otherwise the Content-Location
header is used. If neither is present, an empty string is returned.
Content-ID
header is present, the returned string has cid:
prepended to it. const rwsf::MimeHeaders& rwsf::MessageAttachment::headers | ( | ) | const |
Returns a reference to the data structure holding the headers for this instance.
rwsf::MimeHeaders& rwsf::MessageAttachment::headers | ( | ) |
Returns a reference to the data structure holding the headers for this instance.
MessageAttachment& rwsf::MessageAttachment::operator= | ( | const MessageAttachment & | m | ) |
Assignment operator.
void rwsf::MessageAttachment::setContentId | ( | const std::string & | ci | ) |
Sets the Content-ID header for this instance. If a Content-ID
header is already present, it is replaced.
Content-ID
header value should take the form of '<'
+ unique identifier + '>'
. void rwsf::MessageAttachment::setContentLocation | ( | const std::string & | cl | ) |
Sets the Content-Location
header for this instance. If a Content-Location
header is already present, it will be replaced.
Content-Location
header value should take the form of a URL. void rwsf::MessageAttachment::setContentType | ( | const std::string & | ct | ) |
Sets the Content-Type
header for this instance. If a Content-Type
header is already present, it is replaced.
void rwsf::MessageAttachment::setPayload | ( | const std::string & | payload | ) |
Sets the payload of the attachment.
void rwsf::MessageAttachment::setUniqueId | ( | const std::string & | uid | ) |
Sets the Unique ID for this instance. The uid specified should be in the form of a URL. If the URL is of a cid
scheme, a Content-ID
header is associated with that value, otherwise a Content-Location
header is used.
Copyright © 2019 Rogue Wave Software, Inc. All Rights Reserved. |