#ifndef SQUID_ADAPT_HISTORY_H
#define SQUID_ADAPT_HISTORY_H
-#include "RefCount.h"
-#include "Array.h"
+#include "adaptation/DynamicGroupCfg.h"
+#include "base/RefCount.h"
+#include "base/Vector.h"
+#include "HttpHeader.h"
+#include "Notes.h"
#include "SquidString.h"
namespace Adaptation
{
-
/// collects information about adaptations related to a master transaction
class History: public RefCountable
{
/// returns true, fills the value, and resets iff next services were set
bool extractNextServices(String &value);
+ /// store the last meta header fields received from the adaptation service
+ void recordMeta(const HttpHeader *lm);
+
+public:
+ /// Last received meta header (REQMOD or RESPMOD, whichever comes last).
+ HttpHeader lastMeta;
+ /// All REQMOD and RESPMOD meta headers merged. Last field wins conflicts.
+ HttpHeader allMeta;
+ /// key:value pairs set by adaptation_meta, to be added to
+ /// AccessLogEntry::notes when ALE becomes available
+ NotePairs::Pointer metaHeaders;
+
+ /// sets future services for the Adaptation::AccessCheck to notice
+ void setFutureServices(const DynamicGroupCfg &services);
+
+ /// returns true, fills the value, and resets iff future services were set
+ bool extractFutureServices(DynamicGroupCfg &services);
+
private:
/// single Xaction stats (i.e., a historical record entry)
class Entry
String theXxValue; ///< value part of the cross-xactional database record
String theNextServices; ///< services Adaptation::Iterator must use next
+ DynamicGroupCfg theFutureServices; ///< services AccessCheck must use
};
} // namespace Adaptation