|
Squid Web Cache v8/master
|
#include <Notes.h>
Classes | |
| class | Entry |
| Used to store a note key/value pair. More... | |
Public Types | |
| typedef RefCount< NotePairs > | Pointer |
| typedef std::vector< Entry::Pointer > | Entries |
| The key/value pair entries. | |
| typedef std::vector< SBuf > | Names |
Public Member Functions | |
| NotePairs () | |
| NotePairs & | operator= (NotePairs const &)=delete |
| NotePairs (NotePairs const &)=delete | |
| void | append (const NotePairs *src) |
| Append the entries of the src NotePairs list to our list. | |
| void | replaceOrAddOrAppend (const NotePairs *src, const Names &appendables) |
| void | replaceOrAdd (const NotePairs *src) |
| void | appendNewOnly (const NotePairs *src) |
| std::optional< SBuf > | find (const char *noteKey, const char *sep=",") const |
| const char * | findFirst (const char *noteKey) const |
| void | add (const SBuf &key, const SBuf &value) |
| void | add (const char *key, const char *value) |
| void | remove (const char *key) |
| void | remove (const SBuf &key) |
| void | addStrList (const SBuf &key, const SBuf &values, const CharacterSet &delimiters) |
| bool | hasPair (const SBuf &key, const SBuf &value) const |
| void | print (std::ostream &os, const char *nameValueSeparator, const char *entryTerminator) const |
| bool | empty () const |
| void | clear () |
| const Entries & | expandListEntries (const CharacterSet *delimiters) const |
Private Attributes | |
| Entries | entries |
| The key/value pair entries. | |
| typedef std::vector<Entry::Pointer> NotePairs::Entries |
| typedef std::vector<SBuf> NotePairs::Names |
| typedef RefCount<NotePairs> NotePairs::Pointer |
|
delete |
| void NotePairs::add | ( | const char * | key, |
| const char * | value | ||
| ) |
Definition at line 316 of file Notes.cc.
References entries, and SBuf::push_back().
Adds a note key and value to the notes list. If the key name already exists in the list, add the given value to its set of values.
Definition at line 322 of file Notes.cc.
References entries.
Referenced by ClientHttpRequest::logRequest(), Adaptation::Icap::ModXact::makeRequestHeaders(), redirectHandleReply(), redirectStart(), Adaptation::Ecap::XactionRep::start(), storeIdStart(), Ssl::Helper::Submit(), Note::updateNotePairs(), and UpdateRequestNotes().
| void NotePairs::addStrList | ( | const SBuf & | key, |
| const SBuf & | values, | ||
| const CharacterSet & | delimiters | ||
| ) |
Adds a note key and values strList to the notes list. If the key name already exists in the list, add the new values to its set of values.
Definition at line 369 of file Notes.cc.
References AppendTokens(), and entries.
Referenced by Note::updateNotePairs().
| void NotePairs::append | ( | const NotePairs * | src | ) |
Definition at line 384 of file Notes.cc.
References entries.
Referenced by Http::One::Server::buildHttpRequest(), externalAclHandleReply(), redirectHandleReply(), replaceOrAdd(), replaceOrAddOrAppend(), and ExternalACLEntry::update().
| void NotePairs::appendNewOnly | ( | const NotePairs * | src | ) |
|
inline |
Definition at line 262 of file Notes.h.
References entries.
Referenced by ExternalACLEntry::update().
|
inline |
Definition at line 260 of file Notes.h.
References entries.
Referenced by ConnStateData::hasNotes(), HttpRequest::hasNotes(), Helper::operator<<(), and Note::updateNotePairs().
| const NotePairs::Entries & NotePairs::expandListEntries | ( | const CharacterSet * | delimiters | ) | const |
If delimiters are provided, returns another Entries, converting each single multi-token pair to multiple single-token pairs; returns existing entries otherwise.
Definition at line 356 of file Notes.cc.
References AppendTokens(), and entries.
Referenced by Acl::NoteCheck::matchNotes().
| std::optional< SBuf > NotePairs::find | ( | const char * | noteKey, |
| const char * | sep = "," |
||
| ) | const |
Definition at line 281 of file Notes.cc.
References SBuf::append(), entries, and SBuf::isEmpty().
Referenced by Format::Format::assemble(), and Auth::UserRequest::denyMessageFromHelper().
| const char * NotePairs::findFirst | ( | const char * | noteKey | ) | const |
Definition at line 307 of file Notes.cc.
References entries.
Referenced by ClientRequestContext::clientRedirectDone(), ClientRequestContext::clientStoreIdDone(), externalAclHandleReply(), and UpdateRequestNotes().
Definition at line 375 of file Notes.cc.
References entries.
Referenced by appendNewOnly(), Adaptation::Icap::ModXact::makeRequestHeaders(), and Adaptation::Ecap::XactionRep::start().
| void NotePairs::print | ( | std::ostream & | os, |
| const char * | nameValueSeparator, | ||
| const char * | entryTerminator | ||
| ) | const |
Reports all entries (if any), printing exactly four items for each: entry name, nameValueSeparator, entry value, and entry terminator.
Definition at line 300 of file Notes.cc.
References entries.
Referenced by Format::Format::assemble(), and Helper::operator<<().
| void NotePairs::remove | ( | const char * | key | ) |
Remove all notes with a given key. If keyLen is not provided, the key is assumed null-terminated.
Definition at line 328 of file Notes.cc.
References entries.
Referenced by replaceOrAdd(), replaceOrAddOrAppend(), Note::updateNotePairs(), and UpdateRequestNotes().
| void NotePairs::remove | ( | const SBuf & | key | ) |
| void NotePairs::replaceOrAdd | ( | const NotePairs * | src | ) |
|
private |
Definition at line 269 of file Notes.h.
Referenced by add(), add(), addStrList(), append(), appendNewOnly(), clear(), empty(), expandListEntries(), find(), findFirst(), hasPair(), print(), remove(), remove(), replaceOrAdd(), and replaceOrAddOrAppend().