]> git.ipfire.org Git - thirdparty/squid.git/blob - src/ETag.h
Source Format Enforcement (#1234)
[thirdparty/squid.git] / src / ETag.h
1 /*
2 * Copyright (C) 1996-2023 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_ETAG_H
10 #define _SQUID_ETAG_H
11
12 /**
13 * ETag support is rudimantal; this struct is likely to change
14 * Note: "str" points to memory in HttpHeaderEntry (for now)
15 * so ETags should be used as tmp variables only (for now)
16 */
17 class ETag
18 {
19 public:
20 const char *str; ///< quoted-string
21 int weak; ///< true if it is a weak validator
22 };
23
24 /* ETag */
25 int etagParseInit(ETag * etag, const char *str);
26 /// whether etags are strong-equal
27 bool etagIsStrongEqual(const ETag &tag1, const ETag &tag2);
28 /// whether etags are weak-equal
29 bool etagIsWeakEqual(const ETag &tag1, const ETag &tag2);
30
31 #endif /* _SQUIDETAG_H */
32