]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
SourceLayout: shuffle HelperChildConfig into libhelper.la
authorAmos Jeffries <squid3@treenet.co.nz>
Thu, 25 Sep 2014 06:50:32 +0000 (23:50 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Thu, 25 Sep 2014 06:50:32 +0000 (23:50 -0700)
src/Makefile.am
src/SquidConfig.h
src/auth/Config.h
src/external_acl.cc
src/helper.h
src/helper/ChildConfig.cc [moved from src/HelperChildConfig.cc with 91% similarity]
src/helper/ChildConfig.h [moved from src/HelperChildConfig.h with 90% similarity]
src/helper/Makefile.am
src/ssl/Config.h
src/tests/stub_HelperChildConfig.cc

index a7021cf01259798d132d1a00fdca770e72490719..98358b4cc66e8ceee18cef9a1c2ea5123b3cbc43 100644 (file)
@@ -373,8 +373,6 @@ squid_SOURCES = \
        gopher.cc \
        helper.cc \
        helper.h \
-       HelperChildConfig.h \
-       HelperChildConfig.cc \
        hier_code.h \
        HierarchyLogEntry.h \
        $(HTCPSOURCE) \
@@ -745,7 +743,7 @@ ufsdump_SOURCES = \
        ufsdump.cc \
        dlink.h \
        dlink.cc \
-       HelperChildConfig.h \
+       helper/ChildConfig.h \
        tests/stub_HelperChildConfig.cc \
        HttpRequestMethod.cc \
        RemovalPolicy.cc \
@@ -1245,8 +1243,6 @@ tests_testACLMaxUserIP_SOURCES= \
        tests/stub_fatal.cc \
        FileMap.h \
        filemap.cc \
-       HelperChildConfig.h \
-       HelperChildConfig.cc \
        HttpBody.cc \
        HttpHeader.h \
        HttpHeader.cc \
@@ -1348,6 +1344,7 @@ tests_testACLMaxUserIP_SOURCES= \
 nodist_tests_testACLMaxUserIP_SOURCES= \
        $(TESTSOURCES)
 tests_testACLMaxUserIP_LDADD= \
+       helper/libhelper.la \
        http/libsquid-http.la \
        $(AUTH_ACL_LIBS) \
        ident/libident.la \
@@ -1474,8 +1471,6 @@ tests_testCacheManager_SOURCES = \
        gopher.cc \
        hier_code.h \
        helper.cc \
-       HelperChildConfig.h \
-       HelperChildConfig.cc \
        $(HTCPSOURCE) \
        HttpStateFlags.h \
        http.cc \
@@ -1892,8 +1887,6 @@ tests_testEvent_SOURCES = \
        gopher.h \
        gopher.cc \
        helper.cc \
-       HelperChildConfig.h \
-       HelperChildConfig.cc \
        hier_code.h \
        $(HTCPSOURCE) \
        http.cc \
@@ -2142,8 +2135,6 @@ tests_testEventLoop_SOURCES = \
        gopher.h \
        gopher.cc \
        helper.cc \
-       HelperChildConfig.h \
-       HelperChildConfig.cc \
        hier_code.h \
        $(HTCPSOURCE) \
        http.cc \
@@ -2388,8 +2379,6 @@ tests_test_http_range_SOURCES = \
        gopher.h \
        gopher.cc \
        helper.cc \
-       HelperChildConfig.h \
-       HelperChildConfig.cc \
        hier_code.h \
        $(HTCPSOURCE) \
        http.cc \
@@ -2696,8 +2685,6 @@ tests_testHttpRequest_SOURCES = \
        gopher.h \
        gopher.cc \
        helper.cc \
-       HelperChildConfig.h \
-       HelperChildConfig.cc \
        hier_code.h \
        $(HTCPSOURCE) \
        http.cc \
@@ -3516,8 +3503,6 @@ tests_testURL_SOURCES = \
        gopher.h \
        gopher.cc \
        helper.cc \
-       HelperChildConfig.h \
-       HelperChildConfig.cc \
        hier_code.h \
        $(HTCPSOURCE) \
        http.cc \
index 9b5c87fdea08a488a47d8a95da6ee28c5d86a61d..f69c336cc49fb4baa51379896417f5cc70248476 100644 (file)
@@ -13,7 +13,7 @@
 #include "base/RefCount.h"
 #include "ClientDelayConfig.h"
 #include "DelayConfig.h"
-#include "HelperChildConfig.h"
+#include "helper/ChildConfig.h"
 #include "HttpHeaderTools.h"
 #include "icmp/IcmpConfig.h"
 #include "ip/Address.h"
@@ -184,8 +184,8 @@ public:
 
     } Program;
 
