SourcePro® 2023.1 |
SourcePro® API Reference Guide |
Represents the MIME-Version
header of a MIME message.
More...
#include <rw/mime/RWMimeVersionHeader.h>
Public Member Functions | |
RWMimeVersionHeader (void) | |
RWMimeVersionHeader (unsigned majorVersion, unsigned minorVersion) | |
RWMimeVersionHeader (const RWMimeVersionHeader &second) | |
RWMimeVersionHeader (const RWMimeHeader &second) | |
virtual | ~RWMimeVersionHeader (void) |
unsigned | getMajorVersion (void) const |
unsigned | getMinorVersion (void) const |
RWMimeVersionHeader & | operator= (const RWMimeVersionHeader &second) |
void | setVersion (unsigned majorVersion, unsigned minorVersion) |
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 | |
RWMimeVersionHeaderImp & | 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) |
RWMimeVersionHeader represents the MIME-Version header of a MIME message. The header states the version of MIME to which the message conforms. The MIME specification requires that each MIME message contain a MIME-Version header.
An instance of this class is a handle to a private, reference-counted body.
RWMimeVersionHeader::RWMimeVersionHeader | ( | void | ) |
Default constructor. Constructs a header with the label "MIME-Version"
and the value "1.0"
.
RWMimeVersionHeader::RWMimeVersionHeader | ( | unsigned | majorVersion, |
unsigned | minorVersion | ||
) |
Constructs a header with the label "MIME-Version"
and a value constructed from majorVersion and minorVersion. For example, when majorVersion is 1
and minorVersion is 0
, the new header contains the value "1.0"
.
RWMimeVersionHeader::RWMimeVersionHeader | ( | const RWMimeVersionHeader & | second | ) |
Copy constructor. Constructs a new handle to the body second refers to.
RWMimeVersionHeader::RWMimeVersionHeader | ( | const RWMimeHeader & | second | ) |
Conversion constructor. Constructs a new handle to the body second refers to. Throws RWMimeError if second does not have the label "MIME-Version"
.
|
virtual |
Destructor.
|
protected |
Returns a reference to the underlying implementation.
|
protectedvirtual |
Returns true
if label matches "MIME-Version"
, false
otherwise. The comparison is case-insensitive. The RWCString should contain 7-bit US-ASCII data.
Reimplemented from RWMimeHeader.
unsigned RWMimeVersionHeader::getMajorVersion | ( | void | ) | const |
Returns the major version number of self's value. For example, when self's value is "1.0"
, returns 1
.
unsigned RWMimeVersionHeader::getMinorVersion | ( | void | ) | const |
Returns the major version number of self's value. For example, when self's value is "1.0"
, returns 0
.
RWMimeVersionHeader& RWMimeVersionHeader::operator= | ( | const RWMimeVersionHeader & | second | ) |
Assignment operator. Makes self a copy of second.
void RWMimeVersionHeader::setVersion | ( | unsigned | majorVersion, |
unsigned | minorVersion | ||
) |
Sets the value of self to majorVersion and minorVersion. For example, when majorVersion is 1
and minorVersion is 0
, self's value is set to "1.0"
.
Copyright © 2023 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |