#include <Notes.h>

Inheritance diagram for Note:
Collaboration diagram for Note:


class  Value
 Stores a value for the note. More...

Public Types

typedef RefCount< NotePointer
typedef std::vector
< Value::Pointer

Public Member Functions

 Note (const char *aKey, const size_t keyLen)
 Note (const SBuf aKey)
 Note (const Note &)=delete
Noteoperator= (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 SBufkey () 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.

Definition at line 35 of file Notes.h.

Member Typedef Documentation

Definition at line 38 of file Notes.h.

Definition at line 73 of file Notes.h.

Constructor & Destructor Documentation

Note::Note ( const char *  aKey,
const size_t  keyLen 

Definition at line 75 of file Notes.h.

Referenced by Notes::add().

Note::Note ( const SBuf  aKey)

Definition at line 76 of file Notes.h.

Note::Note ( const Note )

Member Function Documentation

Note::Value::Pointer Note::addValue ( const char *  value,
const bool  quoted,
const char *  descr,
const Value::Method  m = Value::mhAppend 

Adds a value to the note and returns a pointer to the related Value object.

Definition at line 62 of file Notes.cc.

References values.

void Note::dump ( StoreEntry entry,
const char *  key 
const SBuf& Note::key ( ) const

Definition at line 90 of file Notes.h.

References theKey.

Referenced by dump(), Notes::parse(), Notes::parseKvPair(), toString(), and updateNotePairs().

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 assignes the given 'matched' to it.

true if matched, false otherwise

Definition at line 69 of file Notes.cc.

References assert, SBuf::clear(), debugs, ACLChecklist::fastCheck(), HTTPMSGLOCK(), ACLFilledChecklist::reply, theKey, and values.

Note& Note::operator= ( const Note )
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 116 of file Notes.cc.

References SBuf::appendf(), key(), SBuf::length(), and values.

void Note::updateNotePairs ( NotePairsPointer  pairs,
const CharacterSet delimiters,
const AccessLogEntryPointer al 

Member Data Documentation

SBuf Note::theKey

Definition at line 99 of file Notes.h.

Referenced by key(), match(), and updateNotePairs().

Values Note::values

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:






Web Site Translations