]> git.ipfire.org Git - thirdparty/squid.git/blame - src/adaptation/Answer.cc
Renamed squid.h to squid-old.h and config.h to squid.h
[thirdparty/squid.git] / src / adaptation / Answer.cc
CommitLineData
1adcebc3
AR
1/*
2 * DEBUG: section 93 ICAP (RFC 3507) Client
3 */
4
f7f3304a 5#include "squid.h"
1adcebc3
AR
6#include "adaptation/Answer.h"
7#include "base/AsyncJobCalls.h"
8
9Adaptation::Answer
10Adaptation::Answer::Error(bool final)
11{
12 Answer answer(akError);
13 answer.final = final;
14 debugs(93, 4, HERE << "error: " << final);
15 return answer;
16}
17
18Adaptation::Answer
19Adaptation::Answer::Forward(HttpMsg *aMsg)
20{
21 Answer answer(akForward);
22 answer.message = aMsg;
23 debugs(93, 4, HERE << "forwarding: " << (void*)aMsg);
24 return answer;
25}
26
27
28Adaptation::Answer
29Adaptation::Answer::Block(const String &aRule)
30{
31 Answer answer(akBlock);
32 answer.ruleId = aRule;
33 debugs(93, 4, HERE << "blocking rule: " << aRule);
34 return answer;
35}
36
37std::ostream &
38Adaptation::Answer::print(std::ostream &os) const
39{
40 return os << kind; // TODO: add more details
41}
42
43Adaptation::Answer::Answer(Kind aKind): final(true), kind(aKind)
44{
45}