#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;
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:
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;
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);
};
+class MemBuf;
+
class helper_server : public HelperServerBase
{
public:
int uses;
unsigned int pending;
} stats;
+
+private:
+ CBDATA_CLASS2(helper_server);
};
class helper_stateful_request;
int releases;
} stats;
void *data; /* State data used by the calling routines */
+
+private:
+ CBDATA_CLASS2(helper_stateful_server);
};
class helper_request
SQUIDCEXTERN void helperStatefulReleaseServer(helper_stateful_server * srv);
SQUIDCEXTERN void *helperStatefulServerGetData(helper_stateful_server * srv);
-
#endif /* SQUID_HELPER_H */