summaryrefslogtreecommitdiffstats
path: root/discover/device-handler.h
diff options
context:
space:
mode:
authorSamuel Mendoza-Jonas <sam@mendozajonas.com>2017-02-01 16:11:43 +1100
committerSamuel Mendoza-Jonas <sam@mendozajonas.com>2017-08-15 13:03:28 +1000
commitff7293bba1fd4cdf54bb90bd1b7a38dd393fee69 (patch)
tree39c5d79e99c48d577ed9f8a26114b2d8407cfe9e /discover/device-handler.h
parent9f191cc3c194ed51534c22e2dae15b2c08c8abc2 (diff)
downloadtalos-petitboot-ff7293bba1fd4cdf54bb90bd1b7a38dd393fee69.tar.gz
talos-petitboot-ff7293bba1fd4cdf54bb90bd1b7a38dd393fee69.zip
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 <sam@mendozajonas.com>
Diffstat (limited to 'discover/device-handler.h')
-rw-r--r--discover/device-handler.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/discover/device-handler.h b/discover/device-handler.h
index 133eff3..c1bbe7d 100644
--- a/discover/device-handler.h
+++ b/discover/device-handler.h
@@ -80,6 +80,9 @@ void device_handler_destroy(struct device_handler *devices);
int device_handler_get_device_count(const struct device_handler *handler);
const struct discover_device *device_handler_get_device(
const struct device_handler *handler, unsigned int index);
+int device_handler_get_plugin_count(const struct device_handler *handler);
+const struct plugin_option *device_handler_get_plugin(
+ const struct device_handler *handler, unsigned int index);
struct network *device_handler_get_network(
const struct device_handler *handler);
@@ -126,6 +129,8 @@ struct discover_boot_option *discover_boot_option_create(
struct discover_device *dev);
void discover_context_add_boot_option(struct discover_context *ctx,
struct discover_boot_option *opt);
+void device_handler_add_plugin_option(struct device_handler *handler,
+ struct plugin_option *opt);
int device_handler_user_event(struct device_handler *handler,
struct event *event);
OpenPOWER on IntegriCloud