rwlogo
SourcePro C++ 12.0

SourcePro® C++ API Reference Guide



   SourcePro C++
Documentation Home

RWMimeTextType Class Reference
[MIME]

Represents a Content-Type value with the media type text. More...

#include <rw/mime/RWMimeTextType.h>

Inheritance diagram for RWMimeTextType:
RWMimeContentType RWHandleBase

List of all members.

Public Member Functions

 RWMimeTextType (void)
 RWMimeTextType (const RWCString &subType, const RWCString &charset="")
 RWMimeTextType (const RWMimeTextType &second)
 RWMimeTextType (const RWMimeContentType &second)
RWMimeTextTypeoperator= (const RWMimeTextType &second)
virtual ~RWMimeTextType (void)
RWCString getCharset (void) const
void setCharset (const RWCString &charset)

Protected Member Functions

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

Detailed Description

RWMimeTextType represents a Content-Type value with the media type text. The MIME specification states that a Content-Type header for text may contain a charset parameter. If present, the parameter specifies the character set used for the body of the MIME part containing the header. If the charset parameter is not present, the character set of the part is defined as US-ASCII.

An instance of the class is a handle to a private, reference-counted body.

Reference

RWMimeTextType conforms to the text Content-Type header requirements specified in RFC 2046, section 4.1 (p. 6).


Constructor & Destructor Documentation

RWMimeTextType::RWMimeTextType ( void   ) 

Default constructor. Constructs a text Content-Type value with the subtype "plain". The value does not contain a charset parameter.

Note:
A text Content-Type value without a charset parameter defines the character set of the part body as US-ASCII.
RWMimeTextType::RWMimeTextType ( const RWCString subType,
const RWCString charset = "" 
)

Constructs a text Content-Type value with the subtype subType. When a charset argument is present, the new value contains a charset parameter with the value charset. Otherwise, the new value does not contain a charset parameter. The RWCString should contain 7-bit US-ASCII data.

Note:
A text Content-Type value without a charset parameter defines the character set of the part body as US-ASCII.
RWMimeTextType::RWMimeTextType ( const RWMimeTextType second  ) 

Constructs a new handle to the body second refers to.

RWMimeTextType::RWMimeTextType ( const RWMimeContentType second  ) 

Conversion constructor. Constructs a new handle to the body second refers to. Throws RWMimeError if second does not have the media type "text".

virtual RWMimeTextType::~RWMimeTextType ( void   )  [virtual]

Destructor.


Member Function Documentation

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

Returns true if mediaType is "text", false otherwise. The RWCString should contain 7-bit US-ASCII data.

Reimplemented from RWMimeContentType.

RWCString RWMimeTextType::getCharset ( void   )  const

Returns the value of self's charset parameter, or an empty string if self does not contain a charset parameter. The RWCString should contain 7-bit US-ASCII data.

RWMimeTextType& RWMimeTextType::operator= ( const RWMimeTextType second  ) 

Makes self a handle identical to second.

void RWMimeTextType::setCharset ( const RWCString charset  ) 

Sets the value of self's charset parameter. The RWCString should contain 7-bit US-ASCII data.

 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.