SourcePro® 2022.1 |
SourcePro® API Reference Guide |
Represents the Content-Location header of a MIME part. More...
#include <rw/mime/RWMimeContentLocationHeader.h>
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) |
RWMimeContentLocationHeader represents the Content-Location header of a MIME part. The Content-Location header declares a URI for the MIME part containing the header. When a part declares a URI, the part can be referenced from elsewhere in the message by using the URI. This header is specified for use in multipart/related
messages, which typically contain an HTML document and a set of images referenced in that document.
For example, a MIME part containing an image can set the URI for the image with a Content-Location header:
An HTML document in the same message can reference the image using the URI:
By setting a URI for each image within the message, the complete set of files needed to render an HTML document can be included in a message without changing the text of the HTML document.
The value of a Content-Location header must meet the format requirements for a URI. The value does not, however, need to indicate an actual resource reachable through the Internet.
An instance of this class is a handle to a private, reference-counted body.
RWMimeContentLocationHeader::RWMimeContentLocationHeader | ( | void | ) |
Default constructor. Constructs a header with the label "Content-Location"
and an empty value.
RWMimeContentLocationHeader::RWMimeContentLocationHeader | ( | const RWCString & | uri | ) |
Constructs a header with the label "Content-Location"
and the value uri. Does not validate uri. The RWCString should contain 7-bit US-ASCII data.
RWMimeContentLocationHeader::RWMimeContentLocationHeader | ( | const RWMimeContentLocationHeader & | second | ) |
Copy constructor. Constructs a new handle to the body second refers to.
RWMimeContentLocationHeader::RWMimeContentLocationHeader | ( | 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-Location"
.
|
virtual |
Destructor.
|
protected |
Returns a reference to the underlying implementation.
|
protectedvirtual |
Returns true
if label matches "Content-Location"
, false
otherwise. The comparison is case-insensitive. The RWCString should contain 7-bit US-ASCII data.
Reimplemented from RWMimeHeader.
RWCString RWMimeContentLocationHeader::getURI | ( | void | ) | const |
Returns the location URI contained within this header. The RWCString should contain 7-bit US-ASCII data.
RWMimeContentLocationHeader& RWMimeContentLocationHeader::operator= | ( | const RWMimeContentLocationHeader & | second | ) |
Assignment operator. Makes self a handle identical to second.
void RWMimeContentLocationHeader::setURI | ( | const RWCString & | uri | ) |
Sets the location URI contained within this header. The RWCString should contain 7-bit US-ASCII data.
Copyright © 2022 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |