diff options
author | Přemysl Janouch <p.janouch@gmail.com> | 2014-09-23 22:59:01 +0200 |
---|---|---|
committer | Přemysl Janouch <p.janouch@gmail.com> | 2014-09-23 22:59:01 +0200 |
commit | 1f9f9b9a395351fd2b001c24ffe89c546723763d (patch) | |
tree | d688869ae29c20c2e5deb72f4e35dd9d6233cb37 /plugin-api.h | |
parent | f9d6627456e8232fe7a2ae1283347236aa2b34df (diff) | |
download | ponymap-1f9f9b9a395351fd2b001c24ffe89c546723763d.tar.gz ponymap-1f9f9b9a395351fd2b001c24ffe89c546723763d.tar.xz ponymap-1f9f9b9a395351fd2b001c24ffe89c546723763d.zip |
Simplify the plugin API
Diffstat (limited to 'plugin-api.h')
-rw-r--r-- | plugin-api.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/plugin-api.h b/plugin-api.h index fa67695..f74b069 100644 --- a/plugin-api.h +++ b/plugin-api.h @@ -47,22 +47,19 @@ struct service /// Destroy the handle created for the scan void (*scan_free) (void *handle); - // XXX: maybe force the service to store a reference to the unit? - /// We have received some data from the peer - // FIXME: the dependency on `struct str' is not very good - void (*on_data) (void *handle, struct unit *u, struct str *data); + void (*on_data) (void *handle, const void *data, size_t len); /// Server has closed the connection - void (*on_eof) (void *handle, struct unit *u); + void (*on_eof) (void *handle); // XXX: do we need these at all? Is there any use for them? /// Network or other error has occured - void (*on_error) (void *handle, struct unit *u); + void (*on_error) (void *handle); /// The scan has been aborted - void (*on_aborted) (void *handle, struct unit *u); + void (*on_aborted) (void *handle); }; struct plugin_api |