]> git.ipfire.org Git - thirdparty/squid.git/blame - src/mgr/BasicActions.h
SourceFormat Enforcement
[thirdparty/squid.git] / src / mgr / BasicActions.h
CommitLineData
8822ebee
AR
1/*
2 * $Id$
3 *
4 * DEBUG: section 16 Cache Manager API
5 *
6 */
7
8#ifndef SQUID_MGR_BASIC_ACTIONS_H
9#define SQUID_MGR_BASIC_ACTIONS_H
10
11#include "mgr/Action.h"
12
13/* a collection of simple, mostly stateless actions */
14
8822ebee
AR
15namespace Mgr
16{
17
b073fc4b
AJ
18/// A dummy action placeholder for the no-action requests
19/// a templated Cache Manager index ('home') page.
20/// Display output is produced directly by the receiving worker
21/// without invoking the co-ordinator or action Job.
22class IndexAction: public Action
23{
24public:
25 static Pointer Create(const CommandPointer &cmd);
26 /* Action API */
27 virtual void dump(StoreEntry *entry);
28
29protected:
30 IndexAction(const CommandPointer &cmd);
31};
32
8822ebee
AR
33/// returns available Cache Manager actions and their access requirements
34class MenuAction: public Action
35{
36public:
37 static Pointer Create(const CommandPointer &cmd);
38 /* Action API */
39 virtual void dump(StoreEntry *entry);
40
41protected:
42 MenuAction(const CommandPointer &cmd);
43};
44
8822ebee
AR
45/// shuts Squid down
46class ShutdownAction: public Action
47{
48public:
49 static Pointer Create(const CommandPointer &cmd);
50 /* Action API */
51 virtual void dump(StoreEntry *entry);
52
53protected:
54 ShutdownAction(const CommandPointer &cmd);
55};
56
57/// reconfigures Squid
58class ReconfigureAction: public Action
59{
60public:
61 static Pointer Create(const CommandPointer &cmd);
62 /* Action API */
63 virtual void dump(StoreEntry *entry);
64
65protected:
66 ReconfigureAction(const CommandPointer &cmd);
67};
68
69/// starts log rotation
70class RotateAction: public Action
71{
72public:
73 static Pointer Create(const CommandPointer &cmd);
74 /* Action API */
75 virtual void dump(StoreEntry *entry);
76
77protected:
78 RotateAction(const CommandPointer &cmd);
79};
80
81/// changes offline mode
82class OfflineToggleAction: public Action
83{
84public:
85 static Pointer Create(const CommandPointer &cmd);
86 /* Action API */
87 virtual void dump(StoreEntry *entry);
88
89protected:
90 OfflineToggleAction(const CommandPointer &cmd);
91};
92
93/// Registeres profiles for the actions above; \todo move elsewhere?
94void RegisterBasics();
95
96} // namespace Mgr
97
98#endif /* SQUID_MGR_BASIC_ACTIONS_H */