summaryrefslogtreecommitdiff
path: root/include/hybbx/registry.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/hybbx/registry.h')
-rw-r--r--include/hybbx/registry.h28
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 */
git clone -b <branch> https://cgit.mode42.com/<repo>.git
git clone -b <branch> git://cgit.mode42.com/<repo>.git

info@mode42.com