stub_libmgr.cc
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 #include "squid.h"
10 #include "comm/Connection.h"
11 
12 #define STUB_API "lmgr/libmgr.la"
13 #include "tests/STUB.h"
14 
15 #include "ipc/RequestId.h"
16 
17 // NP: used by Command.h instantiations
18 #include "mgr/ActionProfile.h"
19 
20 // NP: used by Action.h instantiations
21 #include "mgr/Command.h"
22 std::ostream &Mgr::operator <<(std::ostream &os, const Command &) STUB_RETVAL(os)
23 
24 #include "mgr/Action.h"
27 void Mgr::Action::run(StoreEntry *, bool) STUB
28 void Mgr::Action::fillEntry(StoreEntry *, bool) STUB
29 void Mgr::Action::add(const Action &) STUB
30 void Mgr::Action::respond(const Request &) STUB
31 void Mgr::Action::sendResponse(const Ipc::RequestId) STUB
32 Mgr::Format Mgr::Action::format() const STUB_RETVAL(Mgr::Format::informal)
33 bool Mgr::Action::atomic() const STUB_RETVAL(false)
34 const char * Mgr::Action::name() const STUB_RETVAL(nullptr)
35 static Mgr::Command static_Command;
36 const Mgr::Command & Mgr::Action::command() const STUB_RETVAL(static_Command)
37 StoreEntry * Mgr::Action::createStoreEntry() const STUB_RETVAL(nullptr)
38 static Mgr::Action::Pointer dummyAction;
39 
40 #include "mgr/ActionParams.h"
42 Mgr::ActionParams::ActionParams(const Ipc::TypedMsgHdr &) STUB_NOP
43 void Mgr::ActionParams::pack(Ipc::TypedMsgHdr &) const STUB
44 
45 #include "mgr/ActionWriter.h"
46 //Mgr::ActionWriter::ActionWriter(const Action::Pointer &, int) STUB
47 //protected:
49 
50 #include "mgr/BasicActions.h"
53 //protected:
54 //Mgr::MenuAction::MenuAction(const CommandPointer &cmd) STUB
55 
58 // protected:
59 //Mgr::ShutdownAction::ShutdownAction(const CommandPointer &) STUB
60 
63 //protected:
64 //Mgr::ReconfigureAction::ReconfigureAction(const CommandPointer &) STUB
65 
68 //protected:
69 //Mgr::RotateAction::RotateAction(const CommandPointer &) STUB
70 
73 //protected:
74 //Mgr::OfflineToggleAction::OfflineToggleAction(const CommandPointer &) STUB
75 
77 
78 #include "mgr/CountersAction.h"
79 //Mgr::CountersActionData::CountersActionData() STUB
81 
82 Mgr::Action::Pointer Mgr::CountersAction::Create(const CommandPointer &) STUB_RETVAL(dummyAction)
83 void Mgr::CountersAction::add(const Action &) STUB
84 void Mgr::CountersAction::pack(Ipc::TypedMsgHdr &) const STUB
85 void Mgr::CountersAction::unpack(const Ipc::TypedMsgHdr &) STUB
86 //protected:
87 //Mgr::CountersAction::CountersAction(const CommandPointer &) STUB
88 void Mgr::CountersAction::collect() STUB
89 void Mgr::CountersAction::dump(StoreEntry *) STUB
90 
91 #include "mgr/Filler.h"
92 //Mgr::Filler::Filler(const Action::Pointer &, int, unsigned int) STUB
93 //protected:
94 //void Mgr::Filler::start() STUB
95 //void Mgr::Filler::swanSong() STUB
96 
97 #include "mgr/Forwarder.h"
98 //Mgr::Forwarder::Forwarder(int, const ActionParams &, HttpRequest *, StoreEntry *) STUB
99 //Mgr::Forwarder::~Forwarder() STUB
100 //protected:
101 //void Mgr::Forwarder::swanSong() STUB
103 void Mgr::Forwarder::handleTimeout() STUB
104 void Mgr::Forwarder::handleException(const std::exception &) STUB
105 
106 #include "mgr/FunAction.h"
108 void Mgr::FunAction::respond(const Request &) STUB
109 //protected:
110 //Mgr::FunAction::FunAction(const CommandPointer &, OBJH *) STUB
112 
113 #include "mgr/InfoAction.h"
114 //Mgr::InfoActionData::InfoActionData() STUB
116 
117 Mgr::Action::Pointer Mgr::InfoAction::Create(const CommandPointer &) STUB_RETVAL(dummyAction)
118 void Mgr::InfoAction::add(const Action &) STUB
119 void Mgr::InfoAction::respond(const Request &) STUB
120 void Mgr::InfoAction::pack(Ipc::TypedMsgHdr &) const STUB
121 void Mgr::InfoAction::unpack(const Ipc::TypedMsgHdr &) STUB
122 //protected:
123 //Mgr::InfoAction::InfoAction(const Mgr::CommandPointer &) STUB
124 void Mgr::InfoAction::collect() STUB
125 void Mgr::InfoAction::dump(StoreEntry *) STUB
126 
127 #include "mgr/Inquirer.h"
128 //Mgr::Inquirer::Inquirer(Action::Pointer, const Request &, const Ipc::StrandCoords &) STUB
129 //protected:
131 bool Mgr::Inquirer::doneAll() const STUB_RETVAL(false)
132 void Mgr::Inquirer::cleanup() STUB
133 void Mgr::Inquirer::sendResponse() STUB
134 bool Mgr::Inquirer::aggregate(Ipc::Response::Pointer) STUB_RETVAL(false)
135 
136 #include "mgr/IntervalAction.h"
137 //Mgr::IntervalActionData::IntervalActionData() STUB
139 
140 //Mgr::Action::Pointer Mgr::IntervalAction::Create5min(const CommandPointer &cmd) STUB_RETVAL(new Mgr::IntervalAction(*cmd))
141 //Mgr::Action::Pointer Mgr::IntervalAction::Create60min(const CommandPointer &cmd) STUB_RETVAL(new Mgr::IntervalAction(*cmd))
142 void Mgr::IntervalAction::add(const Action&) STUB
143 void Mgr::IntervalAction::pack(Ipc::TypedMsgHdr&) const STUB
144 void Mgr::IntervalAction::unpack(const Ipc::TypedMsgHdr&) STUB
145 //protected:
146 //Mgr::IntervalAction::IntervalAction(const CommandPointer &, int, int) STUB
147 void Mgr::IntervalAction::collect() STUB
148 void Mgr::IntervalAction::dump(StoreEntry*) STUB
149 
150 #include "mgr/IntParam.h"
151 //Mgr::IntParam::IntParam() STUB
152 //Mgr::IntParam::IntParam(const std::vector<int>&) STUB
155 static std::vector<int> static_vector;
156 const std::vector<int>& Mgr::IntParam::value() const STUB_RETVAL(static_vector)
157 
158 #include "mgr/IoAction.h"
159 //Mgr::IoActionData::IoActionData() STUB
161 
162 Mgr::Action::Pointer Mgr::IoAction::Create(const CommandPointer &) STUB_RETVAL(dummyAction)
163 void Mgr::IoAction::add(const Action&) STUB
164 void Mgr::IoAction::pack(Ipc::TypedMsgHdr&) const STUB
165 void Mgr::IoAction::unpack(const Ipc::TypedMsgHdr&) STUB
166 //protected:
167 //Mgr::IoAction::IoAction(const CommandPointer &) STUB
168 void Mgr::IoAction::collect() STUB
169 void Mgr::IoAction::dump(StoreEntry*) STUB
170 
171 //#include "mgr/QueryParam.h"
172 //void Mgr::QueryParam::pack(Ipc::TypedMsgHdr&) const = 0;
173 //void Mgr::QueryParam::unpackValue(const Ipc::TypedMsgHdr&) = 0;
174 
175 #include "mgr/QueryParams.h"
177 void Mgr::QueryParams::pack(Ipc::TypedMsgHdr&) const STUB
178 void Mgr::QueryParams::unpack(const Ipc::TypedMsgHdr&) STUB
179 void Mgr::QueryParams::Parse(Parser::Tokenizer &, QueryParams &) STUB
180 //private:
181 //Params::const_iterator Mgr::QueryParams::find(const String&) const STUB_RETVAL(new Mgr::Params::const_iterator(*this))
182 Mgr::QueryParam::Pointer Mgr::QueryParams::CreateParam(QueryParam::Type) STUB_RETVAL(Mgr::QueryParam::Pointer(nullptr))
183 
184 #include "mgr/Registration.h"
185 //void Mgr::RegisterAction(char const *, char const *, OBJH *, Protected, Atomic, Format);
186 //void Mgr::RegisterAction(char const *, char const *, ClassActionCreationHandler *, Protected, Atomic, Format);
187 
188 #include "mgr/Request.h"
189 //Mgr::Request::Request(int, unsigned int, int, const Mgr::ActionParams &) STUB
190 //Mgr::Request::Request(const Ipc::TypedMsgHdr&) STUB
192 Ipc::Request::Pointer Mgr::Request::clone() const STUB_RETVAL(const_cast<Mgr::Request*>(this))
193 
194 #include "mgr/Response.h"
195 //Mgr::Response::Response(unsigned int, Action::Pointer) STUB
196 //Mgr::Response::Response(const Ipc::TypedMsgHdr&) STUB
198 static Ipc::Response::Pointer ipr_static;
199 Ipc::Response::Pointer Mgr::Response::clone() const STUB_RETVAL(Ipc::Response::Pointer(nullptr))
200 bool Mgr::Response::hasAction() const STUB_RETVAL(false)
201 //static Mgr::Action mgraction_static;
202 //const Mgr::Action& Mgr::Response::getAction() const STUB_RETVAL(mgraction_static)
203 
204 #include "mgr/ServiceTimesAction.h"
205 //Mgr::ServiceTimesActionData::ServiceTimesActionData() STUB
207 
208 Mgr::Action::Pointer Mgr::ServiceTimesAction::Create(const Mgr::CommandPointer &) STUB_RETVAL(Mgr::Action::Pointer(nullptr))
209 void Mgr::ServiceTimesAction::add(const Action&) STUB
210 void Mgr::ServiceTimesAction::pack(Ipc::TypedMsgHdr&) const STUB
211 void Mgr::ServiceTimesAction::unpack(const Ipc::TypedMsgHdr&) STUB
212 //protected:
213 //Mgr::ServiceTimesAction::ServiceTimesAction(const CommandPointer &) STUB
214 void Mgr::ServiceTimesAction::collect() STUB
215 void Mgr::ServiceTimesAction::dump(StoreEntry*) STUB
216 
217 #include "mgr/StoreIoAction.h"
218 //Mgr::StoreIoActionData::StoreIoActionData() STUB
220 //Mgr::StoreIoAction::StoreIoAction(const CommandPointer &) STUB
221 Mgr::Action::Pointer Mgr::StoreIoAction::Create(const CommandPointer &) STUB_RETVAL(Mgr::Action::Pointer(nullptr))
222 void Mgr::StoreIoAction::add(const Action&) STUB
223 void Mgr::StoreIoAction::pack(Ipc::TypedMsgHdr&) const STUB
224 void Mgr::StoreIoAction::unpack(const Ipc::TypedMsgHdr&) STUB
225 void Mgr::StoreIoAction::collect() STUB
226 void Mgr::StoreIoAction::dump(StoreEntry*) STUB
227 
228 #include "mgr/StoreToCommWriter.h"
229 //Mgr::StoreToCommWriter::StoreToCommWriter(int, StoreEntry *) STUB
231 void Mgr::StoreToCommWriter::start() STUB
232 void Mgr::StoreToCommWriter::swanSong() STUB
233 bool Mgr::StoreToCommWriter::doneAll() const STUB_RETVAL(false)
234 void Mgr::StoreToCommWriter::scheduleStoreCopy() STUB
235 void Mgr::StoreToCommWriter::noteStoreCopied(StoreIOBuffer) STUB
236 void Mgr::StoreToCommWriter::NoteStoreCopied(void*, StoreIOBuffer) STUB
237 void Mgr::StoreToCommWriter::HandleStoreAbort(StoreToCommWriter *) STUB
238 void Mgr::StoreToCommWriter::scheduleCommWrite(const StoreIOBuffer&) STUB
239 void Mgr::StoreToCommWriter::noteCommWrote(const CommIoCbParams&) STUB
240 void Mgr::StoreToCommWriter::noteCommClosed(const CommCloseCbParams&) STUB
241 void Mgr::StoreToCommWriter::close() STUB
242 
243 #include "mgr/StringParam.h"
244 //Mgr::StringParam::StringParam() STUB
245 //Mgr::StringParam::StringParam(const String&) STUB
248 static String t;
250 
ServiceTimesActionData & operator+=(const ServiceTimesActionData &stats)
CountersActionData & operator+=(const CountersActionData &stats)
Command
what kind of I/O the disker needs to do or have done
Definition: IpcIoFile.h:33
~Action() override
Definition: Action.cc:31
static Pointer Create(const CommandPointer &cmd)
Definition: BasicActions.cc:40
#define STUB_RETVAL(x)
Definition: STUB.h:42
void dump(StoreEntry *entry) override
Pointer clone() const override
returns a copy of this
Definition: Request.cc:55
store size histograms of network read() from peer server
Definition: IoAction.h:21
void dump(StoreEntry *entry) override
Definition: FunAction.cc:48
store service times for 5 and 60 min
QueryParam::Pointer get(const String &name) const
returns query parameter by name
Definition: QueryParams.cc:23
void unpackValue(const Ipc::TypedMsgHdr &msg) override
load parameter value from msg
Definition: IntParam.cc:38
const std::vector< int > & value() const
Definition: IntParam.cc:48
void pack(Ipc::TypedMsgHdr &msg) const override
store parameter into msg
Definition: StringParam.cc:26
IoActionData & operator+=(const IoActionData &stats)
Definition: IoAction.cc:30
InfoActionData & operator+=(const InfoActionData &stats)
Definition: InfoAction.cc:32
static Pointer Create(const CommandPointer &cmd)
Definition: BasicActions.cc:67
IntervalActionData & operator+=(const IntervalActionData &stats)
void handleError() override
Definition: Forwarder.cc:76
std::ostream & operator<<(std::ostream &os, const ActionProfile &profile)
Definition: ActionProfile.h:50
Action(const CommandPointer &aCmd)
Definition: Action.cc:25
void pack(Ipc::TypedMsgHdr &msg) const override
prepare for sendmsg()
Definition: Response.cc:43
void OBJH(StoreEntry *)
Definition: forward.h:44
store traffic and resource counters
void unpackValue(const Ipc::TypedMsgHdr &msg) override
load parameter value from msg
Definition: StringParam.cc:33
void start() override
called by AsyncStart; do not call directly
Definition: ActionWriter.cc:27
Generic protocol-agnostic parsing tools.
Definition: RequestParser.h:15
void RegisterBasics()
Registers profiles for the actions above; TODO: move elsewhere?
void dump(StoreEntry *entry) override
Definition: BasicActions.cc:51
void pack(Ipc::TypedMsgHdr &msg) const override
store parameter into msg
Definition: IntParam.cc:28
Store IO interface data.
Definition: StoreIoAction.h:20
const String & value() const
Definition: StringParam.cc:39
Definition: cf_gen.cc:108
void dump(StoreEntry *entry) override
Ipc::Response::Pointer clone() const override
returns a copy of this
Definition: Response.cc:55
#define STUB
macro to stub a void function.
Definition: STUB.h:34
static Pointer Create(const CommandPointer &cmd)
StoreIoActionData & operator+=(const StoreIoActionData &stats)
void dump(StoreEntry *entry) override
Definition: BasicActions.cc:97
static Pointer Create(const CommandPointer &cmd)
Definition: BasicActions.cc:85
void Parse()
interprets (and partially applies) squid.conf or equivalent configuration
Definition: cache_cf.cc:610
void respond(const Request &request) override
respond to Coordinator request; default is to collect and sendResponse
Definition: FunAction.cc:38
void dump(StoreEntry *entry) override
Definition: BasicActions.cc:78
static Pointer Create(const CommandPointer &cmd, OBJH *aHandler)
Definition: FunAction.cc:25
static Pointer Create(const CommandPointer &cmd)
#define STUB_NOP
Definition: STUB.h:38
void start() override
called by AsyncStart; do not call directly
Definition: Inquirer.cc:70
struct msghdr with a known type, fixed-size I/O and control buffers
Definition: TypedMsgHdr.h:34
void pack(Ipc::TypedMsgHdr &msg) const override
prepare for sendmsg()
Definition: Request.cc:44
RefCount< Command > CommandPointer
Definition: forward.h:34
Definition: IpcIoFile.h:23
Cache Manager API.
Definition: Action.h:20

 

Introduction

Documentation

Support

Miscellaneous