]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/mgr/Response.h
2 * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
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.
9 /* DEBUG: section 16 Cache Manager API */
11 #ifndef SQUID_MGR_RESPONSE_H
12 #define SQUID_MGR_RESPONSE_H
14 #include "ipc/forward.h"
15 #include "ipc/Response.h"
16 #include "mgr/Action.h"
21 /// A response to Mgr::Request.
22 /// May carry strand action data to be aggregated with data from other strands.
23 class Response
: public Ipc::Response
26 /// sender's constructor
27 Response(Ipc::RequestId
, Action::Pointer anAction
= nullptr);
29 explicit Response(const Ipc::TypedMsgHdr
& msg
); ///< from recvmsg()
31 /* Ipc::Response API */
32 void pack(Ipc::TypedMsgHdr
& msg
) const override
;
33 Ipc::Response::Pointer
clone() const override
;
35 bool hasAction() const; ///< whether response contain action object
36 const Action
& getAction() const; ///< returns action object
39 Action::Pointer action
; ///< action relating to response
44 #endif /* SQUID_MGR_RESPONSE_H */