]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/mgr/Request.cc
4 * DEBUG: section 16 Cache Manager API
9 #include "base/TextException.h"
10 #include "ipc/Messages.h"
11 #include "ipc/TypedMsgHdr.h"
12 #include "mgr/ActionParams.h"
13 #include "mgr/Request.h"
16 Mgr::Request::Request(int aRequestorId
, unsigned int aRequestId
, int aFd
,
17 const ActionParams
&aParams
):
18 Ipc::Request(aRequestorId
, aRequestId
),
19 fd(aFd
), params(aParams
)
21 Must(requestorId
> 0);
24 Mgr::Request::Request(const Request
& request
):
25 Ipc::Request(request
.requestorId
, request
.requestId
),
26 fd(request
.fd
), params(request
.params
)
30 Mgr::Request::Request(const Ipc::TypedMsgHdr
& msg
):
33 msg
.checkType(Ipc::mtCacheMgrRequest
);
34 msg
.getPod(requestorId
);
35 msg
.getPod(requestId
);
36 params
= ActionParams(msg
);
42 Mgr::Request::pack(Ipc::TypedMsgHdr
& msg
) const
44 msg
.setType(Ipc::mtCacheMgrRequest
);
45 msg
.putPod(requestorId
);
46 msg
.putPod(requestId
);
53 Mgr::Request::clone() const
55 return new Request(*this);