Module: Internet Protocols Module Package: MIME
RWMimeMultipartRelatedTypeRWMimeMultipartType RWMimeContentTypeRWHandleBase
checkType() getStart() getStartInfo() |
getType() operator=() RWMimeMultipartRelatedType() |
setStart() setStartInfo() setType() |
~RWMimeMultipartRelatedType() |
#include <rw/mime/RWMimeMultipartRelatedType.h>
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.
The 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.
The 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.
The 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.
The 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.
RWMimeMultipartRelatedType conforms to the requirements in RFC 2387 for the value of a multipart/related Content-Type header.
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().
NOTE -- A default-constructed RWMimeMultipartRelatedType is invalid. A multipart/related content type must contain a type parameter.
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.
NOTE -- The multipart/related specification requires the value of the type parameter to match the Content-Type of the part to be processed first. The constructor cannot test this requirement.
RWMimeMultipartRelatedType(const RWMimeMultipartRelatedType& second);
Copy constructor. Constructs a new handle to the body second refers to.
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 ~RWMimeMultipartRelatedType(void);
Destructor.
RWMimeMultipartRelatedType& operator=(const RWMimeMultipartRelatedType& second);
Assignment operator. Makes self a handle identical to second.
RWCString 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 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 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.
void setStart(const RWCString& contentId);
Sets the value of self's start parameter. The RWCString should contain 7-bit US-ASCII data.
NOTE -- The multipart/related specification requires the value of the start parameter to match the Content-ID of a part contained in the MIME message. The function itself cannot enforce this requirement.
void setStartInfo(const RWCString& startInfo);
Sets the value of self's start-info parameter. The RWCString should contain 7-bit US-ASCII data.
void setType(const RWCString& type);
Sets the value of self's type parameter. The RWCString should contain 7-bit US-ASCII data.
NOTE -- The multipart/related specification requires the value of the type parameter to match the Content-Type of the part to be processed first. The function itself cannot enforce this requirement.
virtual bool checkType(const RWCString& mediaType, const RWCString& subType) const;
Returns true if mediaType matches "multipart" and subType matches "related". Both comparisons are case-insensitive. The RWCString should contain 7-bit US-ASCII data.
© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.