Module: Internet Protocols Module Package: MIME
RWMimeMultipartTypeRWMimeContentTypeRWHandleBase
#include <rw/mime/RWMimeMultipartType.h>
RWMimeMultipartType represents a Content-Type value with the media type multipart. As the name implies, the body of a multipart MIME part contains other MIME parts. The MIME specification requires that the header for a multipart Content-Type header contain a boundary parameter. The value of that parameter forms the boundary between the contained parts. For example, the message below specifies a multipart/alternative Content-Type with the boundary uniquestring.
MIME-Version: 1.0 Content-Type: multipart/alternative; boundary=uniquestring From: Rudi Marquez <rudi_marquez@roguewave.com> To: Andy Roture <roture@example.org> Date: Tue, 30 Oct 2001 08:00:53 -0700 (PDT) Subject: A multipart/alternative message Preamble text. --uniquestring Content-Type: text/plain; charset=us-ascii The message (in plain text). --uniquestring Content-Type: text/html; charset=us-ascii <B>The message (in bold HTML text).</B> --uniquestring--
This class inherits general purpose functions for working with a parameter list and provides convenience functions for working with the boundary parameter.
An instance of this class is a handle to a private, reference-counted body.
RWMimeMultipartType conforms to the multipart Content-Type header requirements specified in RFC 2045, Section 5.1.
RWMimeMultipartType(void);
Default constructor. Constructs a multipart Content-Type value with the subtype "mixed". The value contains a boundary parameter with a boundary created by RWMimeUtils::getUniqueBoundary().
RWMimeMultipartType(const RWCString& subType, const RWCString& boundary = "");
Constructs a multipart Content-Type value with the subtype subType. The value contains a boundary parameter with the value boundary. If no boundary is provided, a boundary value is created using RWMimeUtils::getUniqueBoundary(). The RWCString should contain 7-bit US-ASCII data.
RWMimeMultipartType(const RWMimeMultipartType& second);
Copy constructor. Constructs a new handle to the body second refers to.
RWMimeMultipartType(const RWMimeContentType& second);
Conversion constructor. Constructs a new handle to the body second refers to. Throws RWMimeError if the media type of second is not "multipart".
virtual ~RWMimeMultipartType(void);
Destructor.
RWMimeMultipartType& operator=(const RWMimeMultipartType& second);
Assignment operator. Makes self a handle identical to second.
RWCString getBoundary(void) const;
Returns the value of self's boundary parameter, or an empty string if self does not contain a boundary parameter. The RWCString should contain 7-bit US-ASCII data.
void setBoundary(const RWCString& value);
Sets the value of self's boundary parameter. The RWCString should contain 7-bit US-ASCII data.
NOTE -- The getUniqueBoundary() function of RWMimeUtils generates boundary strings.
virtual bool checkType(const RWCString& mediaType, const RWCString& subType) const;
Returns true if mediaType is "multipart". 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.