]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/adaptation/History.h
SourceFormat Enforcement
[thirdparty/squid.git] / src / adaptation / History.h
index c2fe8f1434a71e2835f5d94f21a4d4a777626ab6..d295c33ff75371c375e8d30f3bd9a234006186cb 100644 (file)
@@ -1,11 +1,19 @@
+/*
+ * Copyright (C) 1996-2017 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_ADAPT_HISTORY_H
 #define SQUID_ADAPT_HISTORY_H
 
 #include "adaptation/DynamicGroupCfg.h"
-#include "Array.h"
 #include "base/RefCount.h"
 #include "HttpHeader.h"
 #include "Notes.h"
+#include "sbuf/SBuf.h"
 #include "SquidString.h"
 
 namespace Adaptation
@@ -46,6 +54,7 @@ public:
     /// store the last meta header fields received from the adaptation service
     void recordMeta(const HttpHeader *lm);
 
+    void recordAdaptationService(SBuf &srvId);
 public:
     /// Last received meta header (REQMOD or RESPMOD, whichever comes last).
     HttpHeader lastMeta;
@@ -55,6 +64,9 @@ public:
     /// AccessLogEntry::notes when ALE becomes available
     NotePairs::Pointer metaHeaders;
 
+    typedef std::vector<SBuf> AdaptationServices;
+    AdaptationServices theAdaptationServices; ///< The service groups used
+
     /// sets future services for the Adaptation::AccessCheck to notice
     void setFutureServices(const DynamicGroupCfg &services);
 
@@ -82,7 +94,7 @@ private:
         bool retried; ///< whether the xaction was replaced by another
     };
 
-    typedef Vector<Entry> Entries;
+    typedef std::vector<Entry> Entries;
     Entries theEntries; ///< historical record, in the order of xact starts
 
     // theXx* will become a map<string,string>, but we only support one record
@@ -96,3 +108,4 @@ private:
 } // namespace Adaptation
 
 #endif
+