summaryrefslogtreecommitdiff
path: root/src/core/modules.h
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2000-07-02 22:04:00 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2000-07-02 22:04:00 +0000
commit21999ae2058e7b9e24c45ab34d6a37c7f207f4c3 (patch)
tree57e47f40e8a0eb26a2d1e16457e400fcf281d425 /src/core/modules.h
parent4475a04841a2844260f56f7bec8d77b92fa5104a (diff)
downloadirssi-21999ae2058e7b9e24c45ab34d6a37c7f207f4c3.zip
Implemented runtime loadable modules. /LOAD loads a module, /UNLOAD
unloads it. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@420 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/core/modules.h')
-rw-r--r--src/core/modules.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/core/modules.h b/src/core/modules.h
index f175957b..6ced5387 100644
--- a/src/core/modules.h
+++ b/src/core/modules.h
@@ -1,6 +1,24 @@
#ifndef __MODULES_H
#define __MODULES_H
+enum {
+ MODULE_ERROR_ALREADY_LOADED,
+ MODULE_ERROR_LOAD,
+ MODULE_ERROR_INVALID
+};
+
+typedef struct {
+ char *name;
+ GModule *gmodule;
+} MODULE_REC;
+
+extern GSList *modules;
+
+MODULE_REC *module_find(const char *name);
+
+int module_load(const char *path);
+void module_unload(MODULE_REC *module);
+
#define MODULE_DATA_INIT(rec) \
(rec)->module_data = g_hash_table_new(g_str_hash, g_str_equal)