From ff7293bba1fd4cdf54bb90bd1b7a38dd393fee69 Mon Sep 17 00:00:00 2001 From: Samuel Mendoza-Jonas Date: Wed, 1 Feb 2017 16:11:43 +1100 Subject: discover: Handle and track plugin_options Track plugin_options in the device_handler. Plugins can be added with device_handler_add_plugin_option() and accessed via device_handler_get_plugin(). Extend discover_server to support the new 'add' and 'remove' pb-protocol actions and advertise new plugins to connecting clients. Signed-off-by: Samuel Mendoza-Jonas --- test/parser/Makefile.am | 1 + test/parser/handler.c | 6 ++++++ test/parser/user-event.c | 13 +++++++++++++ 3 files changed, 20 insertions(+) create mode 100644 test/parser/user-event.c (limited to 'test') diff --git a/test/parser/Makefile.am b/test/parser/Makefile.am index 9a6be6d..fa644fe 100644 --- a/test/parser/Makefile.am +++ b/test/parser/Makefile.am @@ -100,6 +100,7 @@ test_parser_libtest_ro_SOURCES = \ test/parser/utils.c \ test/parser/handler.c \ test/parser/network.c \ + test/parser/user-event.c \ test/parser/parser-test.h \ discover/yaboot-parser.c \ discover/kboot-parser.c \ diff --git a/test/parser/handler.c b/test/parser/handler.c index e455c22..a9856b4 100644 --- a/test/parser/handler.c +++ b/test/parser/handler.c @@ -7,6 +7,7 @@ #include "device-handler.h" struct network; +struct client; typedef void (*boot_status_fn)(void *arg, struct status *); @@ -110,3 +111,8 @@ void pending_network_jobs_start(void) void pending_network_jobs_cancel(void) { } + +void discover_server_notify_plugins_remove(struct discover_server *server) +{ + (void)server; +} diff --git a/test/parser/user-event.c b/test/parser/user-event.c new file mode 100644 index 0000000..43d15b7 --- /dev/null +++ b/test/parser/user-event.c @@ -0,0 +1,13 @@ + +#include + +#include + +struct device_handler; + +void device_handler_add_plugin_option(struct device_handler *handler, + struct plugin_option *opt) +{ + (void)handler; + (void)opt; +} -- cgit v1.2.1