#include <Reply.h>

Collaboration diagram for Helper::Reply:

Public Member Functions

 Reply (Helper::ResultCode res)
 
 Reply ()
 Creates a NULL reply. More...
 
const MemBufother () const
 
void finalize ()
 
bool accumulate (const char *buf, size_t len)
 

Public Attributes

Helper::ResultCode result
 The helper response 'result' field. More...
 
NotePairs notes
 
Helper::ReservationId reservationId
 The stateful replies should include the reservation ID. More...
 

Private Member Functions

 Reply (const Helper::Reply &r)
 
Replyoperator= (const Helper::Reply &r)
 
void parseResponseKeys ()
 
const MemBufemptyBuf () const
 Return an empty MemBuf. More...
 

Private Attributes

MemBuf other_
 the remainder of the line More...
 

Detailed Description

This object stores the reply message from a helper lookup It provides parser routing to accept a raw buffer and process the helper reply into fields for easy access by callers

Definition at line 29 of file Reply.h.

Constructor & Destructor Documentation

◆ Reply() [1/3]

Helper::Reply::Reply ( const Helper::Reply r)
private

◆ Reply() [2/3]

Helper::Reply::Reply ( Helper::ResultCode  res)
inlineexplicit

Definition at line 37 of file Reply.h.

References Reply().

◆ Reply() [3/3]

Helper::Reply::Reply ( )

Definition at line 19 of file Reply.cc.

Referenced by Reply().

Member Function Documentation

◆ accumulate()

bool Helper::Reply::accumulate ( const char *  buf,
size_t  len 
)

◆ emptyBuf()

const MemBuf & Helper::Reply::emptyBuf ( ) const
private

Definition at line 187 of file Reply.cc.

References MemBuf::init(), and MemBuf::isNull().

Referenced by other().

◆ finalize()

void Helper::Reply::finalize ( )

parse a helper response line format: line := [ result ] *#( kv-pair ) kv-pair := OWS token '=' ( quoted-string | token )

token are URL-decoded. quoted-string are -escape decoded and the quotes are stripped.

Definition at line 38 of file Reply.cc.

References NotePairs::add(), Helper::BrokenHelper, MemBuf::clean(), MemBuf::consume(), MemBuf::consumeWhitespacePrefix(), MemBuf::content(), MemBuf::contentSize(), debugs, Helper::Error, MemBuf::hasContent(), len, notes, NULL, Helper::Okay, other_, p, parseResponseKeys(), result, strwordtok(), Helper::TT, and xisspace.

Referenced by helper_server::checkForTimedOutRequests(), helperStatefulHandleRead(), and other().

◆ operator=()

Reply& Helper::Reply::operator= ( const Helper::Reply r)
private

◆ other()

const MemBuf& Helper::Reply::other ( ) const
inline

◆ parseResponseKeys()

void Helper::Reply::parseResponseKeys ( )
private

Member Data Documentation

◆ notes

◆ other_

MemBuf Helper::Reply::other_
private

Definition at line 73 of file Reply.h.

Referenced by accumulate(), finalize(), other(), and parseResponseKeys().

◆ reservationId

Helper::ReservationId Helper::Reply::reservationId

Definition at line 65 of file Reply.h.

Referenced by helperStatefulDispatch(), and helperStatefulHandleRead().

◆ result


The documentation for this class was generated from the following files:

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors