]> git.ipfire.org Git - thirdparty/squid.git/blob - src/mgr/ActionProfile.h
Merged from trunk
[thirdparty/squid.git] / src / mgr / ActionProfile.h
1 /*
2 * DEBUG: section 16 Cache Manager API
3 *
4 */
5
6 #ifndef SQUID_MGR_ACTION_PROFILE_H
7 #define SQUID_MGR_ACTION_PROFILE_H
8
9 #include "mgr/ActionCreator.h"
10 #include "mgr/forward.h"
11
12 namespace Mgr
13 {
14
15 /// hard-coded Cache Manager action configuration, including Action creator
16 class ActionProfile: public RefCountable
17 {
18 public:
19 typedef RefCount<ActionProfile> Pointer;
20
21 public:
22 ActionProfile(const char* aName, const char* aDesc, bool aPwReq,
23 bool anAtomic, const ActionCreatorPointer &aCreator):
24 name(aName), desc(aDesc), isPwReq(aPwReq), isAtomic(anAtomic),
25 creator(aCreator) {
26 }
27
28 public:
29 const char *name; ///< action label to uniquely identify this action
30 const char *desc; ///< action description to build an action menu list
31 bool isPwReq; ///< whether password is required to perform the action
32 bool isAtomic; ///< whether action dumps everything in one dump() call
33 ActionCreatorPointer creator; ///< creates Action objects with this profile
34 };
35
36 } // namespace Mgr
37
38 inline std::ostream &
39 operator <<(std::ostream &os, const Mgr::ActionProfile &profile)
40 {
41 return os << profile.name;
42 }
43
44 #endif /* SQUID_MGR_ACTION_PROFILE_H */