QueryParams.h
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#ifndef SQUID_MGR_QUERY_PARAMS_H
12#define SQUID_MGR_QUERY_PARAMS_H
13
14#include "ipc/forward.h"
15#include "mgr/QueryParam.h"
16#include "parser/forward.h"
17#include "SquidString.h"
18
19#include <utility>
20#include <vector>
21
22namespace Mgr
23{
24
26{
27public:
28 typedef std::pair<String, QueryParam::Pointer> Param;
29 typedef std::vector<Param> Params;
30
31public:
33 QueryParam::Pointer get(const String& name) const;
34 void pack(Ipc::TypedMsgHdr& msg) const;
35 void unpack(const Ipc::TypedMsgHdr& msg);
37 static void Parse(Parser::Tokenizer &, QueryParams &);
38
39private:
41 Params::const_iterator find(const String& name) const;
44
45private:
47};
48
49} // namespace Mgr
50
51#endif /* SQUID_MGR_QUERY_PARAMS_H */
52
struct msghdr with a known type, fixed-size I/O and control buffers
Definition: TypedMsgHdr.h:35
void pack(Ipc::TypedMsgHdr &msg) const
store params into msg
Definition: QueryParams.cc:31
QueryParam::Pointer get(const String &name) const
returns query parameter by name
Definition: QueryParams.cc:23
static QueryParam::Pointer CreateParam(QueryParam::Type aType)
creates a parameter of the specified type
Definition: QueryParams.cc:145
std::pair< String, QueryParam::Pointer > Param
Definition: QueryParams.h:28
Params::const_iterator find(const String &name) const
find query parameter by name
Definition: QueryParams.cc:61
std::vector< Param > Params
Definition: QueryParams.h:29
static void Parse(Parser::Tokenizer &, QueryParams &)
parses the query string parameters
Definition: QueryParams.cc:112
void unpack(const Ipc::TypedMsgHdr &msg)
Definition: QueryParams.cc:43
Cache Manager API.
Definition: Action.h:20

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors