rwlogo
SourcePro C++ 12.0

SourcePro® C++ API Reference Guide



   SourcePro C++
Documentation Home

RWMimeMultipartRelatedType Class Reference
[MIME]

Represents a Content-Type value with the media type multipart and the subtype related. More...

#include <rw/mime/RWMimeMultipartRelatedType.h>

Inheritance diagram for RWMimeMultipartRelatedType:
RWMimeMultipartType RWMimeContentType RWHandleBase

List of all members.

Public Member Functions

 RWMimeMultipartRelatedType (void)
 RWMimeMultipartRelatedType (const RWCString &type, const RWCString &start="", const RWCString &start_info="", const RWCString &boundary="")
 RWMimeMultipartRelatedType (const RWMimeMultipartRelatedType &second)
 RWMimeMultipartRelatedType (const RWMimeContentType &second)
RWMimeMultipartRelatedTypeoperator= (const RWMimeMultipartRelatedType &second)
virtual ~RWMimeMultipartRelatedType (void)
RWCString getType (void) const
void setType (const RWCString &type)
RWCString getStart (void) const
void setStart (const RWCString &contentId)
RWCString getStartInfo (void) const
void setStartInfo (const RWCString &startInfo)

Protected Member Functions

virtual bool checkType (const RWCString &mediaType, const RWCString &subType) const

Detailed Description

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.

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.

Reference

RWMimeMultipartRelatedType conforms to the requirements in RFC 2837 for the value of a multipart/related Content-Type header.


Constructor & Destructor Documentation

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().

Note:
A default-constructed RWMimeMultipartRelatedType is invalid. A multipart/related content type must contain a type parameter.
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.

Note:
The multipart/related specification requires the value of the type parameter to match the actual Content-Type of the document to be processed first. The constructor itself cannot enforce this requirement.
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 RWMimeMultipartRelatedType::~RWMimeMultipartRelatedType ( void   )  [virtual]

Destructor.


Member Function Documentation

virtual bool RWMimeMultipartRelatedType::checkType ( const RWCString mediaType,
const RWCString subType 
) const [protected, virtual]

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.

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 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.

Note:
The multipart/related specification requires the value of the type parameter to match the actual Content-Type of the document to be processed first. The function itself cannot enforce this requirement.
 All Classes Functions Variables Typedefs Enumerations Enumerator Friends

© 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.