-    HelperChildConfig redirectChildren;
-    HelperChildConfig storeIdChildren;
+    Helper::ChildConfig redirectChildren;
+    Helper::ChildConfig storeIdChildren;
     time_t authenticateGCInterval;
     time_t authenticateTTL;
     time_t authenticateIpTTL;
index d20e83cd8a9d129437a0df1c55aabc5ebb9ee26d..28795d1afd2728d16758b6aa62a693b5f0805734 100644 (file)
@@ -13,7 +13,7 @@
 
 #include "AccessLogEntry.h"
 #include "auth/UserRequest.h"
-#include "HelperChildConfig.h"
+#include "helper/ChildConfig.h"
 
 class StoreEntry;
 class HttpReply;
@@ -124,7 +124,7 @@ public:
     virtual const char * type() const = 0;
 
 public:
-    HelperChildConfig authenticateChildren;
+    Helper::ChildConfig authenticateChildren;
     wordlist *authenticateProgram; ///< Helper program to run, includes all parameters
     String keyExtrasLine;  ///< The format of the request to the auth helper
     Format::Format *keyExtras; ///< The compiled request format
index cde7ba7916fbb83c17a03ba545b6c7b1bafcdc15..43be055ec06df2d0f028db68f1907493f4e6b4c6 100644 (file)
@@ -90,7 +90,7 @@ public:
 
     wordlist *cmdline;
 
-    HelperChildConfig children;
+    Helper::ChildConfig children;
 
     helper *theHelper;
 
index 1cbbcc726827e2bb2f60fe117800e3e9693640b9..16c24a0b684c47affc8dbd4ac95495923b6f9042 100644 (file)
@@ -16,8 +16,8 @@
 #include "cbdata.h"
 #include "comm/forward.h"
 #include "dlink.h"
+#include "helper/ChildConfig.h"
 #include "helper/forward.h"
-#include "HelperChildConfig.h"
 #include "ip/Address.h"
 
 class helper
@@ -39,7 +39,7 @@ public:
     dlink_list servers;
     dlink_list queue;
     const char *id_name;
-    HelperChildConfig childs;    ///< Configuration settings for number running.
+    Helper::ChildConfig childs;    ///< Configuration settings for number running.
     int ipc_type;
     Ip::Address addr;
     time_t last_queue_warn;
similarity index 91%
rename from src/HelperChildConfig.cc
rename to src/helper/ChildConfig.cc
index 1a0e41a0d398a7b054e58a057f0c73bc23794302..c929aabd0c9ae186d23e8b6d3a3db932fc0b3a49 100644 (file)
 #include "ConfigParser.h"
 #include "Debug.h"
 #include "globals.h"
-#include "HelperChildConfig.h"
+#include "helper/ChildConfig.h"
 #include "Parsing.h"
 
 #include <cstring>
 
-HelperChildConfig::HelperChildConfig(const unsigned int m):
+Helper::ChildConfig::ChildConfig(const unsigned int m):
         n_max(m),
         n_startup(0),
         n_idle(1),
@@ -25,8 +25,8 @@ HelperChildConfig::HelperChildConfig(const unsigned int m):
         n_active(0)
 {}
 
-HelperChildConfig &
-HelperChildConfig::updateLimits(const HelperChildConfig &rhs)
+Helper::ChildConfig &
+Helper::ChildConfig::updateLimits(const Helper::ChildConfig &rhs)
 {
     // Copy the limits only.
     // Preserve the local state values (n_running and n_active)
@@ -38,7 +38,7 @@ HelperChildConfig::updateLimits(const HelperChildConfig &rhs)
 }
 
 int
-HelperChildConfig::needNew() const
+Helper::ChildConfig::needNew() const
 {
     /* during the startup and reconfigure use our special amount... */
     if (starting_up || reconfiguring) return n_startup;
@@ -51,7 +51,7 @@ HelperChildConfig::needNew() const
 }
 
 void
