|
Squid Web Cache master
|
#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. | |
| 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 |
Representation of HTTP Surogate-Control header field targeted directive
Definition at line 24 of file HttpHdrScTarget.h.
|
inlineexplicit |
Definition at line 32 of file HttpHdrScTarget.h.
|
inlineexplicit |
Definition at line 33 of file HttpHdrScTarget.h.
|
explicitdelete |
|
inline |
Definition at line 72 of file HttpHdrScTarget.h.
References String::clean(), content_, SC_CONTENT, and setMask().
Referenced by HttpHdrSc::parse().
|
inline |
Definition at line 58 of file HttpHdrScTarget.h.
References max_age, MAX_AGE_UNSET, SC_MAX_AGE, and setMask().
Referenced by HttpHdrSc::parse().
|
inline |
Definition at line 64 of file HttpHdrScTarget.h.
References max_stale, and MAX_STALE_UNSET.
Referenced by HttpHdrSc::parse().
|
inline |
Definition at line 40 of file HttpHdrScTarget.h.
References SC_NO_STORE, and setMask().
|
inline |
Definition at line 45 of file HttpHdrScTarget.h.
References SC_NO_STORE_REMOTE, and setMask().
|
inline |
|
inline |
Definition at line 67 of file HttpHdrScTarget.h.
References content_, SC_CONTENT, and setMask().
Referenced by mergeWith().
|
inline |
Definition at line 66 of file HttpHdrScTarget.h.
References isSet(), and SC_CONTENT.
Referenced by mergeWith().
|
inline |
Definition at line 47 of file HttpHdrScTarget.h.
References isSet(), and SC_MAX_AGE.
Referenced by mergeWith(), and HttpStateData::processSurrogateControl().
|
inline |
Definition at line 61 of file HttpHdrScTarget.h.
References max_stale, and MAX_STALE_UNSET.
|
inline |
Definition at line 37 of file HttpHdrScTarget.h.
References isSet(), and SC_NO_STORE.
Referenced by mergeWith(), and HttpStateData::processSurrogateControl().
|
inline |
Definition at line 42 of file HttpHdrScTarget.h.
References isSet(), and SC_NO_STORE_REMOTE.
Referenced by mergeWith().
|
inline |
Definition at line 74 of file HttpHdrScTarget.h.
References String::size(), and target.
Referenced by packInto().
|
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().
|
inline |
|
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().
|
inline |
|
inline |
Definition at line 62 of file HttpHdrScTarget.h.
References max_stale.
Referenced by mergeWith(), HttpHdrSc::parse(), and HttpStateData::processSurrogateControl().
| void HttpHdrScTarget::mergeWith | ( | const HttpHdrScTarget * | new_sc | ) |
Definition at line 18 of file HttpHdrScTarget.cc.
References assert, content(), Content(), hasContent(), hasMaxAge(), hasNoStore(), hasNoStoreRemote(), maxAge(), maxAge(), maxStale(), maxStale(), noStore(), and noStoreRemote().
Referenced by HttpHdrSc::getMergedTarget().
|
inline |
Definition at line 39 of file HttpHdrScTarget.h.
References isSet(), and SC_NO_STORE.
Referenced by mergeWith().
|
inline |
Definition at line 38 of file HttpHdrScTarget.h.
References SC_NO_STORE, and setMask().
Referenced by HttpHdrSc::parse().
|
inline |
Definition at line 44 of file HttpHdrScTarget.h.
References isSet(), and SC_NO_STORE_REMOTE.
Referenced by mergeWith().
|
inline |
Definition at line 43 of file HttpHdrScTarget.h.
References SC_NO_STORE_REMOTE, and setMask().
Referenced by HttpHdrSc::parse(), and HttpStateData::processSurrogateControl().
|
delete |
| void HttpHdrScTarget::packInto | ( | Packable * | p | ) | const |
Definition at line 194 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.
|
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().
|
inline |
Definition at line 75 of file HttpHdrScTarget.h.
References target.
| 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.
|
friend |
Definition at line 27 of file HttpHdrScTarget.h.
|
private |
Definition at line 95 of file HttpHdrScTarget.h.
Referenced by clearContent(), content(), Content(), packInto(), and HttpHdrSc::parse().
|
private |
Definition at line 92 of file HttpHdrScTarget.h.
|
private |
Definition at line 93 of file HttpHdrScTarget.h.
Referenced by clearMaxAge(), maxAge(), maxAge(), and packInto().
|
static |
Definition at line 29 of file HttpHdrScTarget.h.
Referenced by clearMaxAge(), and maxAge().
|
private |
Definition at line 94 of file HttpHdrScTarget.h.
Referenced by clearMaxStale(), hasMaxStale(), maxStale(), and maxStale().
|
static |
Definition at line 30 of file HttpHdrScTarget.h.
Referenced by clearMaxStale(), and hasMaxStale().
|
private |
Definition at line 96 of file HttpHdrScTarget.h.
Referenced by hasTarget(), packInto(), and Target().