ActionProfile.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2023 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 
18 namespace Mgr
19 {
20 
23 {
24 public:
26 
27 public:
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 
40 public:
41  const char *name;
42  const char *desc;
43  bool isPwReq;
44  bool isAtomic;
47 };
48 
49 inline std::ostream &
50 operator <<(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 
ActionCreatorPointer creator
creates Action objects with this profile
Definition: ActionProfile.h:46
hard-coded Cache Manager action configuration, including Action creator
Definition: ActionProfile.h:22
const char * desc
action description to build an action menu list
Definition: ActionProfile.h:42
ActionProfile(const char *aName, const char *aDesc, ActionCreatorPointer aCreator, const Protected aProtected, const Atomic anAtomic, const Format aFormat)
Definition: ActionProfile.h:28
std::ostream & operator<<(std::ostream &os, const ActionProfile &profile)
Definition: ActionProfile.h:50
Protected
whether default cachemgr_passwd configuration denies the Action
Format format
action report syntax
Definition: ActionProfile.h:45
const char * name
action label to uniquely identify this action
Definition: ActionProfile.h:41
RefCount< ActionProfile > Pointer
Definition: ActionProfile.h:25
bool isPwReq
whether password is required to perform the action
Definition: ActionProfile.h:43
Atomic
whether Action::dump() writes the entire report before returning
bool isAtomic
whether action dumps everything in one dump() call
Definition: ActionProfile.h:44
Cache Manager API.
Definition: Action.h:20

 

Introduction

Documentation

Support

Miscellaneous