CacheManager.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2022 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
22class HttpRequest;
23
32{
33public:
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);
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
52protected:
54
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
Definition: Uri.h:31
const Menu & menu() const
Definition: CacheManager.h:45
std::vector< Mgr::ActionProfilePointer > Menu
Definition: CacheManager.h:34
char * PasswdGet(Mgr::ActionPasswordList *, const char *)
const char * ActionProtection(const Mgr::ActionProfilePointer &profile)
Mgr::ActionProfilePointer findAction(char const *action) const
void ParseHeaders(const HttpRequest *request, Mgr::ActionParams &params)
Mgr::Action::Pointer createRequestedAction(const Mgr::ActionParams &)
static CacheManager * GetInstance()
int CheckPassword(const Mgr::Command &cmd)
void registerProfile(char const *action, char const *desc, Mgr::ClassActionCreationHandler *handler, int pw_req_flag, int atomic)
Mgr::Action::Pointer createNamedAction(const char *actionName)
void registerProfile(char const *action, char const *desc, OBJH *handler, int pw_req_flag, int atomic)
CacheManager()
use Instance() instead
Definition: CacheManager.h:53
Mgr::CommandPointer ParseUrl(const AnyP::Uri &)
void start(const Comm::ConnectionPointer &client, HttpRequest *request, StoreEntry *entry, const AccessLogEntryPointer &ale)
Cache Manager Action parameters extracted from the user request.
Definition: ActionParams.h:24
list of cachemgr password authorization definitions. Currently a POD.
combined hard-coded action profile with user-supplied action parameters
Definition: Command.h:22
void OBJH(StoreEntry *)
Definition: forward.h:44
ActionPointer() ClassActionCreationHandler(const CommandPointer &cmd)
Definition: forward.h:36
static void handler(int signo)
Definition: purge.cc:854
static bool action(int fd, size_t metasize, const char *fn, const char *url, const SquidMetaList &meta)
Definition: purge.cc:311
struct _request * request(char *urlin)
Definition: tcp-banger2.c:291

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors