SourcePro® API Reference Guide

 
List of all members | Public Member Functions | Protected Member Functions
RWMimeMultipartRelatedType Class Reference

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

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)
 
virtual ~RWMimeMultipartRelatedType (void)
 
RWCString getStart (void) const
 
RWCString getStartInfo (void) const
 
RWCString getType (void) const
 
RWMimeMultipartRelatedTypeoperator= (const RWMimeMultipartRelatedType &second)
 
void setStart (const RWCString &contentId)
 
void setStartInfo (const RWCString &startInfo)
 
void setType (const RWCString &type)
 
- Public Member Functions inherited from RWMimeMultipartType
 RWMimeMultipartType (void)
 
 RWMimeMultipartType (const RWCString &subType, const RWCString &boundary="")
 
 RWMimeMultipartType (const RWMimeMultipartType &second)
 
 RWMimeMultipartType (const RWMimeContentType &second)
 
virtual ~RWMimeMultipartType (void)
 
RWCString getBoundary (void) const
 
RWMimeMultipartTypeoperator= (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 &parameters=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 &parameter)
 
RWMimeContentTypeoperator= (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)
 
RWBodyBasebody (void) const
 
RWHandleBaseoperator= (const RWHandleBase &second)
 

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

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.

Copyright © 2023 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved.