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

RWMimePart

Module:  Internet Protocols Module   Package:  MIME


RWMimePartRWHandleBase

Local Index

Members

Header File

#include <rw/mime/RWMimePart.h> 

Description

RWMimePart represents a MIME part. Each part has a body, the actual content of the part, and a list of headers that describe the body. The body may contain either a single document or a collection of other MIME parts.

RWMimePart provides functions for manipulating the header list and setting the body of the part. The derived class RWMimeMultipart represents parts with multipart bodies and provides functions for working with multipart bodies.

The MIME specification requires a top-level MIME message to contain a MIME-Version header. This header is optional for parts within a multipart message. No headers are required for every MIME part, but the MIME specification defines the following default values:

The example below is a complete MIME part. The part has the transfer encoding 7bit, even though the part does not contain a Content-Transfer-Encoding header. The body of the part is a simple HTML document.

This code snippet constructs an equivalent MIME part.

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

Reference

RWMimePart provides an encapsulation of the Multipurpose Internet Mail Extensions (MIME) as described in RFC 2045 - 2049.

Public Constructor

RWMimePart(void);
RWMimePart(const RWMimeContentType& type);
RWMimePart(const RWMimePart& second);

Public Destructor

virtual ~RWMimePart(void);

Public Member Operator

RWMimePart&
operator=(const RWMimePart& second);

Public Member Functions

RWCString
asString(void) const;
size_t
findHeader(const RWCString& label,
           size_t start = 0) const;
void
fromString(const RWCString& partString);
RWCString
getBody(void) const;
RWMimeHeader
getHeader(size_t position) const;
size_t
getHeaderCount(void) const;
void
insertHeader(const RWMimeHeader& header);
void
insertHeaderAt(size_t position,
               const RWMimeHeader& header);
bool
isMultipart(void) const;
void
removeHeaderAt(size_t position);
void
setBody(const RWCString& body);


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.