summaryrefslogtreecommitdiff
path: root/rpmio/rpmhook.h
diff options
context:
space:
mode:
authorniemeyer <devnull@localhost>2004-04-18 18:30:21 +0000
committerniemeyer <devnull@localhost>2004-04-18 18:30:21 +0000
commita19d5569cdbeb72780e7ea694bbf7d31538aaa1c (patch)
treef93e29bf59370b5ac4888fc9ebd0fc3cda809309 /rpmio/rpmhook.h
parente0c6886a5478c9e1b1721312973c49758ad171b4 (diff)
downloadlibrpm-tizen-a19d5569cdbeb72780e7ea694bbf7d31538aaa1c.tar.gz
librpm-tizen-a19d5569cdbeb72780e7ea694bbf7d31538aaa1c.tar.bz2
librpm-tizen-a19d5569cdbeb72780e7ea694bbf7d31538aaa1c.zip
Implemented external interface for the hooking system, and
included in rpm context. CVS patchset: 7238 CVS date: 2004/04/18 18:30:21
Diffstat (limited to 'rpmio/rpmhook.h')
-rw-r--r--rpmio/rpmhook.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/rpmio/rpmhook.h b/rpmio/rpmhook.h
new file mode 100644
index 000000000..b80f496e0
--- /dev/null
+++ b/rpmio/rpmhook.h
@@ -0,0 +1,28 @@
+#ifndef RPMHOOK_H
+#define RPMHOOK_H
+
+typedef union {
+ char *s;
+ int i;
+ float f;
+ void *p;
+} rpmhookArgv;
+
+typedef struct rpmhookArgs_s {
+ int argc;
+ const char *argt;
+ rpmhookArgv argv[1];
+} * rpmhookArgs;
+
+typedef int (*rpmhookFunc)(rpmhookArgs args, void *data);
+
+void rpmhookRegister(const char *name, rpmhookFunc func, void *data);
+void rpmhookUnregister(const char *name, rpmhookFunc func, void *data);
+void rpmhookUnregisterAny(const char *name, rpmhookFunc func);
+void rpmhookUnregisterAll(const char *name);
+void rpmhookCall(const char *name, const char *argt, ...);
+
+#endif
+
+/* vim:ts=4:sw=4:et
+ */