SourcePro® API Reference Guide

 
Loading...
Searching...
No Matches
RWMimeContentIdHeader Class Reference

Represents the Content-ID header of a MIME part. More...

#include <rw/mime/RWMimeContentIdHeader.h>

Inheritance diagram for RWMimeContentIdHeader:
RWMimeHeader RWHandleBase

Public Member Functions

 RWMimeContentIdHeader (const RWCString &id)
 
 RWMimeContentIdHeader (const RWMimeContentIdHeader &second)
 
 RWMimeContentIdHeader (const RWMimeHeader &second)
 
 RWMimeContentIdHeader (void)
 
virtual ~RWMimeContentIdHeader (void)
 
RWCString getId (void) const
 
RWMimeContentIdHeaderoperator= (const RWMimeContentIdHeader &second)
 
void setId (const RWCString &id)
 
- 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

RWMimeStructuredHeaderImp & 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

RWMimeContentIdHeader represents the Content-ID header of a MIME part. The header is designed to allow external references to a MIME part. Therefore, the MIME format requires that the value of the header be world-unique. For example, a MIME message might contain the Content-ID header:

Content-ID: <part.0014@roguewave.example>

In general, a MIME message contains one Content-ID header at the top level of the message. For multipart/alternative messages, the MIME specification suggests that each alternative have a different Content-ID header unless all alternatives contain equivalent information.

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

Reference
RWMimeContentIdHeader conforms to the Content-ID header requirements specified in RFC 2045, Section 7 (p. 26). For a discussion of Content-ID and multipart/alternative messages, see RFC 2046 Section 5.1.4 (p. 24).

Constructor & Destructor Documentation

◆ RWMimeContentIdHeader() [1/4]

RWMimeContentIdHeader::RWMimeContentIdHeader ( void )

Default constructor. Constructs a Content-ID header with the empty string for a value. Since the empty string is not world-unique, a default-constructed RWMimeContentIdHeader does not meet the requirements of the MIME format.

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

◆ RWMimeContentIdHeader() [2/4]

RWMimeContentIdHeader::RWMimeContentIdHeader ( const RWCString & id)

Constructs a Content-ID header with the value id. The RWCString should contain 7-bit US-ASCII data.

Note
This constructor cannot verify that the provided id is world-unique.

◆ RWMimeContentIdHeader() [3/4]

RWMimeContentIdHeader::RWMimeContentIdHeader ( const RWMimeContentIdHeader & second)

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

◆ RWMimeContentIdHeader() [4/4]

RWMimeContentIdHeader::RWMimeContentIdHeader ( 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-ID".

◆ ~RWMimeContentIdHeader()

virtual RWMimeContentIdHeader::~RWMimeContentIdHeader ( void )
virtual

Destructor.

Member Function Documentation

◆ body()

RWMimeStructuredHeaderImp & RWMimeContentIdHeader::body ( void ) const
protected

Returns a reference to the underlying implementation.

◆ checkLabel()

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

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

Reimplemented from RWMimeHeader.

◆ getId()

RWCString RWMimeContentIdHeader::getId ( void ) const

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

◆ operator=()

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

Assignment operator. Makes self a handle identical to second.

◆ setId()

void RWMimeContentIdHeader::setId ( const RWCString & id)

Sets the content ID value of this header. The RWCString should contain 7-bit US-ASCII data.

Note
This function cannot verify that the provided id is world-unique.

Member Data Documentation

◆ Label

const RWCString RWMimeContentIdHeader::Label
static

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

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