1 /*
2  * Copyright (C) 1996-2021 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 // NP: used by Command.h instantiations
16 #include "mgr/ActionProfile.h"
17 
18 // NP: used by Action.h instantiations
19 #include "mgr/Command.h"
20 std::ostream &operator <<(std::ostream &os, const Mgr::Command &cmd) STUB_RETVAL(os)
21 
22 #include "mgr/Action.h"
23 Mgr::Action::Action(const CommandPointer &aCmd) STUB
24 Mgr::Action::~Action() STUB
25 void Mgr::Action::run(StoreEntry *entry, bool writeHttpHeader) STUB
26 void Mgr::Action::fillEntry(StoreEntry *entry, bool writeHttpHeader) STUB
27 void Mgr::Action::add(const Action &action) STUB
28 void Mgr::Action::respond(const Request &request) STUB
29 void Mgr::Action::sendResponse(unsigned int requestId) STUB
30 bool Mgr::Action::atomic() const STUB_RETVAL(false)
31 const char * Mgr::Action::name() const STUB_RETVAL(NULL)
32 static Mgr::Command static_Command;
33 const Mgr::Command & Mgr::Action::command() const STUB_RETVAL(static_Command)
34 StoreEntry * Mgr::Action::createStoreEntry() const STUB_RETVAL(NULL)
35 static Mgr::Action::Pointer dummyAction;
36 
37 #include "mgr/ActionParams.h"
38 Mgr::ActionParams::ActionParams() STUB_NOP
39 Mgr::ActionParams::ActionParams(const Ipc::TypedMsgHdr &msg) STUB_NOP
40 void Mgr::ActionParams::pack(Ipc::TypedMsgHdr &msg) const STUB
41 std::ostream &operator <<(std::ostream &os, const Mgr::ActionParams &params) STUB_RETVAL(os)
42 
43 #include "mgr/ActionWriter.h"
44 //Mgr::ActionWriter::ActionWriter(const Action::Pointer &anAction, int aFd) STUB
45 //protected:
46 void Mgr::ActionWriter::start() STUB
47 
48 #include "mgr/BasicActions.h"
49 Mgr::Action::Pointer Mgr::MenuAction::Create(const Mgr::CommandPointer &cmd) STUB_RETVAL(dummyAction)
50 void Mgr::MenuAction::dump(StoreEntry *entry) STUB
51 //protected:
52 //Mgr::MenuAction::MenuAction(const CommandPointer &cmd) STUB
53 
54 Mgr::Action::Pointer Mgr::ShutdownAction::Create(const Mgr::CommandPointer &cmd) STUB_RETVAL(dummyAction)
55 void Mgr::ShutdownAction::dump(StoreEntry *entry) STUB
56 // protected:
57 //Mgr::ShutdownAction::ShutdownAction(const CommandPointer &cmd) STUB
58 
59 Mgr::Action::Pointer Mgr::ReconfigureAction::Create(const Mgr::CommandPointer &cmd) STUB_RETVAL(dummyAction)
60 void Mgr::ReconfigureAction::dump(StoreEntry *entry) STUB
61 //protected:
62 //Mgr::ReconfigureAction::ReconfigureAction(const CommandPointer &cmd) STUB
63 
64 Mgr::Action::Pointer Mgr::RotateAction::Create(const Mgr::CommandPointer &cmd) STUB_RETVAL(dummyAction)
65 void Mgr::RotateAction::dump(StoreEntry *entry) STUB
66 //protected:
67 //Mgr::RotateAction::RotateAction(const CommandPointer &cmd) STUB
68 
69 Mgr::Action::Pointer Mgr::OfflineToggleAction::Create(const CommandPointer &cmd) STUB_RETVAL(dummyAction)
70 void Mgr::OfflineToggleAction::dump(StoreEntry *entry) STUB
71 //protected:
72 //Mgr::OfflineToggleAction::OfflineToggleAction(const CommandPointer &cmd) STUB
73 
74 void Mgr::RegisterBasics() STUB
75 
76 #include "mgr/CountersAction.h"
77 //Mgr::CountersActionData::CountersActionData() STUB
78 Mgr::CountersActionData& Mgr::CountersActionData::operator +=(const Mgr::CountersActionData& stats) STUB_RETVAL(*this)
79 
80 Mgr::Action::Pointer Mgr::CountersAction::Create(const CommandPointer &cmd) STUB_RETVAL(dummyAction)
81 void Mgr::CountersAction::add(const Action& action) STUB
82 void Mgr::CountersAction::pack(Ipc::TypedMsgHdr& msg) const STUB
83 void Mgr::CountersAction::unpack(const Ipc::TypedMsgHdr& msg) STUB
84 //protected:
85 //Mgr::CountersAction::CountersAction(const CommandPointer &cmd) STUB
86 void Mgr::CountersAction::collect() STUB
87 void Mgr::CountersAction::dump(StoreEntry* entry) STUB
88 
89 #include "mgr/Filler.h"
90 //Mgr::Filler::Filler(const Action::Pointer &anAction, int aFd, unsigned int aRequestId) STUB
91 //protected:
92 //void Mgr::Filler::start() STUB
93 //void Mgr::Filler::swanSong() STUB
94 
95 #include "mgr/Forwarder.h"
96 //Mgr::Forwarder::Forwarder(int aFd, const ActionParams &aParams, HttpRequest* aRequest, StoreEntry* anEntry) STUB
97 //Mgr::Forwarder::~Forwarder() STUB
98 //protected:
99 //void Mgr::Forwarder::swanSong() STUB
100 void Mgr::Forwarder::handleError() STUB
101 void Mgr::Forwarder::handleTimeout() STUB
102 void Mgr::Forwarder::handleException(const std::exception& e) STUB
103 
104 #include "mgr/FunAction.h"
105 Mgr::Action::Pointer Mgr::FunAction::Create(const CommandPointer &cmd, OBJH *aHandler) STUB_RETVAL(dummyAction)
106 void Mgr::FunAction::respond(const Request& request) STUB
107 //protected:
108 //Mgr::FunAction::FunAction(const CommandPointer &cmd, OBJH *aHandler) STUB
109 void Mgr::FunAction::dump(StoreEntry *entry) STUB
110 
111 #include "mgr/InfoAction.h"
112 //Mgr::InfoActionData::InfoActionData() STUB
113 Mgr::InfoActionData& Mgr::InfoActionData::operator += (const Mgr::InfoActionData& stats) STUB_RETVAL(*this)
114 
115 Mgr::Action::Pointer Mgr::InfoAction::Create(const CommandPointer &cmd) STUB_RETVAL(dummyAction)
116 void Mgr::InfoAction::add(const Action& action) STUB
117 void Mgr::InfoAction::respond(const Request& request) STUB
118 void Mgr::InfoAction::pack(Ipc::TypedMsgHdr& msg) const STUB
119 void Mgr::InfoAction::unpack(const Ipc::TypedMsgHdr& msg) STUB
120 //protected:
121 //Mgr::InfoAction::InfoAction(const Mgr::CommandPointer &cmd) STUB
122 void Mgr::InfoAction::collect() STUB
123 void Mgr::InfoAction::dump(StoreEntry* entry) STUB
124 
125 #include "mgr/Inquirer.h"
126 //Mgr::Inquirer::Inquirer(Action::Pointer anAction, const Request &aCause, const Ipc::StrandCoords &coords) STUB
127 //protected:
128 void Mgr::Inquirer::start() STUB
129 bool Mgr::Inquirer::doneAll() const STUB_RETVAL(false)
130 void Mgr::Inquirer::cleanup() STUB
131 void Mgr::Inquirer::sendResponse() STUB
132 bool Mgr::Inquirer::aggregate(Ipc::Response::Pointer aResponse) STUB_RETVAL(false)
133 
134 #include "mgr/IntervalAction.h"
135 //Mgr::IntervalActionData::IntervalActionData() STUB
136 Mgr::IntervalActionData& Mgr::IntervalActionData::operator +=(const Mgr::IntervalActionData& stats) STUB_RETVAL(*this)
137 
138 //Mgr::Action::Pointer Mgr::IntervalAction::Create5min(const CommandPointer &cmd) STUB_RETVAL(new Mgr::IntervalAction(*cmd))
139 //Mgr::Action::Pointer Mgr::IntervalAction::Create60min(const CommandPointer &cmd) STUB_RETVAL(new Mgr::IntervalAction(*cmd))
140 void Mgr::IntervalAction::add(const Action& action) STUB
141 void Mgr::IntervalAction::pack(Ipc::TypedMsgHdr& msg) const STUB
142 void Mgr::IntervalAction::unpack(const Ipc::TypedMsgHdr& msg) STUB
143 //protected:
144 //Mgr::IntervalAction::IntervalAction(const CommandPointer &cmd, int aMinutes, int aHours) STUB
145 void Mgr::IntervalAction::collect() STUB
146 void Mgr::IntervalAction::dump(StoreEntry* entry) STUB
147 
148 #include "mgr/IntParam.h"
149 //Mgr::IntParam::IntParam() STUB
150 //Mgr::IntParam::IntParam(const std::vector<int>& anArray) STUB
151 void Mgr::IntParam::pack(Ipc::TypedMsgHdr& msg) const STUB
152 void Mgr::IntParam::unpackValue(const Ipc::TypedMsgHdr& msg) STUB
153 static std::vector<int> static_vector;
154 const std::vector<int>& Mgr::IntParam::value() const STUB_RETVAL(static_vector)
155 
156 #include "mgr/IoAction.h"
157 //Mgr::IoActionData::IoActionData() STUB
158 Mgr::IoActionData& Mgr::IoActionData::operator += (const IoActionData& stats) STUB_RETVAL(*this)
159 
160 Mgr::Action::Pointer Mgr::IoAction::Create(const CommandPointer &cmd) STUB_RETVAL(dummyAction)
161 void Mgr::IoAction::add(const Action& action) STUB
162 void Mgr::IoAction::pack(Ipc::TypedMsgHdr& msg) const STUB
163 void Mgr::IoAction::unpack(const Ipc::TypedMsgHdr& msg) STUB
164 //protected:
165 //Mgr::IoAction::IoAction(const CommandPointer &cmd) STUB
166 void Mgr::IoAction::collect() STUB
167 void Mgr::IoAction::dump(StoreEntry* entry) STUB
168 
169 //#include "mgr/QueryParam.h"
170 //void Mgr::QueryParam::pack(Ipc::TypedMsgHdr& msg) const = 0;
171 //void Mgr::QueryParam::unpackValue(const Ipc::TypedMsgHdr& msg) = 0;
172 
173 #include "mgr/QueryParams.h"
174 Mgr::QueryParam::Pointer Mgr::QueryParams::get(const String& name) const STUB_RETVAL(Mgr::QueryParam::Pointer(NULL))
175 void Mgr::QueryParams::pack(Ipc::TypedMsgHdr& msg) const STUB
176 void Mgr::QueryParams::unpack(const Ipc::TypedMsgHdr& msg) STUB
177 void Mgr::QueryParams::Parse(Parser::Tokenizer &, QueryParams &) STUB
178 //private:
179 //Params::const_iterator Mgr::QueryParams::find(const String& name) const STUB_RETVAL(new Mgr::Params::const_iterator(*this))
180 Mgr::QueryParam::Pointer Mgr::QueryParams::CreateParam(QueryParam::Type aType) STUB_RETVAL(Mgr::QueryParam::Pointer(NULL))
181 
182 #include "mgr/Registration.h"
183 //void Mgr::RegisterAction(char const * action, char const * desc, OBJH * handler, int pw_req_flag, int atomic);
184 //void Mgr::RegisterAction(char const * action, char const * desc, ClassActionCreationHandler *handler, int pw_req_flag, int atomic);
185 
186 #include "mgr/Request.h"
187 //Mgr::Request::Request(int aRequestorId, unsigned int aRequestId, int aFd, const Mgr::ActionParams &aParams) STUB
188 //Mgr::Request::Request(const Ipc::TypedMsgHdr& msg) STUB
189 void Mgr::Request::pack(Ipc::TypedMsgHdr& msg) const STUB
190 Ipc::Request::Pointer Mgr::Request::clone() const STUB_RETVAL(const_cast<Mgr::Request*>(this))
191 
192 #include "mgr/Response.h"
193 //Mgr::Response::Response(unsigned int aRequestId, Action::Pointer anAction = NULL) STUB
194 //Mgr::Response::Response(const Ipc::TypedMsgHdr& msg) STUB
195 void Mgr::Response::pack(Ipc::TypedMsgHdr& msg) const STUB
196 static Ipc::Response::Pointer ipr_static;
197 Ipc::Response::Pointer Mgr::Response::clone() const STUB_RETVAL(Ipc::Response::Pointer(NULL))
198 bool Mgr::Response::hasAction() const STUB_RETVAL(false)
199 //static Mgr::Action mgraction_static;
200 //const Mgr::Action& Mgr::Response::getAction() const STUB_RETVAL(mgraction_static)
201 
202 #include "mgr/ServiceTimesAction.h"
203 //Mgr::ServiceTimesActionData::ServiceTimesActionData() STUB
204 Mgr::ServiceTimesActionData& Mgr::ServiceTimesActionData::operator +=(const Mgr::ServiceTimesActionData& stats) STUB_RETVAL(*this)
205 
206 Mgr::Action::Pointer Mgr::ServiceTimesAction::Create(const Mgr::CommandPointer &cmd) STUB_RETVAL(Mgr::Action::Pointer(NULL))
207 void Mgr::ServiceTimesAction::add(const Action& action) STUB
208 void Mgr::ServiceTimesAction::pack(Ipc::TypedMsgHdr& msg) const STUB
209 void Mgr::ServiceTimesAction::unpack(const Ipc::TypedMsgHdr& msg) STUB
210 //protected:
211 //Mgr::ServiceTimesAction::ServiceTimesAction(const CommandPointer &cmd) STUB
212 void Mgr::ServiceTimesAction::collect() STUB
213 void Mgr::ServiceTimesAction::dump(StoreEntry* entry) STUB
214 
215 #include "mgr/StoreIoAction.h"
216 //Mgr::StoreIoActionData::StoreIoActionData() STUB
217 Mgr::StoreIoActionData & Mgr::StoreIoActionData::operator +=(const StoreIoActionData& stats) STUB_RETVAL(*this)
218 //Mgr::StoreIoAction::StoreIoAction(const CommandPointer &cmd) STUB
219 Mgr::Action::Pointer Mgr::StoreIoAction::Create(const CommandPointer &cmd) STUB_RETVAL(Mgr::Action::Pointer(NULL))
220 void Mgr::StoreIoAction::add(const Action& action) STUB
221 void Mgr::StoreIoAction::pack(Ipc::TypedMsgHdr& msg) const STUB
222 void Mgr::StoreIoAction::unpack(const Ipc::TypedMsgHdr& msg) STUB
223 void Mgr::StoreIoAction::collect() STUB
224 void Mgr::StoreIoAction::dump(StoreEntry* entry) STUB
225 
226 #include "mgr/StoreToCommWriter.h"
227 //Mgr::StoreToCommWriter::StoreToCommWriter(int aFd, StoreEntry *anEntry) STUB
228 Mgr::StoreToCommWriter::~StoreToCommWriter() STUB
229 void Mgr::StoreToCommWriter::start() STUB
230 void Mgr::StoreToCommWriter::swanSong() STUB
231 bool Mgr::StoreToCommWriter::doneAll() const STUB_RETVAL(false)
232 void Mgr::StoreToCommWriter::scheduleStoreCopy() STUB
233 void Mgr::StoreToCommWriter::noteStoreCopied(StoreIOBuffer ioBuf) STUB
234 void Mgr::StoreToCommWriter::NoteStoreCopied(void* data, StoreIOBuffer ioBuf) STUB
235 void Mgr::StoreToCommWriter::Abort(void* param) STUB
236 void Mgr::StoreToCommWriter::scheduleCommWrite(const StoreIOBuffer& ioBuf) STUB
237 void Mgr::StoreToCommWriter::noteCommWrote(const CommIoCbParams& params) STUB
238 void Mgr::StoreToCommWriter::noteCommClosed(const CommCloseCbParams& params) STUB
239 void Mgr::StoreToCommWriter::close() STUB
240 
241 #include "mgr/StringParam.h"
242 //Mgr::StringParam::StringParam() STUB
243 //Mgr::StringParam::StringParam(const String& aString) STUB
244 void Mgr::StringParam::pack(Ipc::TypedMsgHdr& msg) const STUB
245 void Mgr::StringParam::unpackValue(const Ipc::TypedMsgHdr& msg) STUB
246 static String t;
247 const String& Mgr::StringParam::value() const STUB_RETVAL(t)
248 
249