]> git.ipfire.org Git - thirdparty/squid.git/blob - src/mgr/BasicActions.h
Cache Manager migration support
[thirdparty/squid.git] / src / mgr / BasicActions.h
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
15
16 namespace Mgr
17 {
18
19 /// A dummy action placeholder for the no-action requests
20 /// a templated Cache Manager index ('home') page.
21 /// Display output is produced directly by the receiving worker
22 /// without invoking the co-ordinator or action Job.
23 class IndexAction: public Action
24 {
25 public:
26 static Pointer Create(const CommandPointer &cmd);
27 /* Action API */
28 virtual void dump(StoreEntry *entry);
29
30 protected:
31 IndexAction(const CommandPointer &cmd);
32 };
33
34
35 /// returns available Cache Manager actions and their access requirements
36 class MenuAction: public Action
37 {
38 public:
39 static Pointer Create(const CommandPointer &cmd);
40 /* Action API */
41 virtual void dump(StoreEntry *entry);
42
43 protected:
44 MenuAction(const CommandPointer &cmd);
45 };
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 */