source: squid-ssl/trunk/fuentes/src/adaptation/Answer.cc @ 5495

Last change on this file since 5495 was 5495, checked in by Juanma, 2 years ago

Initial release

File size: 1.2 KB
Line 
1/*
2 * Copyright (C) 1996-2015 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/* DEBUG: section 93    ICAP (RFC 3507) Client */
10
11#include "squid.h"
12#include "adaptation/Answer.h"
13#include "base/AsyncJobCalls.h"
14
15Adaptation::Answer
16Adaptation::Answer::Error(bool final)
17{
18    Answer answer(akError);
19    answer.final = final;
20    debugs(93, 4, HERE << "error: " << final);
21    return answer;
22}
23
24Adaptation::Answer
25Adaptation::Answer::Forward(HttpMsg *aMsg)
26{
27    Answer answer(akForward);
28    answer.message = aMsg;
29    debugs(93, 4, HERE << "forwarding: " << (void*)aMsg);
30    return answer;
31}
32
33Adaptation::Answer
34Adaptation::Answer::Block(const String &aRule)
35{
36    Answer answer(akBlock);
37    answer.ruleId = aRule;
38    debugs(93, 4, HERE << "blocking rule: " << aRule);
39    return answer;
40}
41
42std::ostream &
43Adaptation::Answer::print(std::ostream &os) const
44{
45    return os << kind; // TODO: add more details
46}
47
48Adaptation::Answer::Answer(Kind aKind): final(true), kind(aKind)
49{
50}
51
Note: See TracBrowser for help on using the repository browser.