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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors