]> git.ipfire.org Git - thirdparty/squid.git/blob - src/mgr/ActionParams.cc
Merged from parent (trunk r11379, v3.2.0.6+).
[thirdparty/squid.git] / src / mgr / ActionParams.cc
1 /*
2 * $Id$
3 *
4 * DEBUG: section 16 Cache Manager API
5 *
6 */
7
8 #include "config.h"
9 #include "base/TextException.h"
10 #include "ipc/TypedMsgHdr.h"
11 #include "mgr/ActionParams.h"
12
13 Mgr::ActionParams::ActionParams(): httpMethod(METHOD_NONE)
14 {
15 }
16
17 Mgr::ActionParams::ActionParams(const Ipc::TypedMsgHdr &msg)
18 {
19 msg.getString(httpUri);
20
21 const int m = msg.getInt();
22 Must(METHOD_NONE <= m && m < METHOD_ENUM_END);
23 httpMethod = static_cast<_method_t>(m);
24
25 msg.getPod(httpFlags);
26
27 msg.getString(actionName);
28 msg.getString(userName);
29 msg.getString(password);
30 queryParams.unpack(msg);
31 }
32
33 void
34 Mgr::ActionParams::pack(Ipc::TypedMsgHdr &msg) const
35 {
36 msg.putString(httpUri);
37 msg.putInt(httpMethod);
38 msg.putPod(httpFlags);
39
40 msg.putString(actionName);
41 msg.putString(userName);
42 msg.putString(password);
43 queryParams.pack(msg);
44 }