]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/HttpHdrContRange.h
2 * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
9 #ifndef SQUID_HTTPHDRCONTRANGE_H
10 #define SQUID_HTTPHDRCONTRANGE_H
12 #include "HttpHeaderRange.h"
16 /** HTTP Content-Range: header field */
17 class HttpHdrContRange
19 MEMPROXY_CLASS(HttpHdrContRange
);
22 HttpHdrContRange() : elength(0) {}
24 HttpHdrRangeSpec spec
;
25 int64_t elength
; /**< entity length, not content length */
28 // TODO: move httpHdrContRange* functions into the class methods
30 HttpHdrContRange
*httpHdrContRangeCreate(void);
31 HttpHdrContRange
*httpHdrContRangeParseCreate(const char *crange_spec
);
32 /** returns true if range is valid; inits HttpHdrContRange */
33 int httpHdrContRangeParseInit(HttpHdrContRange
* crange
, const char *crange_spec
);
34 HttpHdrContRange
*httpHdrContRangeDup(const HttpHdrContRange
* crange
);
35 void httpHdrContRangePackInto(const HttpHdrContRange
* crange
, Packable
* p
);
36 /** inits with given spec */
37 void httpHdrContRangeSet(HttpHdrContRange
*, HttpHdrRangeSpec
, int64_t);
38 void httpHeaderAddContRange(HttpHeader
*, HttpHdrRangeSpec
, int64_t);
40 #endif /* SQUID_HTTPHDRCONTRANGE_H */