Module: Internet Protocols Module Package: MIME
RWMimeVersionHeaderRWMimeHeaderRWHandleBase
body() checkLabel() getMajorVersion() |
getMinorVersion() Label operator=() |
RWMimeVersionHeader() setVersion() ~RWMimeVersionHeader() |
#include <rw/mime/RWMimeVersionHeader.h>
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.
NOTE -- RFC 2045 specifies a version number of 1.0.
An instance of this class is a handle to a private, reference-counted body.
RWMimeVersionHeader conforms to the MIME-Version header requirements specified in RFC 2045, Section 4.
static const RWCString Label;
Static constant string containing "MIME-Version", the label for a MIME-Version header. The RWCString should contain 7-bit US-ASCII data.
RWMimeVersionHeader(void);
Default constructor. Constructs a header with the label "MIME-Version" and the value "1.0".
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(const RWMimeVersionHeader& second);
Copy constructor. Constructs a new handle to the body second refers to.
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 ~RWMimeVersionHeader(void);
Destructor.
RWMimeVersionHeader& operator=(const RWMimeVersionHeader& second);
Assignment operator. Makes self a copy of second.
unsigned getMajorVersion(void) const;
Returns the major version number of self's value. For example, when self's value is "1.0", returns 1.
unsigned getMinorVersion(void) const;
Returns the major version number of self's value. For example, when self's value is "1.0", returns 0.
void 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".
RWMimeVersionHeaderImp& body(void) const;
Returns a reference to the underlying implementation.
virtual bool checkLabel(const RWCString& label) const;
Returns true if label matches "MIME-Version", false otherwise. The comparison is case-insensitive. The RWCString should contain 7-bit US-ASCII data.
© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.