Squid Web Cache master
Loading...
Searching...
No Matches
LoadableModules.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 "debug/Messages.h"
11#include "LoadableModule.h"
12#include "LoadableModules.h"
13#include "sbuf/List.h"
14
15static void
16LoadModule(const SBuf &fname)
17{
18 debugs(1, DBG_IMPORTANT, "Loading Squid module from '" << fname << "'");
19
20 const auto m = new LoadableModule(fname);
21 m->load();
22 debugs(1, 2, "Loaded Squid module from '" << fname << "'");
23
24 //TODO: TheModules.push_back(m);
25}
26
27void
29{
30 for (const auto &name : names) {
31 LoadModule(name);
32 }
33 debugs(1, Important(25), "Squid plugin modules loaded: " << names.size());
34}
35
void LoadableModulesConfigure(const SBufList &names)
dynamically load named libraries, in the listed order
static void LoadModule(const SBuf &fname)
Definition SBuf.h:94
#define Important(id)
Definition Messages.h:93
#define DBG_IMPORTANT
Definition Stream.h:38
#define debugs(SECTION, LEVEL, CONTENT)
Definition Stream.h:192
std::list< SBuf > SBufList
Definition forward.h:23