SourcePro® API Reference Guide

 
List of all members | Public Member Functions | Static Public Attributes | Protected Member Functions
RWMimeContentDispositionHeader Class Reference

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

#include <rw/mime/RWMimeContentDispositionHeader.h>

Inheritance diagram for RWMimeContentDispositionHeader:
RWMimeHeader RWHandleBase

Public Member Functions

 RWMimeContentDispositionHeader (void)
 
 RWMimeContentDispositionHeader (const RWMimeContentDisposition &contentDisposition)
 
 RWMimeContentDispositionHeader (const RWMimeContentDispositionHeader &second)
 
 RWMimeContentDispositionHeader (const RWMimeHeader &second)
 
virtual ~RWMimeContentDispositionHeader (void)
 
RWMimeContentDisposition getContentDisposition (void) const
 
RWMimeContentDispositionHeaderoperator= (const RWMimeContentDispositionHeader &second)
 
void setContentDisposition (const RWMimeContentDisposition &contentDisposition)
 
- 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
 
RWMimeHeaderoperator= (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

RWMimeContentDispositionHeaderImp & 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)
 
RWBodyBasebody (void) const
 
RWHandleBaseoperator= (const RWHandleBase &second)
 

Detailed Description

RWMimeContentDispositionHeader represents the Content-Disposition header of a MIME part. The Content-Disposition specifies the way in which a recipient should present the part.

The Content-Disposition Header specification, RFC 1806, defines two values for the header. A value of inline states that the part should be presented at the same time the rest of the message is presented. A value of attachment states that the part should be treated as a separate file attached to the message. The specification also defines an optional filename parameter that provides a filename for the MIME part.

An instance of this class is a handle to a private, reference-counted body.

Note
RWMimeContentDispositionHeader conforms to the Content-Disposition header requirements specified in RFC 1806.

Constructor & Destructor Documentation

RWMimeContentDispositionHeader::RWMimeContentDispositionHeader ( void  )

Default constructor. Constructs a header with no value.

Note
A header with an empty value does not meet the requirements for a Content-Disposition header.
RWMimeContentDispositionHeader::RWMimeContentDispositionHeader ( const RWMimeContentDisposition contentDisposition)

Constructs a header with the value contentDisposition.

RWMimeContentDispositionHeader::RWMimeContentDispositionHeader ( const RWMimeContentDispositionHeader second)

Copy constructor. Constructs a new handle to the body second refers to.

RWMimeContentDispositionHeader::RWMimeContentDispositionHeader ( 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-Description".

virtual RWMimeContentDispositionHeader::~RWMimeContentDispositionHeader ( void  )
virtual

Destructor.

Member Function Documentation

RWMimeContentDispositionHeaderImp& RWMimeContentDispositionHeader::body ( void  ) const
protected

Returns a reference to the underlying implementation.

virtual bool RWMimeContentDispositionHeader::checkLabel ( const RWCString label) const
protectedvirtual

Returns true if label matches "Content-Disposition", false otherwise. The comparison is case-insensitive. The RWCString should contain 7-bit US-ASCII data.

Reimplemented from RWMimeHeader.

RWMimeContentDisposition RWMimeContentDispositionHeader::getContentDisposition ( void  ) const

Returns a copy of self's value as an RWMimeContentDisposition.

RWMimeContentDispositionHeader& RWMimeContentDispositionHeader::operator= ( const RWMimeContentDispositionHeader second)

Assignment operator. Makes self a handle identical to second.

void RWMimeContentDispositionHeader::setContentDisposition ( const RWMimeContentDisposition contentDisposition)

Sets self's value to contentDisposition.

Member Data Documentation

const RWCString RWMimeContentDispositionHeader::Label
static

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

Copyright © 2023 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved.