SourcePro® API Reference Guide

 
Loading...
Searching...
No Matches
RWHttpEntityTag Class Reference

Describes an HTTP entity tag. More...

#include <rw/http/RWHttpEntityTag.h>

Public Types

enum  validator { weak , strong }
 

Public Member Functions

 RWHttpEntityTag (const RWCString &tag, validator val=RWHttpEntityTag::strong)
 
 RWHttpEntityTag (void)
 
RWCString asString (void) const
 
bool compareTo (const RWHttpEntityTag &etag, validator val=RWHttpEntityTag::strong)
 
RWHttpEntityTag::validator getStrength () const
 
RWCString getTag () const
 
void setEntityTag (const RWCString &tag, validator val=RWHttpEntityTag::strong)
 

Detailed Description

RWHttpEntityTag maintains the entity tag. It compares two entity tags as defined in the HTTP/1.1 specification. RWHttpEntityTag is used primarily within entity-tag based classes.

Member Enumeration Documentation

◆ validator

Defines the strictness of the comparison used when requesting an entity. A validator is used by the server to determine if the version of an entity stored in a cache should be refreshed.

See RFC 2616 for information about cache validators.

Enumerator
weak 

A weak validator.

strong 

A strong validator.

Constructor & Destructor Documentation

◆ RWHttpEntityTag() [1/2]

RWHttpEntityTag::RWHttpEntityTag ( void )
inline

Constructs a default RWHttpEntityTag. The stored tag is an empty string with its validator level set to weak.

◆ RWHttpEntityTag() [2/2]

RWHttpEntityTag::RWHttpEntityTag ( const RWCString & tag,
validator val = RWHttpEntityTag::strong )

Constructs an RWHttpEntityTag with its value set to str, and its validator level set to val. The RWCString should contain 7-bit US-ASCII data.

Member Function Documentation

◆ asString()

RWCString RWHttpEntityTag::asString ( void ) const

Returns the entity tag as an RWCString. Weakness is indicated by W/. The RWCString should contain 7-bit US-ASCII data.

◆ compareTo()

bool RWHttpEntityTag::compareTo ( const RWHttpEntityTag & etag,
validator val = RWHttpEntityTag::strong )

Compares this and etag as defined in RFC2616 [13.3.3]. val specifies whether this is a weak or strong comparison.

◆ getStrength()

RWHttpEntityTag::validator RWHttpEntityTag::getStrength ( ) const

Returns the strength of the entity tag.

◆ getTag()

RWCString RWHttpEntityTag::getTag ( ) const

Returns the entity tag. The RWCString should contain 7-bit US-ASCII data.

◆ setEntityTag()

void RWHttpEntityTag::setEntityTag ( const RWCString & tag,
validator val = RWHttpEntityTag::strong )

Assigns the internal tag from an RWCString. The RWCString should contain 7-bit US-ASCII data.

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