-HelperChildConfig::parseConfig()
+Helper::ChildConfig::parseConfig()
 {
     char const *token = ConfigParser::NextToken();
 
similarity index 90%
rename from src/HelperChildConfig.h
rename to src/helper/ChildConfig.h
index 24bbe95dda014809c9391a860128ad79964752b6..aa68e657987621d6a4adfc9242880b344a303a91 100644 (file)
@@ -6,8 +6,11 @@
  * Please see the COPYING and CONTRIBUTORS files for details.
  */
 
-#ifndef _SQUID_SRC_HELPERCHILDCONFIG_H
-#define _SQUID_SRC_HELPERCHILDCONFIG_H
+#ifndef _SQUID_SRC_HELPER_CHILDCONFIG_H
+#define _SQUID_SRC_HELPER_CHILDCONFIG_H
+
+namespace Helper
+{
 
 /**
  * Contains statistics of a particular type of child helper.
  * Some derived from a helper children configuration option,
  * some from runtime stats on the currently active children.
  */
-class HelperChildConfig
+class ChildConfig
 {
 public:
-    explicit HelperChildConfig(const unsigned int m = 0);
+    explicit ChildConfig(const unsigned int m = 0);
 
     /**
      * When new helpers are needed call this to find out how many more
@@ -35,7 +38,7 @@ public:
      * This is for parsing new child settings into an object incrementally then updating
      * the running set without loosing any of the active state or causing races.
      */
-    HelperChildConfig &updateLimits(const HelperChildConfig &rhs);
+    ChildConfig &updateLimits(const ChildConfig &rhs);
 
     /* values from squid.conf */
 public:
@@ -82,9 +85,11 @@ public:
     unsigned int n_active;
 };
 
+} // namespace Helper
+
 /* Legacy parser interface */
 #define parse_HelperChildConfig(c)     (c)->parseConfig()
 #define dump_HelperChildConfig(e,n,c)  storeAppendPrintf((e), "\n%s %d startup=%d idle=%d concurrency=%d\n", (n), (c).n_max, (c).n_startup, (c).n_idle, (c).concurrency)
 #define free_HelperChildConfig(dummy)  // NO.
 
-#endif /* _SQUID_SRC_HELPERCHILDCONFIG_H */
+#endif /* _SQUID_SRC_HELPER_CHILDCONFIG_H */
index fa7a57c08e8ac56f12720a79f95b0aa53f054fea..fa1dbf165a4297ad888658ede695c8eacb281e0f 100644 (file)
@@ -11,6 +11,8 @@ include $(top_srcdir)/src/TestHeaders.am
 noinst_LTLIBRARIES = libhelper.la
 
 libhelper_la_SOURCES = \
+       ChildConfig.cc \
+       ChildConfig.h \
        forward.h \
        Reply.cc \
        Reply.h \
index a1cd70a604ffbab337039a0d51a526f0d6cc182c..a64cf8cd2725dd793ef16af9972018bd51bdbaa0 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef SQUID_SSL_CONFIG_H
 #define SQUID_SSL_CONFIG_H
 
-#include "HelperChildConfig.h"
+#include "helper/ChildConfig.h"
 
 namespace Ssl
 {
@@ -20,10 +20,10 @@ public:
 #if USE_SSL_CRTD
     char *ssl_crtd; ///< Name of external ssl_crtd application.
     /// The number of processes spawn for ssl_crtd.
-    HelperChildConfig ssl_crtdChildren;
+    ::Helper::ChildConfig ssl_crtdChildren;
 #endif
     char *ssl_crt_validator;
-    HelperChildConfig ssl_crt_validator_Children;
+    ::Helper::ChildConfig ssl_crt_validator_Children;
     Config();
     ~Config();
 private:
index d2473030b487194e9762760d1879f7d58d3e8501..2d9e80854c49afd85a572b6bd172eb3b0ba4c850 100644 (file)
@@ -8,14 +8,14 @@
 
 #include "squid.h"
 #include "globals.h"
-#include "HelperChildConfig.h"
+#include "helper/ChildConfig.h"
 
 #define STUB_API "stub_HelperChildconfig.cc"
 #include "tests/STUB.h"
 
 #include <cstring>
 
-HelperChildConfig::HelperChildConfig(const unsigned int m):
+Helper::ChildConfig::ChildConfig(const unsigned int m):
         n_max(m),
         n_startup(0),
         n_idle(1),
@@ -25,7 +25,7 @@ HelperChildConfig::HelperChildConfig(const unsigned int m):
 {}
 
 int
-HelperChildConfig::needNew() const
+Helper::ChildConfig::needNew() const
 {
     /* during the startup and reconfigure use our special amount... */
     if (starting_up || reconfiguring) return n_startup;
@@ -37,4 +37,4 @@ HelperChildConfig::needNew() const
     return (n_max - n_active);
 }
 
-void HelperChildConfig::parseConfig() STUB
+void Helper::ChildConfig::parseConfig() STUB