]> git.ipfire.org Git - thirdparty/squid.git/blame - src/mgr/ActionProfile.h
Bug 5428: Warn if pkg-config is not found (#1902)
[thirdparty/squid.git] / src / mgr / ActionProfile.h
CommitLineData
8822ebee 1/*
b8ae064d 2 * Copyright (C) 1996-2023 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
ff9d9458
FC
11#ifndef SQUID_SRC_MGR_ACTIONPROFILE_H
12#define SQUID_SRC_MGR_ACTIONPROFILE_H
8822ebee
AR
13
14#include "mgr/ActionCreator.h"
99572608 15#include "mgr/ActionFeatures.h"
8822ebee
AR
16#include "mgr/forward.h"
17
18namespace Mgr
19{
20
21/// hard-coded Cache Manager action configuration, including Action creator
22class ActionProfile: public RefCountable
23{
24public:
25 typedef RefCount<ActionProfile> Pointer;
26
27public:
99572608
FC
28 ActionProfile(const char* aName, const char* aDesc,
29 ActionCreatorPointer aCreator,
30 const Protected aProtected,
31 const Atomic anAtomic,
32 const Format aFormat):
33 name(aName), desc(aDesc),
34 isPwReq(aProtected == Protected::yes),
35 isAtomic(anAtomic == Atomic::yes),
36 format(aFormat),
f53969cc 37 creator(aCreator) {
8822ebee
AR
38 }
39
40public:
41 const char *name; ///< action label to uniquely identify this action
42 const char *desc; ///< action description to build an action menu list
43 bool isPwReq; ///< whether password is required to perform the action
44 bool isAtomic; ///< whether action dumps everything in one dump() call
99572608 45 Format format; ///< action report syntax
8822ebee
AR
46 ActionCreatorPointer creator; ///< creates Action objects with this profile
47};
48
8822ebee 49inline std::ostream &
25ecffe5 50operator <<(std::ostream &os, const ActionProfile &profile)
8822ebee
AR
51{
52 return os << profile.name;
53}
54
25ecffe5
AR
55} // namespace Mgr
56
ff9d9458 57#endif /* SQUID_SRC_MGR_ACTIONPROFILE_H */
f53969cc 58