]> git.ipfire.org Git - thirdparty/squid.git/blame - src/mgr/ActionProfile.h
Source Format Enforcement (#532)
[thirdparty/squid.git] / src / mgr / ActionProfile.h
CommitLineData
8822ebee 1/*
77b1029d 2 * Copyright (C) 1996-2020 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_ACTION_PROFILE_H
12#define SQUID_MGR_ACTION_PROFILE_H
13
14#include "mgr/ActionCreator.h"
15#include "mgr/forward.h"
16
17namespace Mgr
18{
19
20/// hard-coded Cache Manager action configuration, including Action creator
21class ActionProfile: public RefCountable
22{
23public:
24 typedef RefCount<ActionProfile> Pointer;
25
26public:
27 ActionProfile(const char* aName, const char* aDesc, bool aPwReq,
d9fc6862 28 bool anAtomic, const ActionCreatorPointer &aCreator):
f53969cc
SM
29 name(aName), desc(aDesc), isPwReq(aPwReq), isAtomic(anAtomic),
30 creator(aCreator) {
8822ebee
AR
31 }
32
33public:
34 const char *name; ///< action label to uniquely identify this action
35 const char *desc; ///< action description to build an action menu list
36 bool isPwReq; ///< whether password is required to perform the action
37 bool isAtomic; ///< whether action dumps everything in one dump() call
38 ActionCreatorPointer creator; ///< creates Action objects with this profile
39};
40
41} // namespace Mgr
42
43inline std::ostream &
44operator <<(std::ostream &os, const Mgr::ActionProfile &profile)
45{
46 return os << profile.name;
47}
48
49#endif /* SQUID_MGR_ACTION_PROFILE_H */
f53969cc 50