]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/adaptation/ServiceConfig.h
SourceLayout: C++11 upgrade for class YesNoNone
[thirdparty/squid.git] / src / adaptation / ServiceConfig.h
index 9adbf37d0fb67bc9e5ef27db75b6eb5dd89b7cbf..f18f3bb5c692f7ab9bc8a27d239349d939a6d8a2 100644 (file)
@@ -1,9 +1,19 @@
+/*
+ * Copyright (C) 1996-2016 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__SERVICE_CONFIG_H
 #define SQUID_ADAPTATION__SERVICE_CONFIG_H
 
-#include "SquidString.h"
-#include "RefCount.h"
 #include "adaptation/Elements.h"
+#include "base/RefCount.h"
+#include "base/YesNoNone.h"
+#include "security/PeerOptions.h"
+#include "SquidString.h"
 
 namespace Adaptation
 {
@@ -32,9 +42,17 @@ public:
     Method method;   // what is being adapted (REQMOD vs RESPMOD)
     VectPoint point; // where the adaptation happens (pre- or post-cache)
     bool bypass;
+
+    // options
+    long maxConn; ///< maximum number of concurrent service transactions
+    SrvBehaviour onOverload; ///< how to handle Max-Connections feature
     bool routing; ///< whether this service may determine the next service(s)
     bool ipv6;    ///< whether this service uses IPv6 transport (default IPv4)
 
+    // security settings for adaptation service
+    Security::PeerOptions secure;
+    YesNoNone connectionEncryption; ///< whether this service uses only secure connections
+
 protected:
     Method parseMethod(const char *buf) const;
     VectPoint parseVectPoint(const char *buf) const;
@@ -42,6 +60,9 @@ protected:
     /// interpret parsed values
     bool grokBool(bool &var, const char *name, const char *value);
     bool grokUri(const char *value);
+    bool grokLong(long &var, const char *name, const char *value);
+    /// handle on-overload configuration option
+    bool grokOnOverload(SrvBehaviour &var, const char *value);
     /// handle name=value configuration option with name unknown to Squid
     virtual bool grokExtension(const char *name, const char *value);
 };
@@ -49,3 +70,4 @@ protected:
 } // namespace Adaptation
 
 #endif /* SQUID_ADAPTATION__SERVICE_CONFIG_H */
+