CacheManager.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 #ifndef SQUID_SRC_CACHEMANAGER_H
10 #define SQUID_SRC_CACHEMANAGER_H
11 
12 #include "anyp/forward.h"
13 #include "comm/forward.h"
14 #include "log/forward.h"
15 #include "mgr/Action.h"
16 #include "mgr/ActionProfile.h"
17 #include "mgr/Command.h"
18 #include "mgr/forward.h"
19 
20 #include <vector>
21 
22 class HttpRequest;
23 class HttpReply;
24 
33 {
34 public:
35  typedef std::vector<Mgr::ActionProfilePointer> Menu;
36 
38  static const SBuf &WellKnownUrlPathPrefix();
39 
42 
43  Mgr::ActionProfilePointer findAction(char const * action) const;
44  Mgr::Action::Pointer createNamedAction(const char *actionName);
46  const Menu& menu() const { return menu_; }
47 
48  void start(const Comm::ConnectionPointer &client, HttpRequest *request, StoreEntry *entry, const AccessLogEntryPointer &ale);
49 
50  static CacheManager* GetInstance();
51  const char *ActionProtection(const Mgr::ActionProfilePointer &profile);
52 
56  static void PutCommonResponseHeaders(HttpReply &, const char *httpOrigin);
57 
58 protected:
59  CacheManager() {}
60 
62  void ParseHeaders(const HttpRequest * request, Mgr::ActionParams &params);
63  int CheckPassword(const Mgr::Command &cmd);
64  char *PasswdGet(Mgr::ActionPasswordList *, const char *);
65 
67 };
68 
69 #endif /* SQUID_SRC_CACHEMANAGER_H */
70 
static void PutCommonResponseHeaders(HttpReply &, const char *httpOrigin)
Definition: Uri.h:31
Mgr::Action::Pointer createNamedAction(const char *actionName)
combined hard-coded action profile with user-supplied action parameters
Definition: Command.h:21
Definition: SBuf.h:93
static CacheManager * GetInstance()
int CheckPassword(const Mgr::Command &cmd)
const char * ActionProtection(const Mgr::ActionProfilePointer &profile)
static const SBuf & WellKnownUrlPathPrefix()
initial URL path characters that identify cache manager requests
char * PasswdGet(Mgr::ActionPasswordList *, const char *)
void start(const Comm::ConnectionPointer &client, HttpRequest *request, StoreEntry *entry, const AccessLogEntryPointer &ale)
const Menu & menu() const
Definition: CacheManager.h:46
Mgr::Action::Pointer createRequestedAction(const Mgr::ActionParams &)
void ParseHeaders(const HttpRequest *request, Mgr::ActionParams &params)
Mgr::CommandPointer ParseUrl(const AnyP::Uri &)
Cache Manager Action parameters extracted from the user request.
Definition: ActionParams.h:23
void registerProfile(const Mgr::ActionProfilePointer &)
remembers the given profile while ignoring attempts to register a same-name duplicate
list of cachemgr password authorization definitions. Currently a POD.
Mgr::ActionProfilePointer findAction(char const *action) const
std::vector< Mgr::ActionProfilePointer > Menu
Definition: CacheManager.h:35

 

Introduction

Documentation

Support

Miscellaneous