SourcePro® 2024.1 |
SourcePro® API Reference Guide |
Represents a Content-Type
value with the media type multipart
and the subtype related
.
More...
#include <rw/mime/RWMimeMultipartRelatedType.h>
Protected Member Functions | |
virtual bool | checkType (const RWCString &mediaType, const RWCString &subType) const |
Protected Member Functions inherited from RWMimeContentType | |
RWMimeContentTypeImp & | body (void) const |
Protected Member Functions inherited from RWHandleBase | |
RWHandleBase (const RWHandleBase &second) | |
RWHandleBase (RWBodyBase *body) | |
RWHandleBase (RWStaticCtor) | |
RWHandleBase (void) | |
~RWHandleBase (void) | |
RWBodyBase & | body (void) const |
RWHandleBase & | operator= (const RWHandleBase &second) |
RWMimeMultipartRelatedType represents a Content-Type value with the media type multipart
and the subtype related
. A multipart/related
MIME part contains a set of other MIME parts intended for use as a whole. For example, a single multipart/related
message can contain an HTML page and the images referenced in the page.
A multipart/related
Content-Type value includes parameters describing how the recipient should process the message.
start
parameter declares the Content-ID of the part which a recipient should process first. For example, a message containing an HTML page and images uses the Content-ID of the HTML page as the value of the start
parameter. This parameter is optional. If the parameter is not present, the first part in the message will be processed first.type
parameter declares the Content-Type of the part which a recipient should process first. For example, a message containing an HTML page and images uses "text/html"
as the value of the type
parameter.start-info
parameter provides additional information to the receiving application. For example, a typical use of this parameter is to provide command-line arguments for the receiving application. This parameter is optional and should only be used when the message is intended for a specific application.boundary
parameter contains a string used to separate the parts of the message.RWMimeMultipartRelatedType inherits general purpose functions for working with a parameter list and convenience functions for working with the boundary
parameter. The class provides functions for working with the type
parameter, the start
parameter, and the start-info
parameter.
An instance of this class is a handle to a private, reference-counted body.
multipart/related
Content-Type header. RWMimeMultipartRelatedType::RWMimeMultipartRelatedType | ( | void | ) |
Default constructor. Constructs a multipart/related
Content-Type value. The new value does not contain a type
parameter, a start
parameter, or a start-info
parameter. The constructor creates a boundary value using RWMimeUtils::getUniqueBoundary().
RWMimeMultipartRelatedType::RWMimeMultipartRelatedType | ( | const RWCString & | type, |
const RWCString & | start = "", | ||
const RWCString & | start_info = "", | ||
const RWCString & | boundary = "" ) |
Constructs a multipart/related
Content-Type value with the given parameters. If no argument is provided for start or start_info, the new value does not contain a start parameter or a start-info parameter. If no boundary is provided, the constructor creates a boundary value using RWMimeUtils::getUniqueBoundary(). The RWCString should contain 7-bit US-ASCII data.
RWMimeMultipartRelatedType::RWMimeMultipartRelatedType | ( | const RWMimeMultipartRelatedType & | second | ) |
Copy constructor. Constructs a new handle to the body second refers to.
RWMimeMultipartRelatedType::RWMimeMultipartRelatedType | ( | const RWMimeContentType & | second | ) |
Conversion constructor. Constructs a new handle to the body second refers to. Throws RWMimeParseError if second is not a multipart/related
content type.
|
virtual |
Destructor.
|
protectedvirtual |
Returns true if mediaType matches "multipart"
and subType matches "related"
. Both comparisons are case-insensitive. The RWCString should contain 7-bit US-ASCII data.
Reimplemented from RWMimeMultipartType.
RWCString RWMimeMultipartRelatedType::getStart | ( | void | ) | const |
Returns the value of self's start parameter, or an empty string if self does not contain a start parameter. The RWCString should contain 7-bit US-ASCII data.
RWCString RWMimeMultipartRelatedType::getStartInfo | ( | void | ) | const |
Returns the value of self's start-info parameter, or an empty string if self does not contain a start-info parameter. The RWCString should contain 7-bit US-ASCII data.
RWCString RWMimeMultipartRelatedType::getType | ( | void | ) | const |
Returns the value of self's type parameter, or an empty string if self does not contain a type parameter. The RWCString should contain 7-bit US-ASCII data.
RWMimeMultipartRelatedType & RWMimeMultipartRelatedType::operator= | ( | const RWMimeMultipartRelatedType & | second | ) |
Assignment operator. Makes self a handle identical to second.
void RWMimeMultipartRelatedType::setStart | ( | const RWCString & | contentId | ) |
Sets the value of self's start parameter. The RWCString should contain 7-bit US-ASCII data.
void RWMimeMultipartRelatedType::setStartInfo | ( | const RWCString & | startInfo | ) |
Sets the value of self's start-info parameter. The RWCString should contain 7-bit US-ASCII data.
void RWMimeMultipartRelatedType::setType | ( | const RWCString & | type | ) |
Sets the value of self's type parameter. The RWCString should contain 7-bit US-ASCII data.
Copyright © 2024 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |