]>
Commit | Line | Data |
---|---|---|
8822ebee | 1 | /* |
bf95c10a | 2 | * Copyright (C) 1996-2022 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_RESPONSE_H |
12 | #define SQUID_MGR_RESPONSE_H | |
13 | ||
51ea0904 CT |
14 | #include "ipc/forward.h" |
15 | #include "ipc/Response.h" | |
8822ebee AR |
16 | #include "mgr/Action.h" |
17 | ||
8822ebee AR |
18 | namespace Mgr |
19 | { | |
20 | ||
21 | /// A response to Mgr::Request. | |
22 | /// May carry strand action data to be aggregated with data from other strands. | |
51ea0904 | 23 | class Response: public Ipc::Response |
8822ebee AR |
24 | { |
25 | public: | |
4c218615 EB |
26 | /// sender's constructor |
27 | Response(Ipc::RequestId, Action::Pointer anAction = nullptr); | |
8822ebee AR |
28 | |
29 | explicit Response(const Ipc::TypedMsgHdr& msg); ///< from recvmsg() | |
51ea0904 CT |
30 | |
31 | /* Ipc::Response API */ | |
32 | virtual void pack(Ipc::TypedMsgHdr& msg) const; | |
33 | virtual Ipc::Response::Pointer clone() const; | |
34 | ||
8822ebee AR |
35 | bool hasAction() const; ///< whether response contain action object |
36 | const Action& getAction() const; ///< returns action object | |
37 | ||
38 | public: | |
8822ebee AR |
39 | Action::Pointer action; ///< action relating to response |
40 | }; | |
41 | ||
8822ebee AR |
42 | } // namespace Mgr |
43 | ||
44 | #endif /* SQUID_MGR_RESPONSE_H */ | |
f53969cc | 45 |