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_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;
23class HttpReply;
24
33{
34public:
35 typedef std::vector<Mgr::ActionProfilePointer> Menu;
36
38 static const SBuf &WellKnownUrlPathPrefix();
39
40 void registerProfile(char const * action, char const * desc,
41 OBJH * handler,
42 int pw_req_flag, int atomic);
43 void registerProfile(char const * action, char const * desc,
45 int pw_req_flag, int atomic);
47 Mgr::Action::Pointer createNamedAction(const char *actionName);
49 const Menu& menu() const { return menu_; }
50
51 void start(const Comm::ConnectionPointer &client, HttpRequest *request, StoreEntry *entry, const AccessLogEntryPointer &ale);
52
53 static CacheManager* GetInstance();
54 const char *ActionProtection(const Mgr::ActionProfilePointer &profile);
55
59 static void PutCommonResponseHeaders(HttpReply &, const char *httpOrigin);
60
61protected:
63
65 void ParseHeaders(const HttpRequest * request, Mgr::ActionParams &params);
66 int CheckPassword(const Mgr::Command &cmd);
67 char *PasswdGet(Mgr::ActionPasswordList *, const char *);
68
69 void registerProfile(const Mgr::ActionProfilePointer &profile);
70
72};
73
74#endif /* SQUID_CACHEMANAGER_H */
75
Definition: Uri.h:31
const Menu & menu() const
Definition: CacheManager.h:49
std::vector< Mgr::ActionProfilePointer > Menu
Definition: CacheManager.h:35
char * PasswdGet(Mgr::ActionPasswordList *, const char *)
const char * ActionProtection(const Mgr::ActionProfilePointer &profile)
static void PutCommonResponseHeaders(HttpReply &, const char *httpOrigin)
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)
static const SBuf & WellKnownUrlPathPrefix()
initial URL path characters that identify cache manager requests
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:62
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
Definition: SBuf.h:94
void OBJH(StoreEntry *)
Definition: forward.h:44
ActionPointer() ClassActionCreationHandler(const CommandPointer &cmd)
Definition: forward.h:36
static void handler(int signo)
Definition: purge.cc:858
static bool action(int fd, size_t metasize, const char *fn, const char *url, const SquidMetaList &meta)
Definition: purge.cc:315

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors