]>
Commit | Line | Data |
---|---|---|
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 |
15 | namespace 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. | |
22 | class IndexAction: public Action | |
23 | { | |
24 | public: | |
25 | static Pointer Create(const CommandPointer &cmd); | |
26 | /* Action API */ | |
27 | virtual void dump(StoreEntry *entry); | |
28 | ||
29 | protected: | |
30 | IndexAction(const CommandPointer &cmd); | |
31 | }; | |
32 | ||
8822ebee AR |
33 | /// returns available Cache Manager actions and their access requirements |
34 | class MenuAction: public Action | |
35 | { | |
36 | public: | |
37 | static Pointer Create(const CommandPointer &cmd); | |
38 | /* Action API */ | |
39 | virtual void dump(StoreEntry *entry); | |
40 | ||
41 | protected: | |
42 | MenuAction(const CommandPointer &cmd); | |
43 | }; | |
44 | ||
8822ebee AR |
45 | /// shuts Squid down |
46 | class ShutdownAction: public Action | |
47 | { | |
48 | public: | |
49 | static Pointer Create(const CommandPointer &cmd); | |
50 | /* Action API */ | |
51 | virtual void dump(StoreEntry *entry); | |
52 | ||
53 | protected: | |
54 | ShutdownAction(const CommandPointer &cmd); | |
55 | }; | |
56 | ||
57 | /// reconfigures Squid | |
58 | class ReconfigureAction: public Action | |
59 | { | |
60 | public: | |
61 | static Pointer Create(const CommandPointer &cmd); | |
62 | /* Action API */ | |
63 | virtual void dump(StoreEntry *entry); | |
64 | ||
65 | protected: | |
66 | ReconfigureAction(const CommandPointer &cmd); | |
67 | }; | |
68 | ||
69 | /// starts log rotation | |
70 | class RotateAction: public Action | |
71 | { | |
72 | public: | |
73 | static Pointer Create(const CommandPointer &cmd); | |
74 | /* Action API */ | |
75 | virtual void dump(StoreEntry *entry); | |
76 | ||
77 | protected: | |
78 | RotateAction(const CommandPointer &cmd); | |
79 | }; | |
80 | ||
81 | /// changes offline mode | |
82 | class OfflineToggleAction: public Action | |
83 | { | |
84 | public: | |
85 | static Pointer Create(const CommandPointer &cmd); | |
86 | /* Action API */ | |
87 | virtual void dump(StoreEntry *entry); | |
88 | ||
89 | protected: | |
90 | OfflineToggleAction(const CommandPointer &cmd); | |
91 | }; | |
92 | ||
93 | /// Registeres profiles for the actions above; \todo move elsewhere? | |
94 | void RegisterBasics(); | |
95 | ||
96 | } // namespace Mgr | |
97 | ||
98 | #endif /* SQUID_MGR_BASIC_ACTIONS_H */ |