]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/tests/stub_HelperChildConfig.cc
SourceFormat Enforcement
[thirdparty/squid.git] / src / tests / stub_HelperChildConfig.cc
index b7a6153e6a715c310bbe71686ee8c972474bf78b..60761e00811d7e09a0b041fe4315c5f0ba39fc93 100644 (file)
@@ -1,39 +1,44 @@
-#include "config.h"
-#include "HelperChildConfig.h"
+/*
+ * Copyright (C) 1996-2015 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.
+ */
+
+#include "squid.h"
 #include "globals.h"
-
-#include <string.h>
-
-HelperChildConfig::HelperChildConfig() :
-        n_max(0),
-        n_startup(1),
-        n_idle(1),
-        concurrency(1),
-        n_running(0),
-        n_active(0)
+#include "helper/ChildConfig.h"
+
+#define STUB_API "stub_HelperChildconfig.cc"
+#include "tests/STUB.h"
+
+#include <cstring>
+
+Helper::ChildConfig::ChildConfig():
+    n_max(0),
+    n_startup(0),
+    n_idle(1),
+    concurrency(0),
+    n_running(0),
+    n_active(0),
+    queue_size(0),
+    defaultQueueSize(true)
 {}
 
-HelperChildConfig::HelperChildConfig(const unsigned int m, const unsigned int s, const unsigned int i, const unsigned int cc) :
-        n_max(m),
-        n_startup(s),
-        n_idle(i),
-        concurrency(cc),
-        n_running(0),
-        n_active(0)
+Helper::ChildConfig::ChildConfig(const unsigned int m):
+    n_max(m),
+    n_startup(0),
+    n_idle(1),
+    concurrency(0),
+    n_running(0),
+    n_active(0),
+    queue_size(2 * m),
+    defaultQueueSize(true)
 {}
 
-HelperChildConfig::~HelperChildConfig()
-{}
-
-HelperChildConfig &
-HelperChildConfig::operator =(const HelperChildConfig &rhs)
-{
-    memcpy(this, &rhs, sizeof(HelperChildConfig));
-    return *this;
-}
-
-const int
-HelperChildConfig::needNew() const
+int
+Helper::ChildConfig::needNew() const
 {
     /* during the startup and reconfigure use our special amount... */
     if (starting_up || reconfiguring) return n_startup;
@@ -45,9 +50,5 @@ HelperChildConfig::needNew() const
     return (n_max - n_active);
 }
 
-void
-HelperChildConfig::parseConfig()
-{
-    fprintf(stderr, "HelperChildConfig::parseConfig not implemented.");
-    exit(1);
-}
+void Helper::ChildConfig::parseConfig() STUB
+