2 * InspIRCd -- Internet Relay Chat Daemon
4 * Copyright (C) 2013, 2019 Sadie Powell <sadie@witchery.services>
5 * Copyright (C) 2012 Robby <robby@chatbelgie.be>
6 * Copyright (C) 2012 ChrisTX <xpipe@hotmail.de>
7 * Copyright (C) 2009-2010 Daniel De Graaf <danieldg@inspircd.org>
8 * Copyright (C) 2007 Oliver Lupton <om@inspircd.org>
9 * Copyright (C) 2007 Dennis Friis <peavey@inspircd.org>
10 * Copyright (C) 2006 Craig Edwards <brain@inspircd.org>
12 * This file is part of InspIRCd. InspIRCd is free software: you can
13 * redistribute it and/or modify it under the terms of the GNU General Public
14 * License as published by the Free Software Foundation, version 2.
16 * This program is distributed in the hope that it will be useful, but WITHOUT
17 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
18 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
21 * You should have received a copy of the GNU General Public License
22 * along with this program. If not, see <http://www.gnu.org/licenses/>.
28 /** The DLLManager class is able to load a module file by filename,
29 * and locate its init_module symbol.
31 class CoreExport DLLManager : public classbase
34 /** The last error string
38 /** Sets the last error string
40 void RetrieveLastError();
43 /** This constructor loads the module using dlopen()
44 * @param fname The filename to load. This should be within
47 DLLManager(const char *fname);
48 virtual ~DLLManager();
50 /** Get the last error from dlopen() or dlsym().
52 const std::string& LastError()
57 /** The module library handle.
61 /** Return a module by calling the init function
65 /** Retrieves the value of the specified symbol.
66 * @param name The name of the symbol to retrieve.
67 * @return Either the value of the specified symbol or or NULL if it does not exist.
69 void* GetSymbol(const char* name);
71 /** Get detailed version information from the module file */
72 std::string GetVersion();