]> git.ipfire.org Git - thirdparty/squid.git/blame - src/mgr/Inquirer.h
Docs: Copyright updates for 2018 (#114)
[thirdparty/squid.git] / src / mgr / Inquirer.h
CommitLineData
8822ebee 1/*
5b74111a 2 * Copyright (C) 1996-2018 The Squid Software Foundation and contributors
8822ebee 3 *
bbc27441
AJ
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
8822ebee
AR
7 */
8
bbc27441
AJ
9/* DEBUG: section 16 Cache Manager API */
10
8822ebee
AR
11#ifndef SQUID_MGR_INQUIRER_H
12#define SQUID_MGR_INQUIRER_H
13
c3e8e4e9 14#include "comm/forward.h"
51ea0904 15#include "ipc/Inquirer.h"
8822ebee 16#include "mgr/Action.h"
8822ebee
AR
17
18class CommIoCbParams;
19class CommCloseCbParams;
20
21namespace Mgr
22{
23
24/// Coordinator's job that sends a cache manage request to each strand,
25/// aggregating individual strand responses and dumping the result if needed
51ea0904 26class Inquirer: public Ipc::Inquirer
8822ebee 27{
5c2f68b7
AJ
28 CBDATA_CLASS(Inquirer);
29
8822ebee 30public:
51ea0904 31 Inquirer(Action::Pointer anAction, const Request &aCause,
d9fc6862 32 const Ipc::StrandCoords &coords);
8822ebee
AR
33
34protected:
35 /* AsyncJob API */
36 virtual void start();
8822ebee 37 virtual bool doneAll() const;
8822ebee 38
51ea0904
CT
39 /* Ipc::Inquirer API */
40 virtual void cleanup();
41 virtual void sendResponse();
42 virtual bool aggregate(Ipc::Response::Pointer aResponse);
8822ebee 43
51ea0904 44private:
8822ebee
AR
45 void noteWroteHeader(const CommIoCbParams& params);
46 void noteCommClosed(const CommCloseCbParams& params);
8822ebee 47 void removeCloseHandler();
b8151fa1
CT
48 Ipc::StrandCoords applyQueryParams(const Ipc::StrandCoords& aStrands,
49 const QueryParams& aParams);
8822ebee
AR
50private:
51 Action::Pointer aggrAction; //< action to aggregate
52
1b76e6c1 53 Comm::ConnectionPointer conn; ///< HTTP client socket descriptor
8822ebee 54
8822ebee
AR
55 AsyncCall::Pointer writer; ///< comm_write callback
56 AsyncCall::Pointer closer; ///< comm_close handler
8822ebee
AR
57};
58
59} // namespace Mgr
60
61#endif /* SQUID_MGR_INQUIRER_H */
f53969cc 62