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