]> git.ipfire.org Git - thirdparty/squid.git/blame_incremental - src/mgr/ActionProfile.h
Maintenance: update MemBlob (#2106)
[thirdparty/squid.git] / src / mgr / ActionProfile.h
... / ...
CommitLineData
1/*
2 * Copyright (C) 1996-2025 The Squid Software Foundation and contributors
3 *
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.
7 */
8
9/* DEBUG: section 16 Cache Manager API */
10
11#ifndef SQUID_SRC_MGR_ACTIONPROFILE_H
12#define SQUID_SRC_MGR_ACTIONPROFILE_H
13
14#include "mgr/ActionCreator.h"
15#include "mgr/ActionFeatures.h"
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:
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),
37 creator(aCreator) {
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
45 Format format; ///< action report syntax
46 ActionCreatorPointer creator; ///< creates Action objects with this profile
47};
48
49inline std::ostream &
50operator <<(std::ostream &os, const ActionProfile &profile)
51{
52 return os << profile.name;
53}
54
55} // namespace Mgr
56
57#endif /* SQUID_SRC_MGR_ACTIONPROFILE_H */
58