]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/helper.h
SourceFormat Enforcement
[thirdparty/squid.git] / src / helper.h
index 7ebb2ba13d49cd5bdd0cad033cad11cb4014f454..5da5c3b752e549694dbf73f7bce27a631d582b93 100644 (file)
 #ifndef SQUID_HELPER_H
 #define SQUID_HELPER_H
 
-#include "squid.h"
+#include "base/AsyncCall.h"
 #include "cbdata.h"
 #include "comm/forward.h"
-#include "HelperChildConfig.h"
+#include "dlink.h"
 #include "ip/Address.h"
+#include "HelperChildConfig.h"
 
 class helper_request;
 
@@ -46,7 +47,7 @@ typedef void HLPSCB(void *, void *lastserver, char *buf);
 class helper
 {
 public:
-    inline helper(const char *name) : cmdline(NULL), id_name(name) {};
+    inline helper(const char *name) : cmdline(NULL), id_name(name), eom('\n') {}
     ~helper();
 
 public:
@@ -59,6 +60,7 @@ public:
     Ip::Address addr;
     time_t last_queue_warn;
     time_t last_restart;
+    char eom;   ///< The char which marks the end of (response) message, normally '\n'
 
     struct _stats {
         int requests;
@@ -66,8 +68,6 @@ public:
         int queue_size;
         int avg_svc_time;
     } stats;
-    /// True if callback expects the whole helper output, as a c-string.
-    bool return_full_reply;
 
 private:
     CBDATA_CLASS2(helper);
@@ -132,6 +132,8 @@ public:
 
 };
 
+class MemBuf;
+
 class helper_server : public HelperServerBase
 {
 public:
@@ -145,6 +147,9 @@ public:
         int uses;
         unsigned int pending;
     } stats;
+
+private:
+    CBDATA_CLASS2(helper_server);
 };
 
 class helper_stateful_request;
@@ -164,6 +169,9 @@ public:
         int releases;
     } stats;
     void *data;                        /* State data used by the calling routines */
+
+private:
+    CBDATA_CLASS2(helper_stateful_server);
 };
 
 class helper_request
@@ -205,5 +213,4 @@ SQUIDCEXTERN void helperStatefulShutdown(statefulhelper * hlp);
 SQUIDCEXTERN void helperStatefulReleaseServer(helper_stateful_server * srv);
 SQUIDCEXTERN void *helperStatefulServerGetData(helper_stateful_server * srv);
 
-
 #endif /* SQUID_HELPER_H */