]> git.ipfire.org Git - thirdparty/squid.git/blob - src/mgr/Response.h
merge from trunk r12441
[thirdparty/squid.git] / src / mgr / Response.h
1 /*
2 * DEBUG: section 16 Cache Manager API
3 *
4 */
5
6 #ifndef SQUID_MGR_RESPONSE_H
7 #define SQUID_MGR_RESPONSE_H
8
9 #include "ipc/forward.h"
10 #include "ipc/Response.h"
11 #include "mgr/Action.h"
12
13 namespace Mgr
14 {
15
16 /// A response to Mgr::Request.
17 /// May carry strand action data to be aggregated with data from other strands.
18 class Response: public Ipc::Response
19 {
20 public:
21 Response(unsigned int aRequestId, Action::Pointer anAction = NULL);
22
23 explicit Response(const Ipc::TypedMsgHdr& msg); ///< from recvmsg()
24
25 /* Ipc::Response API */
26 virtual void pack(Ipc::TypedMsgHdr& msg) const;
27 virtual Ipc::Response::Pointer clone() const;
28
29 bool hasAction() const; ///< whether response contain action object
30 const Action& getAction() const; ///< returns action object
31
32 private:
33 Response(const Response& response);
34
35 public:
36 Action::Pointer action; ///< action relating to response
37 };
38
39 } // namespace Mgr
40
41 #endif /* SQUID_MGR_RESPONSE_H */