Squid Web Cache
master
Loading...
Searching...
No Matches
LoadableModule.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
#ifndef SQUID_SRC_LOADABLEMODULE_H
10
#define SQUID_SRC_LOADABLEMODULE_H
11
12
#include "
sbuf/SBuf.h
"
13
14
// wrapper for dlopen(3), libltdl, and friends
15
class
LoadableModule
16
{
17
public
:
18
explicit
LoadableModule
(
const
SBuf
&aName);
19
~LoadableModule
();
// unloads if loaded
20
21
bool
loaded
()
const
;
22
const
auto
&
name
()
const
{
return
theName
; }
23
const
auto
&
error
()
const
{
return
theError
; }
24
25
void
load
();
// throws Texc
26
void
unload
();
// throws Texc
27
28
protected
:
29
SBuf
theName
;
30
SBuf
theError
;
31
void
*
theHandle
=
nullptr
;
32
33
private
:
34
void
*
openModule
();
35
bool
closeModule
();
36
const
char
*
errorMsg
();
37
};
38
39
#endif
/* SQUID_SRC_LOADABLEMODULE_H */
40
SBuf.h
LoadableModule
Definition
LoadableModule.h:16
LoadableModule::unload
void unload()
Definition
LoadableModule.cc:52
LoadableModule::error
const auto & error() const
Definition
LoadableModule.h:23
LoadableModule::theHandle
void * theHandle
Definition
LoadableModule.h:31
LoadableModule::load
void load()
Definition
LoadableModule.cc:40
LoadableModule::closeModule
bool closeModule()
Definition
LoadableModule.cc:70
LoadableModule::errorMsg
const char * errorMsg()
Definition
LoadableModule.cc:77
LoadableModule::name
const auto & name() const
Definition
LoadableModule.h:22
LoadableModule::theError
SBuf theError
Definition
LoadableModule.h:30
LoadableModule::~LoadableModule
~LoadableModule()
Definition
LoadableModule.cc:26
LoadableModule::theName
SBuf theName
Definition
LoadableModule.h:29
LoadableModule::openModule
void * openModule()
Definition
LoadableModule.cc:64
LoadableModule::loaded
bool loaded() const
Definition
LoadableModule.cc:34
SBuf
Definition
SBuf.h:94
squid
src
LoadableModule.h
Generated by
1.9.8