Squid Web Cache master
Loading...
Searching...
No Matches
ActionProfile.h
Go to the documentation of this file.
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
23{
24public:
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;
42 const char *desc;
43 bool isPwReq;
44 bool isAtomic;
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
#define RefCountable
The locking interface for use on Reference-Counted classes.
Definition Lock.h:66
hard-coded Cache Manager action configuration, including Action creator
Format format
action report syntax
ActionProfile(const char *aName, const char *aDesc, ActionCreatorPointer aCreator, const Protected aProtected, const Atomic anAtomic, const Format aFormat)
bool isAtomic
whether action dumps everything in one dump() call
bool isPwReq
whether password is required to perform the action
ActionCreatorPointer creator
creates Action objects with this profile
const char * name
action label to uniquely identify this action
const char * desc
action description to build an action menu list
RefCount< ActionProfile > Pointer
Cache Manager API.
Definition Action.h:21
std::ostream & operator<<(std::ostream &os, const ActionProfile &profile)
Protected
whether default cachemgr_passwd configuration denies the Action
Atomic
whether Action::dump() writes the entire report before returning