]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/mgr/QueryParams.h
2 * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
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.
9 /* DEBUG: section 16 Cache Manager API */
11 #ifndef SQUID_MGR_QUERY_PARAMS_H
12 #define SQUID_MGR_QUERY_PARAMS_H
14 #include "ipc/forward.h"
15 #include "mgr/QueryParam.h"
16 #include "parser/forward.h"
17 #include "SquidString.h"
28 typedef std::pair
<String
, QueryParam::Pointer
> Param
;
29 typedef std::vector
<Param
> Params
;
32 /// returns query parameter by name
33 QueryParam::Pointer
get(const String
& name
) const;
34 void pack(Ipc::TypedMsgHdr
& msg
) const; ///< store params into msg
35 void unpack(const Ipc::TypedMsgHdr
& msg
); ///< load params from msg
36 /// parses the query string parameters
37 static void Parse(Parser::Tokenizer
&, QueryParams
&);
40 /// find query parameter by name
41 Params::const_iterator
find(const String
& name
) const;
42 /// creates a parameter of the specified type
43 static QueryParam::Pointer
CreateParam(QueryParam::Type aType
);
51 #endif /* SQUID_MGR_QUERY_PARAMS_H */