![]() |
TSDuck v3.46-4930
MPEG Transport Stream Toolkit
|
#include <tsApplicationSharedLibrary.h>


Public Member Functions | |
| ApplicationSharedLibrary (const fs::path &filename, const UString &prefix=UString(), const UString &library_path=UString(), SharedLibraryFlags flags=SharedLibraryFlags::NONE, Report &report=(ts::NullReport::Instance())) | |
| virtual | ~ApplicationSharedLibrary () override |
| const UString & | errorMessage () const |
| const fs::path & | fileName () const |
| void * | getSymbol (const std::string &name) const |
| bool | isLoaded () const |
| UString | moduleName () const |
| UString | prefix () const |
Static Public Member Functions | |
| static void | GetPluginList (UStringVector &files, const UString &prefix, const UString &library_path=UString()) |
| static void | GetSearchPath (UStringList &directories, const UString &library_path=UString()) |
Protected Member Functions | |
| void | load (const fs::path &filename) |
| void | unload () |
Representation of an application shared library.
|
explicit |
Constructor.
| [in] | filename | Shared library file name. Directory and suffix are optional. If filename contains a directory, the specified file is used directly, with and without suffix (.so, .dll). If filename is just a name without directory, search the file in a list of directories as defined in GetSearchPath(). In each directory, a file with prefix is searched. Then, if not found, without prefix. Finally, when everything failed, filename is searched with the default system lookup mechanism. |
| [in] | prefix | Prefix to add to filename if the file is not found. |
| [in] | library_path | Name of an environment variable, an optional list of directories to search, similar to LD_LIBRARY_PATH. |
| [in] | flags | Shared library options. |
| [in,out] | report | Where to report errors. |
|
overridevirtual |
Virtual destructor.
| UString ts::ApplicationSharedLibrary::moduleName | ( | ) | const |
The module name is derived from the file name without the prefix.
|
inline |
Get the prefix.
|
static |
Get the list of directories where to search application shared libraries or plugins. The ordered list of directories is:
| [out] | directories | List of directories in search order. |
| [in] | library_path | Name of an environment variable, an optional list of directories to search, similar to LD_LIBRARY_PATH. |
|
static |
Get a list of plugins.
| [out] | files | List of shared library files. |
| [in] | prefix | Prefix for plugin names. |
| [in] | library_path | Name of an environment variable, an optional list of directories to search, similar to LD_LIBRARY_PATH. |
|
inlineinherited |
Check if the library was successfully loaded.
|
inlineinherited |
Return a message describing the constructor error. Useful when isLoaded() == false.
|
inlineinherited |
Return actual file name of shared library.
|
inherited |
Get the value of an exported symbol inside the shared library.
| [in] | name | Symbol name, using 8-bit characters, not Unicode. |
|
protectedinherited |
Try to load an alternate file if the shared library is not yet loaded.
| [in] | filename | Shared library file name. |
|
protectedinherited |
Force unload, even if permanent