Source/AWEPlugin/AWEPluginLoaderPrivate.h
Classes
Types
Defines
Types Documentation
typedef awe_PluginLoader
typedef struct PluginLoader awe_PluginLoader;
Macros Documentation
define AWE_PLUGIN_LOADER_RESERVATION_BLOCK_LENGTH
#define AWE_PLUGIN_LOADER_RESERVATION_BLOCK_LENGTH (8)
Source code
#ifndef AWE_PLUGIN_LOADER_PRIVATE_H
#define AWE_PLUGIN_LOADER_PRIVATE_H
#include <stdint.h>
#include "AWEPluginLoader.h"
struct PluginListEntry
{
const AWEPlugin* plugin;
uint64_t path_digest;
void* handle;
uint32_t reference_count;
};
typedef struct PluginLoader
{
bool initialized;
awe_PluginLoaderMethods vt;
size_t used_count;
size_t reserved_count;
struct PluginListEntry* data;
} awe_PluginLoader;
#ifdef __cplusplus
extern "C" {
#endif
#if defined(AWE_PLUGIN_LOADER_PRIVATE_METHOD_ACCESS)
extern const struct awe_PluginLoaderPrivateMethodTable {
bool (*awe_PluginLoader_checkApiVersion)(const char*);
enum awe_PluginLoader_Status (*awe_PluginLoader_initWithState)(const awe_PluginLoader* const state);
void (*awe_PluginLoader_setMethods)(awe_PluginLoaderMethods* const base, const awe_PluginLoaderMethods* const override);
enum awe_PluginLoader_Status (*awe_PluginLoader_ensureReserved)(const size_t count);
enum awe_PluginLoader_Status (*awe_PluginLoader_sym)(void** address, void* handle, const char* name, const char* prefix);
} AWE_PLUGIN_LOADER_PRIVATE_METHOD_TABLE;
const awe_PluginLoader* awe_PluginLoader_getState();
#endif /* defined(AWE_PLUGIN_LOADER_PRIVATE_METHOD_ACCESS) */
// Controls how many entries get allocated each time the plugin list is resized.
#ifndef AWE_PLUGIN_LOADER_RESERVATION_BLOCK_LENGTH
#define AWE_PLUGIN_LOADER_RESERVATION_BLOCK_LENGTH (8)
#endif /* AWE_PLUGIN_LOADER_RESERVATION_BLOCK_LENGTH */
#ifdef __cplusplus
}
#endif
#endif /* AWE_PLUGIN_LOADER_PRIVATE_H */