AWE Core OS 8.B.22 Documentation
AWEPluginTypes.h
Go to the documentation of this file.
1/*******************************************************************************
2*
3* AudioWeaver Plugins
4* -------------------
5*
6********************************************************************************
7* AWEPluginTypes.h
8********************************************************************************
9*
10* Description: Common types used by the plugin loader and plugin
11* implementations.
12*
13* Copyright: (c) 2025 DSP Concepts, Inc. All rights reserved.
14* 3235 Kifer Road
15* Santa Clara, CA 95054
16*
17*******************************************************************************/
18
28#ifndef AWE_PLUGIN_TYPES_H
29#define AWE_PLUGIN_TYPES_H
30
31#include <stdbool.h>
32#include <stddef.h>
33#include <stdint.h>
34
45#define AWE_PLUGIN_API_VERSION_MAX_LENGTH 63
46
52#define AWE_PLUGIN_API_VERSION "1"
53
58{
64 size_t count;
65
71 const void * const * array;
73
80typedef struct _AWEPlugin
81{
87 const char* apiVersion;
88
94 const char* pluginVersion;
95
101 const char* name;
102
107
114 void (*cleanup)(const struct _AWEPlugin*);
116
126{
127 bool (*checkApiVersion)(const char* version);
128 void* (*malloc)(size_t size);
129 void* (*realloc)(void* ptr, size_t size);
130 void (*free)(void* ptr);
131 void (*log)(int32_t level, uint32_t type, const char* fmt, ...);
133
136#endif /* AWE_PLUGIN_TYPES_H */
struct _AWEPluginModuleArray AWEPluginModuleArray
A list of module classes provided by a plugin.
struct _awe_PluginCallbacks awe_PluginCallbacks
Callbacks passed by the loader to each plugin entrypoint.
struct _AWEPlugin AWEPlugin
A struct encapsulating the functionality which can be provided by a plugin library.
A list of module classes provided by a plugin.
Definition: AWEPluginTypes.h:58
const void *const * array
Pointer to a contiguous array of module class pointers with count elements.
Definition: AWEPluginTypes.h:71
size_t count
Number of module classes in the array.
Definition: AWEPluginTypes.h:64
A struct encapsulating the functionality which can be provided by a plugin library.
Definition: AWEPluginTypes.h:81
AWEPluginModuleArray modules
List of module classes provided by the plugin.
Definition: AWEPluginTypes.h:106
const char * name
Optional plugin name.
Definition: AWEPluginTypes.h:101
const char * pluginVersion
Optional plugin version.
Definition: AWEPluginTypes.h:94
void(* cleanup)(const struct _AWEPlugin *)
Optional destructor.
Definition: AWEPluginTypes.h:114
const char * apiVersion
API version that this plugin was built with.
Definition: AWEPluginTypes.h:87
Callbacks passed by the loader to each plugin entrypoint.
Definition: AWEPluginTypes.h:126
bool(* checkApiVersion)(const char *version)
Used to verify compatibility with the loader's API version.
Definition: AWEPluginTypes.h:127
void(* free)(void *ptr)
Free dynamic memory.
Definition: AWEPluginTypes.h:130