CacheManager.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2017 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 "mgr/Action.h"
14 #include "mgr/ActionProfile.h"
15 #include "mgr/Command.h"
16 #include "mgr/forward.h"
17 
18 #include <vector>
19 
20 class HttpRequest;
21 
30 {
31 public:
32  typedef std::vector<Mgr::ActionProfilePointer> Menu;
33 
34  void registerProfile(char const * action, char const * desc,
35  OBJH * handler,
36  int pw_req_flag, int atomic);
37  void registerProfile(char const * action, char const * desc,
39  int pw_req_flag, int atomic);
40  Mgr::ActionProfilePointer findAction(char const * action) const;
41  Mgr::Action::Pointer createNamedAction(const char *actionName);
43  const Menu& menu() const { return menu_; }
44 
45  void Start(const Comm::ConnectionPointer &client, HttpRequest * request, StoreEntry * entry);
46 
47  static CacheManager* GetInstance();
48  const char *ActionProtection(const Mgr::ActionProfilePointer &profile);
49 
50 protected:
52 
53  Mgr::CommandPointer ParseUrl(const char *url);
54  void ParseHeaders(const HttpRequest * request, Mgr::ActionParams &params);
55  int CheckPassword(const Mgr::Command &cmd);
56  char *PasswdGet(Mgr::ActionPasswordList *, const char *);
57 
58  void registerProfile(const Mgr::ActionProfilePointer &profile);
59 
61 
62 private:
64 };
65 
66 #endif /* SQUID_CACHEMANAGER_H */
67 
CacheManager()
use Instance() instead
Definition: CacheManager.h:51
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
void Start(const Comm::ConnectionPointer &client, HttpRequest *request, StoreEntry *entry)
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 *)
Mgr::Action::Pointer createRequestedAction(const Mgr::ActionParams &)
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
const Menu & menu() const
Definition: CacheManager.h:43
Mgr::ActionProfilePointer findAction(char const *action) const
void registerProfile(char const *action, char const *desc, OBJH *handler, int pw_req_flag, int atomic)
static CacheManager * instance
Definition: CacheManager.h:63
std::vector< Mgr::ActionProfilePointer > Menu
Definition: CacheManager.h:32
ActionPointer( ClassActionCreationHandler)(const CommandPointer &cmd)
Definition: forward.h:36

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors