aboutsummaryrefslogtreecommitdiff
path: root/plugins.h
diff options
context:
space:
mode:
authorTrumeet <yuuta@yuuta.moe>2021-07-08 21:20:11 -0700
committerTrumeet <yuuta@yuuta.moe>2021-07-08 21:20:11 -0700
commit097ddb404f2a67398821c6a27f24db5cb939b79d (patch)
treefd3f9325e8c33ada2aefcebf645f73425f38af12 /plugins.h
parent2fe493287c572ea988d6e79981f1fba02891a01f (diff)
downloadextmc-097ddb404f2a67398821c6a27f24db5cb939b79d.tar
extmc-097ddb404f2a67398821c6a27f24db5cb939b79d.tar.gz
extmc-097ddb404f2a67398821c6a27f24db5cb939b79d.tar.bz2
extmc-097ddb404f2a67398821c6a27f24db5cb939b79d.zip
feat: require a string unique ID as plugin identificationHEADmaster
This greatly simplifies the management of plugins, but no longer supports loading the same plugin twice.
Diffstat (limited to 'plugins.h')
-rw-r--r--plugins.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins.h b/plugins.h
index 64ab0bb..6ce4707 100644
--- a/plugins.h
+++ b/plugins.h
@@ -13,7 +13,7 @@ struct plugin_call_job_args {
};
struct plugin {
- int id;
+ const char *id;
const char *path;
void *handle;
char *name;
@@ -32,7 +32,9 @@ struct plugin {
int (*fc_server_started)(struct epg_handle *, char *);
};
-int plugin_load(int stderr_fd, const char *path, const int id, struct plugin *out);
-int plugin_unload(int stderr_fd, struct plugin *plugin);
+int plugin_load_meta(int stderr_fd, const char *path, struct plugin *out);
+int plugin_load(int stderr_fd, const struct plugin *plugin);
+int plugin_unload_meta(int stderr_fd, struct plugin *plugin);
+int plugin_unload(int stderr_fd, const struct plugin *plugin);
#endif // _PLUGINS_H