HttpHdrContRange.cc File Reference
#include "squid.h"
#include "base/Packable.h"
#include "Debug.h"
#include "enums.h"
#include "HttpHdrContRange.h"
#include "HttpHeaderTools.h"
Include dependency graph for HttpHdrContRange.cc:

Go to the source code of this file.

Macros

#define range_spec_unknown   (-1)
 
#define known_spec(s)   ((s) != range_spec_unknown)
 
#define size_min(a, b)   ((a) <= (b) ? (a) : (b))
 
#define size_diff(a, b)   ((a) >= (b) ? ((a)-(b)) : 0)
 

Functions

static int httpHdrRangeRespSpecParseInit (HttpHdrRangeSpec *spec, const char *field, int flen)
 
static void httpHdrRangeRespSpecPackInto (const HttpHdrRangeSpec *spec, Packable *p)
 
HttpHdrContRangehttpHdrContRangeCreate (void)
 
HttpHdrContRangehttpHdrContRangeParseCreate (const char *str)
 
int httpHdrContRangeParseInit (HttpHdrContRange *range, const char *str)
 
HttpHdrContRangehttpHdrContRangeDup (const HttpHdrContRange *range)
 
void httpHdrContRangePackInto (const HttpHdrContRange *range, Packable *p)
 
void httpHdrContRangeSet (HttpHdrContRange *cr, HttpHdrRangeSpec spec, int64_t ent_len)
 

Macro Definition Documentation

#define known_spec (   s)    ((s) != range_spec_unknown)
#define range_spec_unknown   (-1)
#define size_diff (   a,
 
)    ((a) >= (b) ? ((a)-(b)) : 0)

Definition at line 36 of file HttpHdrContRange.cc.

Referenced by httpHdrRangeRespSpecParseInit().

#define size_min (   a,
 
)    ((a) <= (b) ? (a) : (b))

Definition at line 35 of file HttpHdrContRange.cc.

Function Documentation

HttpHdrContRange* httpHdrContRangeCreate ( void  )
Todo:
CLEANUP: Move httpHdrContRange* functions into the class methods

Definition at line 118 of file HttpHdrContRange.cc.

References HttpHdrContRange::elength, HttpHdrRangeSpec::length, HttpHdrRangeSpec::offset, range_spec_unknown, and HttpHdrContRange::spec.

Referenced by httpHdrContRangeDup(), httpHdrContRangeParseCreate(), and httpHeaderAddContRange().

HttpHdrContRange* httpHdrContRangeDup ( const HttpHdrContRange range)

Definition at line 186 of file HttpHdrContRange.cc.

References assert, and httpHdrContRangeCreate().

void httpHdrContRangePackInto ( const HttpHdrContRange range,
Packable p 
)
HttpHdrContRange* httpHdrContRangeParseCreate ( const char *  str)

Definition at line 127 of file HttpHdrContRange.cc.

References httpHdrContRangeCreate(), and httpHdrContRangeParseInit().

Referenced by HttpHeader::getContRange().

int httpHdrContRangeParseInit ( HttpHdrContRange crange,
const char *  crange_spec 
)
void httpHdrContRangeSet ( HttpHdrContRange ,
HttpHdrRangeSpec  ,
int64_t   
)

inits with given spec

Definition at line 210 of file HttpHdrContRange.cc.

References assert, HttpHdrContRange::elength, and HttpHdrContRange::spec.

Referenced by httpHeaderAddContRange().

static void httpHdrRangeRespSpecPackInto ( const HttpHdrRangeSpec spec,
Packable p 
)
static
static int httpHdrRangeRespSpecParseInit ( HttpHdrRangeSpec spec,
const char *  field,
int  flen 
)
static

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors