AWE Core OS 8.B.22 Documentation
AWEPluginLoaderPrivate.h
1#ifndef AWE_PLUGIN_LOADER_PRIVATE_H
2#define AWE_PLUGIN_LOADER_PRIVATE_H
3
4#include "AWEPluginLoader.h"
5
7{
8 const AWEPlugin* plugin;
9 const char* path;
10 void* handle;
11 uint32_t reference_count;
12};
13
14typedef struct PluginLoader
15{
16 bool initialized;
18 size_t used_count;
19 size_t reserved_count;
20 struct PluginListEntry* data;
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27#if defined(AWE_PLUGIN_LOADER_PRIVATE_METHOD_ACCESS)
28extern const struct awe_PluginLoaderPrivateMethodTable {
29 bool (*awe_PluginLoader_checkApiVersion)(const char*);
30 enum awe_PluginLoader_Status (*awe_PluginLoader_initWithState)(const awe_PluginLoader* const state);
31 void (*awe_PluginLoader_setMethods)(awe_PluginLoaderMethods* const base, const awe_PluginLoaderMethods* const override);
32 enum awe_PluginLoader_Status (*awe_PluginLoader_ensureReserved)(const size_t count);
33 enum awe_PluginLoader_Status (*awe_PluginLoader_sym)(void** address, void* handle, const char* name, const char* prefix);
34} AWE_PLUGIN_LOADER_PRIVATE_METHOD_TABLE;
35
36const awe_PluginLoader* awe_PluginLoader_getState();
37#endif /* defined(AWE_PLUGIN_LOADER_PRIVATE_METHOD_ACCESS) */
38
39// Controls how many entries get allocated each time the plugin list is resized.
40#ifndef AWE_PLUGIN_LOADER_RESERVATION_BLOCK_LENGTH
41#define AWE_PLUGIN_LOADER_RESERVATION_BLOCK_LENGTH (8)
42#endif /* AWE_PLUGIN_LOADER_RESERVATION_BLOCK_LENGTH */
43
44#ifdef __cplusplus
45}
46#endif
47
48#endif /* AWE_PLUGIN_LOADER_PRIVATE_H */
awe_PluginLoader_Status
Possible statuses which may be returned by plugin loader API functions.
Definition: AWEPluginLoader.h:68
Method table to provide overrides to awe_PluginLoader_initWithMethods.
Definition: AWEPluginLoader.h:54
Definition: AWEPluginLoaderPrivate.h:7
Definition: AWEPluginLoaderPrivate.h:15
A struct encapsulating the functionality which can be provided by a plugin library.
Definition: AWEPluginTypes.h:81