rwlogo
SourcePro C++ 12.0

SourcePro® C++ API Reference Guide



   SourcePro C++
Documentation Home

RWMimeContentLocationHeader Class Reference
[MIME]

Represents the Content-Location header of a MIME part. More...

#include <rw/mime/RWMimeContentLocationHeader.h>

Inheritance diagram for RWMimeContentLocationHeader:
RWMimeHeader RWHandleBase

List of all members.

Public Member Functions

 RWMimeContentLocationHeader (void)
 RWMimeContentLocationHeader (const RWCString &uri)
 RWMimeContentLocationHeader (const RWMimeContentLocationHeader &second)
 RWMimeContentLocationHeader (const RWMimeHeader &second)
RWMimeContentLocationHeaderoperator= (const RWMimeContentLocationHeader &second)
virtual ~RWMimeContentLocationHeader (void)
RWCString getURI (void) const
void setURI (const RWCString &uri)

Static Public Attributes

static const RWCString Label

Protected Member Functions

virtual bool checkLabel (const RWCString &label) const
RWMimeStructuredHeaderImp & body (void) const

Detailed Description

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:

 Content-Location: images/logo.gif

An HTML document in the same message can reference the image using the URI:

 <IMG SRC="images/logo.gif">

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.

Reference

RWMimeContentLocationHeader conforms to the Content-Location header requirements specified in RFC 2557, Section 4.2 (p. 7). RFC1630 specifies the format for a URI.


Constructor & Destructor Documentation

RWMimeContentLocationHeader::RWMimeContentLocationHeader ( void   ) 

Default constructor. Constructs a header with the label "Content-Location" and an empty value.

Note:
A header with an empty value does not meet the requirements for a Content-Location header.
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 RWMimeContentLocationHeader::~RWMimeContentLocationHeader ( void   )  [virtual]

Destructor.


Member Function Documentation

RWMimeStructuredHeaderImp& RWMimeContentLocationHeader::body ( void   )  const [protected]

Returns a reference to the underlying implementation.

Reimplemented from RWMimeHeader.

virtual bool RWMimeContentLocationHeader::checkLabel ( const RWCString label  )  const [protected, virtual]

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.


Member Data Documentation

Static constant string containing "Content-Location", the label for a Content-Location header. The RWCString should contain 7-bit US-ASCII data.

 All Classes Functions Variables Typedefs Enumerations Enumerator Friends

© 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.