]> git.ipfire.org Git - thirdparty/squid.git/blob - src/mgr/StringParam.cc
SourceFormat Enforcement
[thirdparty/squid.git] / src / mgr / StringParam.cc
1 /*
2 * Copyright (C) 1996-2015 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 #include "squid.h"
12 #include "ipc/TypedMsgHdr.h"
13 #include "mgr/StringParam.h"
14
15 Mgr::StringParam::StringParam():
16 QueryParam(QueryParam::ptString), str()
17 {
18 }
19
20 Mgr::StringParam::StringParam(const String& aString):
21 QueryParam(QueryParam::ptString), str(aString)
22 {
23 }
24
25 void
26 Mgr::StringParam::pack(Ipc::TypedMsgHdr& msg) const
27 {
28 msg.putPod(type);
29 msg.putString(str);
30 }
31
32 void
33 Mgr::StringParam::unpackValue(const Ipc::TypedMsgHdr& msg)
34 {
35 msg.getString(str);
36 }
37
38 const String&
39 Mgr::StringParam::value() const
40 {
41 return str;
42 }
43