]> git.ipfire.org Git - thirdparty/squid.git/blame_incremental - src/HttpHdrContRange.h
Bug 5498: cachemgr documentation improvements (#2109)
[thirdparty/squid.git] / src / HttpHdrContRange.h
... / ...
CommitLineData
1/*
2 * Copyright (C) 1996-2025 The Squid Software Foundation and contributors
3 *
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.
7 */
8
9#ifndef SQUID_SRC_HTTPHDRCONTRANGE_H
10#define SQUID_SRC_HTTPHDRCONTRANGE_H
11
12#include "HttpHeaderRange.h"
13
14class HttpHeader;
15
16/** HTTP Content-Range: header field */
17class HttpHdrContRange
18{
19 MEMPROXY_CLASS(HttpHdrContRange);
20
21public:
22 HttpHdrContRange() : elength(0) {}
23
24 HttpHdrRangeSpec spec;
25 int64_t elength; /**< entity length, not content length */
26};
27
28// TODO: move httpHdrContRange* functions into the class methods
29
30HttpHdrContRange *httpHdrContRangeCreate(void);
31HttpHdrContRange *httpHdrContRangeParseCreate(const char *crange_spec);
32/** returns true if range is valid; inits HttpHdrContRange */
33int httpHdrContRangeParseInit(HttpHdrContRange * crange, const char *crange_spec);
34HttpHdrContRange *httpHdrContRangeDup(const HttpHdrContRange * crange);
35void httpHdrContRangePackInto(const HttpHdrContRange * crange, Packable * p);
36/** inits with given spec */
37void httpHdrContRangeSet(HttpHdrContRange *, HttpHdrRangeSpec, int64_t);
38void httpHeaderAddContRange(HttpHeader *, HttpHdrRangeSpec, int64_t);
39
40#endif /* SQUID_SRC_HTTPHDRCONTRANGE_H */
41