SourcePro® 2024.1 |
SourcePro® API Reference Guide |
Represents Internet Message Format headers other than the headers defined by MIME. More...
#include <rw/mime/RWMimeGenericHeader.h>
Public Member Functions | |
RWMimeGenericHeader (const RWCString &label, const RWCString &value) | |
RWMimeGenericHeader (const RWMimeGenericHeader &second) | |
RWMimeGenericHeader (const RWMimeHeader &second) | |
RWMimeGenericHeader (void) | |
virtual | ~RWMimeGenericHeader (void) |
RWCString | getValue (void) const |
RWMimeGenericHeader & | operator= (const RWMimeGenericHeader &second) |
void | setValue (const RWCString &value) |
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 |
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 |
Protected Member Functions | |
RWMimeUnstructuredHeaderImp & | 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) | |
RWBodyBase & | body (void) const |
RWHandleBase & | operator= (const RWHandleBase &second) |
RWMimeGenericHeader represents Internet Message Format headers other than the headers defined by MIME. A header consists of a label and a value. MIME requires that both the label and value contain only printable characters in the US-ASCII character set. The name may not contain a colon. To create a header with a value in another character set, encode the value according to the guidelines in RFC 2047.
The label appears first in the header, and is separated from the value by a colon. So, the header line
contains the label From
, a colon as a separator, and the value Rudi Marquez <rudi_marquez@roguewave.com>
. RWMimeGenericHeader represents this structure by containing a pair of strings, one string for the label and one string for the value.
This class only represents headers which are not defined in the MIME specification. For MIME headers, use the class corresponding to the header instead. The class enforces this constraint by refusing to accept a label for another header type. The constructors and assignment operator throw RWMimeError if the label provided is a label for any other header type.
An instance of this class is a handle to a private, reference-counted body.
RWMimeGenericHeader::RWMimeGenericHeader | ( | void | ) |
Default constructor. Constructs a header with an empty label and an empty value.
Constructs a header with the given label and value. Does not verify that the strings provided meet the requirements for an Internet Message Format header. Throws RWMimeError if label is the label for one of the other header classes. The RWCString should contain 7-bit US-ASCII data.
RWMimeGenericHeader::RWMimeGenericHeader | ( | const RWMimeGenericHeader & | second | ) |
Copy constructor. Constructs a new handle to the body second refers to.
RWMimeGenericHeader::RWMimeGenericHeader | ( | const RWMimeHeader & | second | ) |
Conversion constructor. Constructs a new handle to the body second refers to. Throws RWMimeError if the label of second is the label for one of the other header classes.
|
virtual |
Destructor.
|
protected |
Returns a reference to the underlying implementation.
|
protectedvirtual |
Returns true
if label is not the label for one of the other header classes, false
otherwise. The RWCString should contain 7-bit US-ASCII data.
Reimplemented from RWMimeHeader.
RWCString RWMimeGenericHeader::getValue | ( | void | ) | const |
Returns the value of this header. The RWCString should contain 7-bit US-ASCII data.
RWMimeGenericHeader & RWMimeGenericHeader::operator= | ( | const RWMimeGenericHeader & | second | ) |
Assignment operator. Makes self a handle identical to second. Throws RWMimeError if the label of second is the label for one of the other header classes.
Copyright © 2024 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |