Module: Internet Protocols Module Package: MIME
RWMimeContentIdHeaderRWMimeHeaderRWHandleBase
body() checkLabel() |
getId() Label |
operator=() RWMimeContentIdHeader() |
setId() ~RWMimeContentIdHeader() |
#include <rw/mime/RWMimeContentIdHeader.h>
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.
RWMimeContentIdHeader conforms to the Content-ID header requirements specified in RFC 2045, Section 7. For a discussion of Content-ID and multipart/alternative messages, see RFC 2046 Section 5.1.4.
static const RWCString Label;
Static constant string containing "Content-ID", the label for a Content-ID header. The RWCString should contain 7-bit US-ASCII data.
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 RWMimeContentHeader 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(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(const RWMimeContentIdHeader& second);
Copy constructor. Constructs a new handle to the body second refers to.
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 ~RWMimeContentIdHeader(void);
Destructor.
RWMimeContentIdHeader& operator=(const RWMimeContentIdHeader& second);
Assignment operator. Makes self a handle identical to second.
RWCString getId(void) const;
Returns the content ID value of this header. The RWCString should contain 7-bit US-ASCII data.
void 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.
RWMimeStructuredHeaderImp& body(void) const;
Returns a reference to the underlying implementation.
virtual bool checkLabel(const RWCString& label) const;
Returns true if label matches "Content-ID", 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.