SourcePro® 2022.1 |
SourcePro® API Reference Guide |
Represents the Content-ID header of a MIME part. More...
#include <rw/mime/RWMimeContentIdHeader.h>
Public Member Functions | |
RWMimeContentIdHeader (void) | |
RWMimeContentIdHeader (const RWCString &id) | |
RWMimeContentIdHeader (const RWMimeContentIdHeader &second) | |
RWMimeContentIdHeader (const RWMimeHeader &second) | |
virtual | ~RWMimeContentIdHeader (void) |
RWCString | getId (void) const |
RWMimeContentIdHeader & | operator= (const RWMimeContentIdHeader &second) |
void | setId (const RWCString &id) |
Public Member Functions inherited from RWMimeHeader | |
RWMimeHeader (void) | |
RWMimeHeader (const RWCString &label) | |
RWMimeHeader (const RWMimeHeader &second) | |
virtual | ~RWMimeHeader (void) |
RWCString | asString (void) const |
void | fromString (const RWCString &headerString) |
RWCString | getLabel (void) const |
RWMimeHeader & | operator= (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 |
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 (void) | |
RWHandleBase (RWStaticCtor) | |
RWHandleBase (RWBodyBase *body) | |
RWHandleBase (const RWHandleBase &second) | |
~RWHandleBase (void) | |
RWBodyBase & | body (void) const |
RWHandleBase & | operator= (const RWHandleBase &second) |
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:
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.
multipart/alternative
messages, see RFC 2046 Section 5.1.4 (p. 24). 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.
RWMimeContentIdHeader::RWMimeContentIdHeader | ( | const RWCString & | id | ) |
Constructs a Content-ID header with the value id. The RWCString should contain 7-bit US-ASCII data.
RWMimeContentIdHeader::RWMimeContentIdHeader | ( | const RWMimeContentIdHeader & | second | ) |
Copy constructor. Constructs a new handle to the body second refers to.
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"
.
|
virtual |
Destructor.
|
protected |
Returns a reference to the underlying implementation.
|
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.
RWCString RWMimeContentIdHeader::getId | ( | void | ) | const |
Returns the content ID value of this header. The RWCString should contain 7-bit US-ASCII data.
RWMimeContentIdHeader& RWMimeContentIdHeader::operator= | ( | const RWMimeContentIdHeader & | second | ) |
Assignment operator. Makes self a handle identical to second.
void RWMimeContentIdHeader::setId | ( | const RWCString & | id | ) |
Sets the content ID value of this header. The RWCString should contain 7-bit US-ASCII data.
Copyright © 2022 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |