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