CacheManager.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2021 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_CACHEMANAGER_H
10 #define SQUID_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 
32 {
33 public:
34  typedef std::vector<Mgr::ActionProfilePointer> Menu;
35 
36  void registerProfile(char const * action, char const * desc,
37  OBJH * handler,
38  int pw_req_flag, int atomic);
39  void registerProfile(char const * action, char const * desc,
41  int pw_req_flag, int atomic);
42  Mgr::ActionProfilePointer findAction(char const * action) const;
43  Mgr::Action::Pointer createNamedAction(const char *actionName);
45  const Menu& menu() const { return menu_; }
46 
47  void start(const Comm::ConnectionPointer &client, HttpRequest *request, StoreEntry *entry, const AccessLogEntryPointer &ale);
48 
49  static CacheManager* GetInstance();
50  const char *ActionProtection(const Mgr::ActionProfilePointer &profile);
51 
52 protected:
54 
56  void ParseHeaders(const HttpRequest * request, Mgr::ActionParams &params);
57  int CheckPassword(const Mgr::Command &cmd);
58  char *PasswdGet(Mgr::ActionPasswordList *, const char *);
59 
60  void registerProfile(const Mgr::ActionProfilePointer &profile);
61 
63 };
64 
65 #endif /* SQUID_CACHEMANAGER_H */
66 
static bool action(int fd, size_t metasize, const char *fn, const char *url, const SquidMetaList &meta)
Definition: purge.cc:311
ActionPointer() ClassActionCreationHandler(const CommandPointer &cmd)
Definition: forward.h:36
Definition: Uri.h:31
CacheManager()
use Instance() instead
Definition: CacheManager.h:53
combined hard-coded action profile with user-supplied action parameters
Definition: Command.h:22
static void handler(int signo)
Definition: purge.cc:854
static CacheManager * GetInstance()
int CheckPassword(const Mgr::Command &cmd)
const char * ActionProtection(const Mgr::ActionProfilePointer &profile)
void OBJH(StoreEntry *)
Definition: forward.h:44
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:45
void registerProfile(char const *action, char const *desc, Mgr::ClassActionCreationHandler *handler, int pw_req_flag, int atomic)
Mgr::Action::Pointer createRequestedAction(const Mgr::ActionParams &)
Mgr::Action::Pointer createNamedAction(const char *actionName)
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:24
list of cachemgr password authorization definitions. Currently a POD.
void registerProfile(char const *action, char const *desc, OBJH *handler, int pw_req_flag, int atomic)
Mgr::ActionProfilePointer findAction(char const *action) const
std::vector< Mgr::ActionProfilePointer > Menu
Definition: CacheManager.h:34
struct _request * request(char *urlin)
Definition: tcp-banger2.c:291

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors