]> git.ipfire.org Git - thirdparty/squid.git/blame - src/HttpHdrContRange.h
4.0.9
[thirdparty/squid.git] / src / HttpHdrContRange.h
CommitLineData
528b2c61 1/*
ef57eb7b 2 * Copyright (C) 1996-2016 The Squid Software Foundation and contributors
528b2c61 3 *
bbc27441
AJ
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.
528b2c61 7 */
bbc27441 8
528b2c61 9#ifndef SQUID_HTTPHDRCONTRANGE_H
10#define SQUID_HTTPHDRCONTRANGE_H
11
e1f7507e 12class HttpHeader;
528b2c61 13
e1f7507e
AJ
14/* for HttpHdrRangeSpec */
15#include "HttpHeaderRange.h"
16
17/** HTTP Content-Range: header field */
62e76326 18class HttpHdrContRange
19{
20
528b2c61 21public:
22 HttpHdrRangeSpec spec;
f53969cc 23 int64_t elength; /**< entity length, not content length */
528b2c61 24};
25
e1f7507e
AJ
26/** \todo CLEANUP: Move httpHdrContRange* functions into the class methods */
27
43ca19e0
FC
28HttpHdrContRange *httpHdrContRangeCreate(void);
29HttpHdrContRange *httpHdrContRangeParseCreate(const char *crange_spec);
e1f7507e 30/** returns true if range is valid; inits HttpHdrContRange */
43ca19e0
FC
31int httpHdrContRangeParseInit(HttpHdrContRange * crange, const char *crange_spec);
32void httpHdrContRangeDestroy(HttpHdrContRange * crange);
33HttpHdrContRange *httpHdrContRangeDup(const HttpHdrContRange * crange);
17802cf1 34void httpHdrContRangePackInto(const HttpHdrContRange * crange, Packable * p);
e1f7507e 35/** inits with given spec */
43ca19e0
FC
36void httpHdrContRangeSet(HttpHdrContRange *, HttpHdrRangeSpec, int64_t);
37void httpHeaderAddContRange(HttpHeader *, HttpHdrRangeSpec, int64_t);
25b6a907 38
528b2c61 39#endif /* SQUID_HTTPHDRCONTRANGE_H */
f53969cc 40