Response.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2025 The Squid Software Foundation and contributors
3  *
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.
7  */
8 
9 /* DEBUG: section 16 Cache Manager API */
10 
11 #ifndef SQUID_SRC_MGR_RESPONSE_H
12 #define SQUID_SRC_MGR_RESPONSE_H
13 
14 #include "ipc/forward.h"
15 #include "ipc/Response.h"
16 #include "mgr/Action.h"
17 
18 namespace Mgr
19 {
20 
23 class Response: public Ipc::Response
24 {
25 public:
27  Response(Ipc::RequestId, Action::Pointer anAction = nullptr);
28 
29  explicit Response(const Ipc::TypedMsgHdr& msg);
30 
31  /* Ipc::Response API */
32  void pack(Ipc::TypedMsgHdr& msg) const override;
33  Ipc::Response::Pointer clone() const override;
34 
35  bool hasAction() const;
36  const Action& getAction() const;
37 
38 public:
40 };
41 
42 } // namespace Mgr
43 
44 #endif /* SQUID_SRC_MGR_RESPONSE_H */
45 
Action::Pointer action
action relating to response
Definition: Response.h:39
A response to Ipc::Request.
Definition: Response.h:23
void pack(Ipc::TypedMsgHdr &msg) const override
prepare for sendmsg()
Definition: Response.cc:43
const Action & getAction() const
returns action object
Definition: Response.cc:67
bool hasAction() const
whether response contain action object
Definition: Response.cc:61
Ipc::Response::Pointer clone() const override
returns a copy of this
Definition: Response.cc:55
struct msghdr with a known type, fixed-size I/O and control buffers
Definition: TypedMsgHdr.h:34
Response()=default
recipient's constructor
Cache Manager API.
Definition: Action.h:20

 

Introduction

Documentation

Support

Miscellaneous