]> git.ipfire.org Git - thirdparty/squid.git/blame - src/mgr/Inquirer.h
Boilerplate: update copyright blurbs on Squid helpers
[thirdparty/squid.git] / src / mgr / Inquirer.h
CommitLineData
8822ebee 1/*
8822ebee
AR
2 * DEBUG: section 16 Cache Manager API
3 *
4 */
5
6#ifndef SQUID_MGR_INQUIRER_H
7#define SQUID_MGR_INQUIRER_H
8
c3e8e4e9 9#include "comm/forward.h"
51ea0904 10#include "ipc/Inquirer.h"
8822ebee 11#include "mgr/Action.h"
8822ebee
AR
12
13class CommIoCbParams;
14class CommCloseCbParams;
15
16namespace Mgr
17{
18
19/// Coordinator's job that sends a cache manage request to each strand,
20/// aggregating individual strand responses and dumping the result if needed
51ea0904 21class Inquirer: public Ipc::Inquirer
8822ebee
AR
22{
23public:
51ea0904 24 Inquirer(Action::Pointer anAction, const Request &aCause,
d9fc6862 25 const Ipc::StrandCoords &coords);
8822ebee
AR
26
27protected:
28 /* AsyncJob API */
29 virtual void start();
8822ebee 30 virtual bool doneAll() const;
8822ebee 31
51ea0904
CT
32 /* Ipc::Inquirer API */
33 virtual void cleanup();
34 virtual void sendResponse();
35 virtual bool aggregate(Ipc::Response::Pointer aResponse);
8822ebee 36
51ea0904 37private:
8822ebee
AR
38 void noteWroteHeader(const CommIoCbParams& params);
39 void noteCommClosed(const CommCloseCbParams& params);
8822ebee 40 void removeCloseHandler();
b8151fa1
CT
41 Ipc::StrandCoords applyQueryParams(const Ipc::StrandCoords& aStrands,
42 const QueryParams& aParams);
8822ebee
AR
43private:
44 Action::Pointer aggrAction; //< action to aggregate
45
1b76e6c1 46 Comm::ConnectionPointer conn; ///< HTTP client socket descriptor
8822ebee 47
8822ebee
AR
48 AsyncCall::Pointer writer; ///< comm_write callback
49 AsyncCall::Pointer closer; ///< comm_close handler
8822ebee
AR
50
51 CBDATA_CLASS2(Inquirer);
52};
53
54} // namespace Mgr
55
56#endif /* SQUID_MGR_INQUIRER_H */