ActionParams.cc
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2023 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
38void
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
String SBufToString(const SBuf &s)
Definition: StringConvert.h:26
struct msghdr with a known type, fixed-size I/O and control buffers
Definition: TypedMsgHdr.h:35
void putString(const String &s)
store variable-length string
Definition: TypedMsgHdr.cc:143
void getPod(Pod &pod) const
load POD
Definition: TypedMsgHdr.h:118
void getString(String &s) const
load variable-length string
Definition: TypedMsgHdr.cc:125
void putPod(const Pod &pod)
store POD
Definition: TypedMsgHdr.h:126
void pack(Ipc::TypedMsgHdr &msg) const
store into msg
Definition: ActionParams.cc:39
char const * termedBuf() const
Definition: SquidString.h:92
Definition: forward.h:18
@ METHOD_NONE
Definition: MethodType.h:22

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors