SourcePro® 2023.1 |
SourcePro® API Reference Guide |
Represents a Content-Type
value with the media type multipart
.
More...
#include <rw/mime/RWMimeMultipartType.h>
Public Member Functions | |
RWMimeMultipartType (void) | |
RWMimeMultipartType (const RWCString &subType, const RWCString &boundary="") | |
RWMimeMultipartType (const RWMimeMultipartType &second) | |
RWMimeMultipartType (const RWMimeContentType &second) | |
virtual | ~RWMimeMultipartType (void) |
RWCString | getBoundary (void) const |
RWMimeMultipartType & | operator= (const RWMimeMultipartType &second) |
void | setBoundary (const RWCString &boundary) |
Public Member Functions inherited from RWMimeContentType | |
RWMimeContentType (void) | |
RWMimeContentType (const RWCString &mediaType, const RWCString &subType, const RWMimeParameterList ¶meters=RWMimeParameterList()) | |
RWMimeContentType (const RWMimeContentType &second) | |
virtual | ~RWMimeContentType (void) |
RWCString | asString (void) const |
size_t | findParameter (const RWCString &name, size_t start=0) const |
void | fromString (const RWCString &contentType) |
RWCString | getMediaType (void) const |
RWMimeParameter | getParameter (size_t i) const |
size_t | getParameterCount (void) const |
RWCString | getParameterValue (const RWCString &name, size_t start=0) const |
RWCString | getSubType (void) const |
void | insertParameter (const RWMimeParameter ¶meter) |
RWMimeContentType & | operator= (const RWMimeContentType &second) |
void | removeAllParameters (void) |
void | removeParameter (size_t position) |
void | setParameterValue (const RWCString &name, const RWCString &value, size_t start=0) |
Public Member Functions inherited from RWHandleBase | |
bool | isValid (void) const |
bool | operator!= (const RWHandleBase &second) const |
bool | operator< (const RWHandleBase &second) const |
bool | operator== (const RWHandleBase &second) const |
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 (void) | |
RWHandleBase (RWStaticCtor) | |
RWHandleBase (RWBodyBase *body) | |
RWHandleBase (const RWHandleBase &second) | |
~RWHandleBase (void) | |
RWBodyBase & | body (void) const |
RWHandleBase & | operator= (const RWHandleBase &second) |
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
.
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::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::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::RWMimeMultipartType | ( | const RWMimeMultipartType & | second | ) |
Copy constructor. Constructs a new handle to the body second refers to.
RWMimeMultipartType::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 |
Destructor.
|
protectedvirtual |
Returns true
if mediaType is "multipart"
. The RWCString should contain 7-bit US-ASCII data.
Reimplemented from RWMimeContentType.
Reimplemented in RWMimeMultipartRelatedType.
RWCString RWMimeMultipartType::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.
RWMimeMultipartType& RWMimeMultipartType::operator= | ( | const RWMimeMultipartType & | second | ) |
Assignment operator. Makes self a handle identical to second.
void RWMimeMultipartType::setBoundary | ( | const RWCString & | boundary | ) |
Sets the value of self's boundary parameter. The RWCString should contain 7-bit US-ASCII data.
Copyright © 2023 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |