summaryrefslogtreecommitdiff
path: root/indra/media_plugins/base/media_plugin_base.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/media_plugins/base/media_plugin_base.h')
-rw-r--r--indra/media_plugins/base/media_plugin_base.h29
1 files changed, 28 insertions, 1 deletions
diff --git a/indra/media_plugins/base/media_plugin_base.h b/indra/media_plugins/base/media_plugin_base.h
index f65c712a66..d5cb5ac550 100644
--- a/indra/media_plugins/base/media_plugin_base.h
+++ b/indra/media_plugins/base/media_plugin_base.h
@@ -32,6 +32,34 @@
#include "llpluginmessage.h"
#include "llpluginmessageclasses.h"
+#if LL_LINUX
+
+struct SymbolToGrab
+{
+ bool mRequired;
+ char const *mName;
+ apr_dso_handle_sym_t *mPPFunc;
+};
+
+class SymbolGrabber
+{
+public:
+ size_t registerSymbol( SymbolToGrab aSymbol );
+ bool grabSymbols(std::vector< std::string > const &aDSONames);
+ void ungrabSymbols();
+
+private:
+ std::vector< SymbolToGrab > gSymbolsToGrab;
+
+ bool sSymsGrabbed = false;
+ apr_pool_t *sSymPADSOMemoryPool = nullptr;
+ std::vector<apr_dso_handle_t *> sLoadedLibraries;
+};
+
+extern SymbolGrabber gSymbolGrabber;
+#define LL_GRAB_SYM(REQUIRED, SYMBOL_NAME, RETURN, ...) RETURN (*ll##SYMBOL_NAME)(__VA_ARGS__) = nullptr; size_t gRegistered##SYMBOL_NAME = gSymbolGrabber.registerSymbol( { REQUIRED, #SYMBOL_NAME , (apr_dso_handle_sym_t*)&ll##SYMBOL_NAME} );
+
+#endif
class MediaPluginBase
{
@@ -46,7 +74,6 @@ public:
static void staticReceiveMessage(const char *message_string, void **user_data);
protected:
-
/** Plugin status. */
typedef enum
{