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