+/*
+ * Copyright (C) 1996-2020 The Squid Software Foundation and contributors
+ *
+ * Squid software is distributed under GPLv2+ license and includes
+ * contributions from numerous individuals and organizations.
+ * Please see the COPYING and CONTRIBUTORS files for details.
+ */
+
#ifndef SQUID_ADAPTATION__INITIATOR_H
#define SQUID_ADAPTATION__INITIATOR_H
+#include "adaptation/forward.h"
#include "base/AsyncJob.h"
#include "base/CbcPointer.h"
-#include "adaptation/forward.h"
/*
* The ICAP Initiator is an ICAP vectoring point that initates ICAP
* or aborting an ICAP transaction.
*/
-class HttpMsg;
-
namespace Adaptation
{
Initiator(): AsyncJob("Initiator") {}
virtual ~Initiator() {}
- // called when ICAP response headers are successfully interpreted
- virtual void noteAdaptationAnswer(HttpMsg *message) = 0;
-
- // called when valid ICAP response headers are no longer expected
- // the final parameter is set to disable bypass or retries
- virtual void noteAdaptationQueryAbort(bool final) = 0;
+ /// AccessCheck calls this back with a possibly nil service group
+ /// to signal whether adaptation is needed and where it should start.
+ virtual void noteAdaptationAclCheckDone(Adaptation::ServiceGroupPointer group);
+ /// called with the initial adaptation decision (adapt, block, error);
+ /// virgin and/or adapted body transmission may continue after this
+ virtual void noteAdaptationAnswer(const Answer &answer) = 0;
protected:
///< starts freshly created initiate and returns a safe pointer to it
} // namespace Adaptation
#endif /* SQUID_ADAPTATION__INITIATOR_H */
+