summaryrefslogtreecommitdiff
path: root/src/ld-lua.h
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2010-10-27 20:49:21 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2010-10-27 20:49:21 +0200
commit9271ce11344f672564b50d90aa838ba1bb30c5d1 (patch)
tree4026571346122da971a4e45076547b59c438b624 /src/ld-lua.h
parent8b5fa9a49ac01ce604343c846d54acfd9de8802a (diff)
downloadlogdiag-9271ce11344f672564b50d90aa838ba1bb30c5d1.tar.gz
logdiag-9271ce11344f672564b50d90aa838ba1bb30c5d1.tar.xz
logdiag-9271ce11344f672564b50d90aa838ba1bb30c5d1.zip
Separate LdLua and LdSymbolCategory.
Originally, ld_lua_load_file_to_category() was adding registered symbols into a passed LdSymbolCategory object. This interface has been rewritten to be more generic by using callbacks to notify about new symbols.
Diffstat (limited to 'src/ld-lua.h')
-rw-r--r--src/ld-lua.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/ld-lua.h b/src/ld-lua.h
index ea00863..b207d66 100644
--- a/src/ld-lua.h
+++ b/src/ld-lua.h
@@ -46,12 +46,22 @@ struct _LdLuaClass
};
+/**
+ * LdLuaLoadCallback:
+ * @symbol: The symbol that has been created.
+ * @user_data: User data passed to ld_lua_load_file().
+ *
+ * A callback function that is called when a symbol is created.
+ */
+typedef void (*LdLuaLoadCallback) (LdSymbol *symbol, gpointer user_data);
+
+
GType ld_lua_get_type (void) G_GNUC_CONST;
LdLua *ld_lua_new (void);
gboolean ld_lua_check_file (LdLua *self, const gchar *filename);
-gboolean ld_lua_load_file_to_category (LdLua *self, const gchar *filename,
- LdSymbolCategory *category);
+gboolean ld_lua_load_file (LdLua *self, const gchar *filename,
+ LdLuaLoadCallback callback, gpointer user_data);
G_END_DECLS