Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Internet Protocols Module Reference Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

RWMimeContentTypeHeader

Module:  Internet Protocols Module   Package:  MIME


RWMimeContentTypeHeaderRWMimeHeaderRWHandleBase

Local Index

Members

Header File

#include <rw/mime/RWMimeContentTypeHeader.h> 

Description

RWMimeContentTypeHeader represents the Content-Type header of a MIME part. The header specifies the type of data the part contains so that a recipient can process the data correctly. A Content-Type contains two elements, a media type and a subtype. The media type describes the content in broad terms, while the subtype describes the specific content. The two-level hierarchy allows both flexibility and precision.

For example, a plain text email message generally has the content type text/plain, whereas an HTML document has the content type text/html, and an XML document has the content type text/xml. In all three cases, the basic format of the document is text, and the document can be considered text for many purposes (such as deciding whether the document can be usefully opened within a text editor). The subtype indicates the specific format of the text message. While an HTML document can be displayed as plain text, rendering the document in a browser or opening the document in an HTML editor may be more appropriate.

Some content types require other parameters which contain additional information. For example, the MIME specification requires all multipart content type values to contain a boundary parameter which specifies the delimiter for message parts. A complete Content-Type header for a multipart/mixed message

has the label Content-Type and the value multipart/mixed; boundary=unique-string. The value itself contains the media type multipart, the subtype mixed, and a single parameter with the name boundary and the value unique-string.

Since the value of a Content-Type header has a complex structure, RWMimeContentType provides a convenient representation of a Content-Type value. See RWMimeContentType for details.

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

Reference

RWMimeContentTypeHeader conforms to the Content-Type header requirements specified in RFC 2045, Section 5. For details on the content types the MIME specification defines, see RFC 2046.

Public Static Data Member

static const RWCString Label;

Public Constructors

RWMimeContentTypeHeader(void);

NOTE -- A header with an empty value does not meet the requirements for a Content-Type header.
RWMimeContentTypeHeader(const RWMimeContentType& contentType);
RWMimeContentTypeHeader(const RWMimeContentTypeHeader& second);
RWMimeContentTypeHeader(const RWMimeHeader& second);

Public Destructor

virtual ~RWMimeContentTypeHeader(void);

Public Member Operator

RWMimeContentTypeHeader&
operator=(const RWMimeContentTypeHeader& second);

Public Member Functions

RWMimeContentType
getContentType(void) const;
void
setContentType(const RWMimeContentType& contentType);

Protected Member Functions

RWMimeContentTypeHeaderImp&
body(void) const;
virtual bool
checkLabel(const RWCString& label) const;


Previous fileTop of DocumentContentsIndex pageNext file

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