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