diff options
| author | info@mode42.com <info@mode42.com> | 2026-08-08 03:54:55 +0000 |
|---|---|---|
| committer | info@mode42.com <info@mode42.com> | 2026-08-08 03:54:55 +0000 |
| commit | 20cb29c2f8c5c87bc590896854a20b1473ceb358 (patch) | |
| tree | 2857f41513a56ad41af97b57362639298aa7f033 /include/hybbx/registry.h | |
#2
Diffstat (limited to 'include/hybbx/registry.h')
| -rw-r--r-- | include/hybbx/registry.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/include/hybbx/registry.h b/include/hybbx/registry.h new file mode 100644 index 0000000..51577ee --- /dev/null +++ b/include/hybbx/registry.h @@ -0,0 +1,28 @@ +#ifndef HYBBX_REGISTRY_H +#define HYBBX_REGISTRY_H + +#include "hybbx/plugin.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** Register a transport plugin (called at plugin init time). */ +hybbx_result_t hybbx_registry_register(const hybbx_transport_plugin_t *plugin); + +/** Unregister a transport plugin by name. */ +hybbx_result_t hybbx_registry_unregister(const char *name); + +/** Look up a registered plugin by name. Returns NULL if not found. */ +const hybbx_transport_plugin_t *hybbx_registry_find(const char *name); + +/** Iterate over all registered plugins. */ +typedef void (*hybbx_registry_iter_fn)(const hybbx_transport_plugin_t *plugin, + void *userdata); +void hybbx_registry_foreach(hybbx_registry_iter_fn fn, void *userdata); + +#ifdef __cplusplus +} +#endif + +#endif /* HYBBX_REGISTRY_H */ |
