#include <Notes.h>
Classes | |
class | Value |
Stores a value for the note. More... | |
Public Types | |
typedef RefCount< Note > | Pointer |
typedef std::vector< Value::Pointer > | Values |
Public Member Functions | |
Note (const char *aKey, const size_t keyLen) | |
Note (const SBuf aKey) | |
Note (const Note &)=delete | |
Note & | operator= (const Note &)=delete |
Value::Pointer | addValue (const char *value, const bool quoted, const char *descr, const Value::Method m=Value::mhAppend) |
bool | match (HttpRequest *request, HttpReply *reply, const AccessLogEntryPointer &al, SBuf &matched) |
const SBuf & | key () const |
void | updateNotePairs (NotePairsPointer pairs, const CharacterSet *delimiters, const AccessLogEntryPointer &al) |
void | dump (StoreEntry *entry, const char *key) |
Dump the single Note to the given StoreEntry object. More... | |
SBuf | toString (const char *sep) const |
Private Attributes | |
SBuf | theKey |
The note key. More... | |
Values | values |
The possible values list for the note. More... | |
Detailed Description
Used to store a note configuration. The notes are custom key:value pairs ICAP request headers or ECAP options used to pass custom transaction-state related meta information to squid internal subsystems or to adaptation services.
Member Typedef Documentation
◆ Pointer
typedef RefCount<Note> Note::Pointer |
◆ Values
typedef std::vector<Value::Pointer> Note::Values |
Constructor & Destructor Documentation
◆ Note() [1/3]
◆ Note() [2/3]
◆ Note() [3/3]
|
delete |
Member Function Documentation
◆ addValue()
Note::Value::Pointer Note::addValue | ( | const char * | value, |
const bool | quoted, | ||
const char * | descr, | ||
const Value::Method | m = Value::mhAppend |
||
) |
◆ dump()
void Note::dump | ( | StoreEntry * | entry, |
const char * | key | ||
) |
Definition at line 108 of file Notes.cc.
References dump_acl_list(), key(), ConfigParser::QuoteString(), SBufToString(), storeAppendPrintf(), and values.
◆ key()
|
inline |
Definition at line 90 of file Notes.h.
References theKey.
Referenced by dump(), toString(), and updateNotePairs().
◆ match()
bool Note::match | ( | HttpRequest * | request, |
HttpReply * | reply, | ||
const AccessLogEntryPointer & | al, | ||
SBuf & | matched | ||
) |
Walks through the possible values list of the note, selects the first value, matching the given HttpRequest and HttpReply and assigns the given 'matched' to it.
- Returns
- true if matched, false otherwise
Definition at line 70 of file Notes.cc.
References ACLFilledChecklist::al, assert, SBuf::clear(), debugs, ACLChecklist::fastCheck(), HTTPMSGLOCK(), ACLFilledChecklist::reply, ACLFilledChecklist::syncAle(), theKey, and values.
◆ operator=()
◆ toString()
SBuf Note::toString | ( | const char * | sep | ) | const |
For the key and all its Values compile a string of "Key: Value" pairs separated by sep string.
Definition at line 119 of file Notes.cc.
References SBuf::appendf(), key(), SBuf::length(), and values.
◆ updateNotePairs()
void Note::updateNotePairs | ( | NotePairsPointer | pairs, |
const CharacterSet * | delimiters, | ||
const AccessLogEntryPointer & | al | ||
) |
Definition at line 94 of file Notes.cc.
References NotePairs::add(), NotePairs::addStrList(), NotePairs::empty(), key(), Note::Value::mhReplace, NotePairs::remove(), theKey, and values.
Member Data Documentation
◆ theKey
|
private |
Definition at line 99 of file Notes.h.
Referenced by key(), match(), and updateNotePairs().
◆ values
|
private |
Definition at line 100 of file Notes.h.
Referenced by addValue(), dump(), match(), toString(), and updateNotePairs().
The documentation for this class was generated from the following files: