]>
Commit | Line | Data |
---|---|---|
8822ebee | 1 | /* |
5b74111a | 2 | * Copyright (C) 1996-2018 The Squid Software Foundation and contributors |
8822ebee | 3 | * |
bbc27441 AJ |
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. | |
8822ebee AR |
7 | */ |
8 | ||
bbc27441 AJ |
9 | /* DEBUG: section 16 Cache Manager API */ |
10 | ||
8822ebee AR |
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 | ||
8822ebee AR |
18 | namespace Mgr |
19 | { | |
20 | ||
b073fc4b AJ |
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 | ||
8822ebee AR |
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 | ||
8822ebee AR |
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 */ | |
f53969cc | 102 |