5 static const CLAP_CONSTEXPR
char CLAP_PLUGIN_FACTORY_ID
[] = "clap.plugin-factory";
11 // Every method must be thread-safe.
12 // It is very important to be able to scan the plugin as quickly as possible.
14 // If the content of the factory may change due to external events, like the user installed
15 typedef struct clap_plugin_factory
{
16 // Get the number of plugins available.
18 uint32_t (CLAP_ABI
*get_plugin_count
)(const struct clap_plugin_factory
*factory
);
20 // Retrieves a plugin descriptor by its index.
21 // Returns null in case of error.
22 // The descriptor must not be freed.
24 const clap_plugin_descriptor_t
*(CLAP_ABI
*get_plugin_descriptor
)(
25 const struct clap_plugin_factory
*factory
, uint32_t index
);
27 // Create a clap_plugin by its plugin_id.
28 // The returned pointer must be freed by calling plugin->destroy(plugin);
29 // The plugin is not allowed to use the host callbacks in the create method.
30 // Returns null in case of error.
32 const clap_plugin_t
*(CLAP_ABI
*create_plugin
)(const struct clap_plugin_factory
*factory
,
33 const clap_host_t
*host
,
34 const char *plugin_id
);
35 } clap_plugin_factory_t
;