rwlogo
HydraExpress 4.6

HydraExpress C++ API Reference Guide


   


Rogue Wave web site:  Home Page  |  Main Documentation Page

rwsf::MessageAttachment Class Reference
[MIME Headers]

Represents a MIME attachment in generated code. More...

#include <rwsf/webservice/MessageAttachment.h>

List of all members.

Public Member Functions

 MessageAttachment ()
 MessageAttachment (const std::string &uid, const std::string &ct="application/binary")
 MessageAttachment (const MessageAttachment &m)
MessageAttachmentoperator= (const MessageAttachment &m)
std::string getUniqueId () const
void setUniqueId (const std::string &uid)
std::string getPayload () const
void setPayload (const std::string &payload)
std::string getContentType () const
void setContentType (const std::string &ct)
std::string getContentId () const
void setContentId (const std::string &ci)
std::string getContentLocation () const
void setContentLocation (const std::string &cl)

const rwsf::MimeHeadersheaders () const
rwsf::MimeHeadersheaders ()

Detailed Description

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.


Constructor & Destructor Documentation

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.


Member Function Documentation

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.

Note:
If the Content-ID header is present, the returned string has cid: prepended to it.
rwsf::MimeHeaders& rwsf::MessageAttachment::headers (  ) 

Returns a reference to the data structure holding the headers for this instance.

const rwsf::MimeHeaders& rwsf::MessageAttachment::headers (  )  const

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.

Note:
A 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.

Note:
A 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 © Rogue Wave Software, Inc. All Rights Reserved.

The Rogue Wave name and logo are registered trademarks of Rogue Wave Software, and HydraExpress is a trademark of Rogue Wave Software. All other trademarks are the property of their respective owners.