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

RWMimeContentType

Module:  Internet Protocols Module   Package:  MIME


RWMimeContentTypeRWHandleBase

Local Index

Members

Header File

#include <rw/mime/RWMimeContentType.h> 

Description

RWMimeContentType represents the value of a MIME Content-Type header. A Content-Type value contains a media type, a subtype, and any number of parameters.

The media type declares the type of content in broad terms. The MIME specification itself defines media types of image, text, audio, video, application, message and multipart. The subtype declares the specific file format of the content. For example, the media type image allows subtype values such as gif, jpeg, tiff, and so forth.

Parameters, if present, add information about the media type. For example, the media type text allows a parameter charset which states the character set used for the text.

A complete Content-Type value for a MIME part containing XML

has the media type text, the subtype xml, and a single parameter with the name charset and the value us-ascii.

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

Reference

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

Public Constructor

RWMimeContentType(void);

NOTE -- A Content-Type header with an empty value does not meet the requirements for an Internet Message header.
RWMimeContentType(const RWCString& mediaType,
                  const RWCString& subType,
                  const RWMimeParameterList& parameters =
                    RWMimeParameterList());
RWMimeContentType(const RWMimeContentType& second);

Public Destructor

virtual ~RWMimeContentType(void);

Public Member Operator

RWMimeContentType&
operator=(const RWMimeContentType& second);

Related Logical Operators

bool
operator==(const RWMimeContentType& first,
           const RWMimeContentType& second);
bool
operator!=(const RWMimeContentType& first,
           const RWMimeContentType& second);

Public Member Functions

RWCString
asString(void) const;
size_t
findParameter(const RWCString& name,
              size_t start = 0) const;
void
fromString(const RWCString& contentType);
RWCString
getMediaType() const;
RWMimeParameter
getParameter(size_t i) const;
size_t
getParameterCount(void) const;
RWCString
getParameterValue(const RWCString& name,
                  size_t start = 0) const;
RWCString
getSubType() const;
void
insertParameter(const RWMimeParameter& parameter);
void
removeAllParameters(void);
void
removeParameter(size_t position);
void
setParameterValue(const RWCString& name,
                  const RWCString& value,
                  size_t start=0);

Protected Member Functions

RWMimeContentTypeImp&
body(void) const;
virtual bool
checkType(const RWCString& mediaType,
          constRWCString& subType) 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.