SourcePro® API Reference Guide

 
Loading...
Searching...
No Matches
RWMimeContentTransferEncodingHeader Class Reference

Represents the Content-Transfer-Encoding header of a MIME part. More...

#include <rw/mime/RWMimeContentTransferEncodingHeader.h>

Inheritance diagram for RWMimeContentTransferEncodingHeader:
RWMimeHeader RWHandleBase

Public Member Functions

 RWMimeContentTransferEncodingHeader (const RWCString &encoding)
 
 RWMimeContentTransferEncodingHeader (const RWMimeContentTransferEncodingHeader &second)
 
 RWMimeContentTransferEncodingHeader (const RWMimeHeader &second)
 
 RWMimeContentTransferEncodingHeader (void)
 
virtual ~RWMimeContentTransferEncodingHeader (void)
 
RWCString getEncoding (void) const
 
RWMimeContentTransferEncodingHeaderoperator= (const RWMimeContentTransferEncodingHeader &second)
 
void setEncoding (const RWCString &encoding)
 
- Public Member Functions inherited from RWMimeHeader
 RWMimeHeader (const RWCString &label)
 
 RWMimeHeader (const RWMimeHeader &second)
 
 RWMimeHeader (void)
 
virtual ~RWMimeHeader (void)
 
RWCString asString (void) const
 
void fromString (const RWCString &headerString)
 
RWCString getLabel (void) const
 
RWMimeHeaderoperator= (const RWMimeHeader &second)
 
- Public Member Functions inherited from RWHandleBase
bool isValid (void) const
 
bool operator!= (const RWHandleBase &second) const
 
bool operator== (const RWHandleBase &second) const
 

Static Public Attributes

static const RWCString Label
 

Protected Member Functions

RWMimeContentTransferEncodingHeaderImp & body (void) const
 
virtual bool checkLabel (const RWCString &label) const
 
- Protected Member Functions inherited from RWMimeHeader
RWMimeHeaderImp & body (void) const
 
- Protected Member Functions inherited from RWHandleBase
 RWHandleBase (const RWHandleBase &second)
 
 RWHandleBase (RWBodyBase *body)
 
 RWHandleBase (RWStaticCtor)
 
 RWHandleBase (void)
 
 ~RWHandleBase (void)
 
RWBodyBasebody (void) const
 
RWHandleBaseoperator= (const RWHandleBase &second)
 

Detailed Description

RWMimeContentTransferEncodingHeader represents the Content-Transfer-Encoding header of a MIME part. The Content-Transfer-Encoding header identifies whether the body of the part has been encoded and/or the character set of the body. A value of 7bit, 8bit, or binary indicates that the body has not been encoded, and the data is 7-bit US-ASCII, 8-bit US-ASCII, or binary, respectively. A value of base64 or quoted-printable indicates that the body has been encoded. Since both base64 encoding and quoted-printable encoding result in 7-bit US-ASCII encoded messages, either of these values also indicates that the body contains 7-bit US-ASCII data.

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

Reference
RWMimeContentTransferEncodingHeader conforms to the Content-Transfer-Encoding header requirements specified in RFC 2045, Section 6 (p. 14). For more details on encodings, see RFC 2045 or the discussion in the Internet Protocols Module User's Guide.

Constructor & Destructor Documentation

◆ RWMimeContentTransferEncodingHeader() [1/4]

RWMimeContentTransferEncodingHeader::RWMimeContentTransferEncodingHeader ( void )

Default constructor. Constructs a header with the label "Content-Transfer-Encoding" and an empty value.

Note
A header with an empty value does not meet the requirements for a Content-Transfer-Encoding header.

◆ RWMimeContentTransferEncodingHeader() [2/4]

RWMimeContentTransferEncodingHeader::RWMimeContentTransferEncodingHeader ( const RWCString & encoding)

Constructs a header with the label "Content-Transfer-Encoding" and the value encoding. Does not validate encoding. The RWCString should contain 7-bit US-ASCII data.

◆ RWMimeContentTransferEncodingHeader() [3/4]

RWMimeContentTransferEncodingHeader::RWMimeContentTransferEncodingHeader ( const RWMimeContentTransferEncodingHeader & second)

Copy constructor. Constructs a new handle to the body second refers to.

◆ RWMimeContentTransferEncodingHeader() [4/4]

RWMimeContentTransferEncodingHeader::RWMimeContentTransferEncodingHeader ( const RWMimeHeader & second)

Conversion constructor. Constructs a new handle to the body second refers to. Throws RWMimeError if second does not have the label "Content-Transfer-Encoding".

◆ ~RWMimeContentTransferEncodingHeader()

virtual RWMimeContentTransferEncodingHeader::~RWMimeContentTransferEncodingHeader ( void )
virtual

Destructor.

Member Function Documentation

◆ body()

RWMimeContentTransferEncodingHeaderImp & RWMimeContentTransferEncodingHeader::body ( void ) const
protected

Returns a reference to the underlying implementation.

◆ checkLabel()

virtual bool RWMimeContentTransferEncodingHeader::checkLabel ( const RWCString & label) const
protectedvirtual

Returns true if label matches "Content-Transfer-Encoding", false otherwise. The comparison is case-insensitive. The RWCString should contain 7-bit US-ASCII data.

Reimplemented from RWMimeHeader.

◆ getEncoding()

RWCString RWMimeContentTransferEncodingHeader::getEncoding ( void ) const

Returns the encoding value of this header. The RWCString should contain 7-bit US-ASCII data.

◆ operator=()

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

Assignment operator. Makes self a handle identical to second.

◆ setEncoding()

void RWMimeContentTransferEncodingHeader::setEncoding ( const RWCString & encoding)

Sets the encoding value of this header. Does not validate encoding. The RWCString should contain 7-bit US-ASCII data.

Member Data Documentation

◆ Label

const RWCString RWMimeContentTransferEncodingHeader::Label
static

Static constant string containing "Content-Transfer-Encoding", the label for a Content-Transfer-Encoding header. The RWCString should contain 7-bit US-ASCII data.

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