ActionParams.cc
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2017 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 "base/TextException.h"
13 #include "ipc/TypedMsgHdr.h"
14 #include "mgr/ActionParams.h"
15 #include "sbuf/StringConvert.h"
16 
18 {
19 }
20 
22 {
23  msg.getString(httpUri);
24 
25  String method;
26  msg.getString(method);
27  httpMethod.HttpRequestMethodXXX(method.termedBuf());
28 
29  msg.getPod(httpFlags);
30  msg.getString(httpOrigin);
31 
32  msg.getString(actionName);
33  msg.getString(userName);
34  msg.getString(password);
35  queryParams.unpack(msg);
36 }
37 
38 void
40 {
41  msg.putString(httpUri);
42  auto foo = SBufToString(httpMethod.image());
43  msg.putString(foo);
44  msg.putPod(httpFlags);
45  msg.putString(httpOrigin);
46 
47  msg.putString(actionName);
48  msg.putString(userName);
49  msg.putString(password);
50  queryParams.pack(msg);
51 }
52 
void getPod(Pod &pod) const
load POD
Definition: TypedMsgHdr.h:50
void putPod(const Pod &pod)
store POD
Definition: TypedMsgHdr.h:52
String SBufToString(const SBuf &s)
Definition: StringConvert.h:26
char const * termedBuf() const
Definition: SquidString.h:90
void putString(const String &s)
store variable-length string
Definition: TypedMsgHdr.cc:133
struct msghdr with a known type, fixed-size I/O and control buffers
Definition: TypedMsgHdr.h:31
size_t HttpReply *STUB StoreEntry const KeyScope scope const HttpRequestMethod & method
Definition: stub_store.cc:126
void getString(String &s) const
load variable-length string
Definition: TypedMsgHdr.cc:115
void pack(Ipc::TypedMsgHdr &msg) const
store into msg
Definition: ActionParams.cc:39

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors