]> git.ipfire.org Git - thirdparty/squid.git/blame - src/DelayId.h
SourceFormat Enforcement
[thirdparty/squid.git] / src / DelayId.h
CommitLineData
b67e2c8c 1/*
f6e9a3ee 2 * Copyright (C) 1996-2019 The Squid Software Foundation and contributors
b67e2c8c 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.
b67e2c8c 7 */
8
9#ifndef SQUID_DELAYID_H
10#define SQUID_DELAYID_H
11
9a0a18de 12#if USE_DELAY_POOLS
eb8ed10d 13
b67e2c8c 14#include "DelayIdComposite.h"
15
c4a9875e
VL
16class ClientHttpRequest;
17class HttpReply;
18
63be0a78 19/// \ingroup DelayPoolsAPI
62e76326 20class DelayId
21{
22
23public:
c4a9875e 24 static DelayId DelayClient(ClientHttpRequest *, HttpReply *reply = nullptr);
b67e2c8c 25 DelayId ();
26 DelayId (unsigned short);
27 ~DelayId ();
28 unsigned short pool() const;
29 DelayIdComposite::Pointer compositePosition();
30 DelayIdComposite::Pointer const compositePosition() const;
31 void compositePosition(DelayIdComposite::Pointer );
32 bool operator == (DelayId const &rhs) const;
33 operator bool() const;
34 int bytesWanted(int min, int max) const;
35 void bytesIn (int qty);
a46d2c0e 36 void setNoDelay(bool const);
37 void delayRead(DeferredRead const &);
62e76326 38
39private:
b67e2c8c 40 unsigned short pool_;
41 DelayIdComposite::Pointer compositeId;
a46d2c0e 42 bool markedAsNoDelay;
b67e2c8c 43};
62e76326 44
9a0a18de 45#endif /* USE_DELAY_POOLS */
b67e2c8c 46#endif /* SQUID_DELAYID_H */
f53969cc 47