#include <HttpHdrScTarget.h>
Public Member Functions | |
HttpHdrScTarget (const char *aTarget) | |
HttpHdrScTarget (const String &aTarget) | |
HttpHdrScTarget (const HttpHdrScTarget &)=delete | |
HttpHdrScTarget & | operator= (const HttpHdrScTarget &)=delete |
bool | hasNoStore () const |
void | noStore (bool v) |
bool | noStore () const |
void | clearNoStore () |
bool | hasNoStoreRemote () const |
void | noStoreRemote (bool v) |
bool | noStoreRemote () const |
void | clearNoStoreRemote () |
bool | hasMaxAge () const |
void | maxAge (int v) |
int | maxAge () const |
void | clearMaxAge () |
bool | hasMaxStale () const |
void | maxStale (int v) |
int | maxStale () const |
void | clearMaxStale () |
bool | hasContent () const |
void | Content (const String &v) |
String | content () const |
void | clearContent () |
bool | hasTarget () const |
String | Target () const |
void | mergeWith (const HttpHdrScTarget *new_sc) |
void | packInto (Packable *p) const |
XXX: this function should be in HttpHdrScTarget.cc. More... | |
void | updateStats (StatHist *) const |
Static Public Attributes | |
static const int | MAX_AGE_UNSET =-1 |
static const int | MAX_STALE_UNSET =0 |
Private Member Functions | |
bool | isSet (http_hdr_sc_type id) const |
void | setMask (http_hdr_sc_type id, bool newval) |
Private Attributes | |
int | mask = 0 |
int | max_age = MAX_AGE_UNSET |
int | max_stale = MAX_STALE_UNSET |
String | content_ |
String | target |
Friends | |
class | HttpHdrSc |
Detailed Description
Representation of HTTP Surogate-Control header field targeted directive
- See also
- HttpHdrSc
Definition at line 24 of file HttpHdrScTarget.h.
Constructor & Destructor Documentation
◆ HttpHdrScTarget() [1/3]
|
inlineexplicit |
Definition at line 32 of file HttpHdrScTarget.h.
◆ HttpHdrScTarget() [2/3]
|
inlineexplicit |
Definition at line 33 of file HttpHdrScTarget.h.
◆ HttpHdrScTarget() [3/3]
|
explicitdelete |
Member Function Documentation
◆ clearContent()
|
inline |
Definition at line 72 of file HttpHdrScTarget.h.
References String::clean(), content_, SC_CONTENT, and setMask().
Referenced by HttpHdrSc::parse().
◆ clearMaxAge()
|
inline |
Definition at line 58 of file HttpHdrScTarget.h.
References max_age, MAX_AGE_UNSET, SC_MAX_AGE, and setMask().
Referenced by HttpHdrSc::parse().
◆ clearMaxStale()
|
inline |
Definition at line 64 of file HttpHdrScTarget.h.
References max_stale, and MAX_STALE_UNSET.
Referenced by HttpHdrSc::parse().
◆ clearNoStore()
|
inline |
Definition at line 40 of file HttpHdrScTarget.h.
References SC_NO_STORE, and setMask().
◆ clearNoStoreRemote()
|
inline |
Definition at line 45 of file HttpHdrScTarget.h.
References SC_NO_STORE_REMOTE, and setMask().
◆ content()
|
inline |
Definition at line 71 of file HttpHdrScTarget.h.
References content_.
Referenced by esiEnableProcessing(), and mergeWith().
◆ Content()
|
inline |
Definition at line 67 of file HttpHdrScTarget.h.
References content_, SC_CONTENT, and setMask().
Referenced by mergeWith().
◆ hasContent()
|
inline |
Definition at line 66 of file HttpHdrScTarget.h.
References isSet(), and SC_CONTENT.
Referenced by esiEnableProcessing(), and mergeWith().
◆ hasMaxAge()
|
inline |
Definition at line 47 of file HttpHdrScTarget.h.
References isSet(), and SC_MAX_AGE.
Referenced by mergeWith(), and HttpStateData::processSurrogateControl().
◆ hasMaxStale()
|
inline |
Definition at line 61 of file HttpHdrScTarget.h.
References max_stale, and MAX_STALE_UNSET.
◆ hasNoStore()
|
inline |
Definition at line 37 of file HttpHdrScTarget.h.
References isSet(), and SC_NO_STORE.
Referenced by mergeWith(), and HttpStateData::processSurrogateControl().
◆ hasNoStoreRemote()
|
inline |
Definition at line 42 of file HttpHdrScTarget.h.
References isSet(), and SC_NO_STORE_REMOTE.
Referenced by mergeWith().
◆ hasTarget()
|
inline |
Definition at line 74 of file HttpHdrScTarget.h.
References String::size(), and target.
Referenced by packInto().
◆ isSet()
|
inlineprivate |
Definition at line 82 of file HttpHdrScTarget.h.
References assert, EBIT_TEST, mask, SC_ENUM_END, and SC_NO_STORE.
Referenced by hasContent(), hasMaxAge(), hasNoStore(), hasNoStoreRemote(), noStore(), noStoreRemote(), packInto(), HttpHdrSc::parse(), and updateStats().
◆ maxAge() [1/2]
|
inline |
◆ maxAge() [2/2]
|
inline |
Definition at line 48 of file HttpHdrScTarget.h.
References max_age, MAX_AGE_UNSET, SC_MAX_AGE, and setMask().
Referenced by mergeWith(), HttpHdrSc::parse(), HttpStateData::processSurrogateControl(), and HttpHdrSc::setMaxAge().
◆ maxStale() [1/2]
|
inline |
◆ maxStale() [2/2]
|
inline |
Definition at line 62 of file HttpHdrScTarget.h.
References max_stale.
Referenced by mergeWith(), HttpHdrSc::parse(), and HttpStateData::processSurrogateControl().
◆ mergeWith()
void HttpHdrScTarget::mergeWith | ( | const HttpHdrScTarget * | new_sc | ) |
Definition at line 18 of file HttpHdrScTarget.cc.
References assert, content(), Content(), hasContent(), hasMaxAge(), hasNoStore(), hasNoStoreRemote(), maxAge(), maxStale(), noStore(), and noStoreRemote().
Referenced by HttpHdrSc::getMergedTarget().
◆ noStore() [1/2]
|
inline |
Definition at line 39 of file HttpHdrScTarget.h.
References isSet(), and SC_NO_STORE.
Referenced by mergeWith().
◆ noStore() [2/2]
|
inline |
Definition at line 38 of file HttpHdrScTarget.h.
References SC_NO_STORE, and setMask().
Referenced by HttpHdrSc::parse().
◆ noStoreRemote() [1/2]
|
inline |
Definition at line 44 of file HttpHdrScTarget.h.
References isSet(), and SC_NO_STORE_REMOTE.
Referenced by mergeWith().
◆ noStoreRemote() [2/2]
|
inline |
Definition at line 43 of file HttpHdrScTarget.h.
References SC_NO_STORE_REMOTE, and setMask().
Referenced by HttpHdrSc::parse(), and HttpStateData::processSurrogateControl().
◆ operator=()
|
delete |
◆ packInto()
void HttpHdrScTarget::packInto | ( | Packable * | p | ) | const |
Definition at line 198 of file HttpHdrSc.cc.
References Packable::appendf(), assert, content_, hasTarget(), isSet(), max_age, SC_CONTENT, SC_ENUM_END, SC_MAX_AGE, SC_NO_STORE, SC_OTHER, ScAttrs, SQUIDSTRINGPH, SQUIDSTRINGPRINT, and target.
◆ setMask()
|
inlineprivate |
Definition at line 87 of file HttpHdrScTarget.h.
References EBIT_CLR, EBIT_SET, and mask.
Referenced by clearContent(), clearMaxAge(), clearNoStore(), clearNoStoreRemote(), Content(), maxAge(), noStore(), noStoreRemote(), and HttpHdrSc::parse().
◆ Target()
|
inline |
Definition at line 75 of file HttpHdrScTarget.h.
References target.
◆ updateStats()
void HttpHdrScTarget::updateStats | ( | StatHist * | hist | ) | const |
Definition at line 42 of file HttpHdrScTarget.cc.
References StatHist::count(), isSet(), SC_ENUM_END, and SC_NO_STORE.
Friends And Related Function Documentation
◆ HttpHdrSc
Definition at line 27 of file HttpHdrScTarget.h.
Member Data Documentation
◆ content_
|
private |
Definition at line 95 of file HttpHdrScTarget.h.
Referenced by clearContent(), content(), Content(), packInto(), and HttpHdrSc::parse().
◆ mask
|
private |
Definition at line 92 of file HttpHdrScTarget.h.
◆ max_age
|
private |
Definition at line 93 of file HttpHdrScTarget.h.
Referenced by clearMaxAge(), maxAge(), and packInto().
◆ MAX_AGE_UNSET
|
static |
Definition at line 29 of file HttpHdrScTarget.h.
Referenced by clearMaxAge(), and maxAge().
◆ max_stale
|
private |
Definition at line 94 of file HttpHdrScTarget.h.
Referenced by clearMaxStale(), hasMaxStale(), and maxStale().
◆ MAX_STALE_UNSET
|
static |
Definition at line 30 of file HttpHdrScTarget.h.
Referenced by clearMaxStale(), and hasMaxStale().
◆ target
|
private |
Definition at line 96 of file HttpHdrScTarget.h.
Referenced by hasTarget(), packInto(), and Target().
The documentation for this class was generated from the following files:
- src/HttpHdrScTarget.h
- src/HttpHdrSc.cc
- src/HttpHdrScTarget.cc