summaryrefslogtreecommitdiff
path: root/src/ipa/libipa
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-04-27 02:36:18 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-04-28 01:54:49 +0300
commita6de9030893753e5428ee912fe7c52fbf93febd1 (patch)
treee82996e2e87c464919808663c443a3dcb99ea887 /src/ipa/libipa
parent26a4b03ed85e0cc39939028964ae4a8961c05d02 (diff)
ipa: Pass IPA initialization settings to IPAInterface::init()
Add a new IPASettings class to pass IPA initialization settings through the IPAInterface::init() method. The settings currently only contain the name of a configuration file, and are expected to be extended later. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src/ipa/libipa')
-rw-r--r--src/ipa/libipa/ipa_interface_wrapper.cpp8
-rw-r--r--src/ipa/libipa/ipa_interface_wrapper.h3
2 files changed, 8 insertions, 3 deletions
diff --git a/src/ipa/libipa/ipa_interface_wrapper.cpp b/src/ipa/libipa/ipa_interface_wrapper.cpp
index f50f93a0..9596cb20 100644
--- a/src/ipa/libipa/ipa_interface_wrapper.cpp
+++ b/src/ipa/libipa/ipa_interface_wrapper.cpp
@@ -79,11 +79,15 @@ void *IPAInterfaceWrapper::get_interface(struct ipa_context *_ctx)
return ctx->ipa_.get();
}
-void IPAInterfaceWrapper::init(struct ipa_context *_ctx)
+void IPAInterfaceWrapper::init(struct ipa_context *_ctx,
+ const struct ipa_settings *settings)
{
IPAInterfaceWrapper *ctx = static_cast<IPAInterfaceWrapper *>(_ctx);
- ctx->ipa_->init();
+ IPASettings ipaSettings{
+ .configurationFile = settings->configuration_file
+ };
+ ctx->ipa_->init(ipaSettings);
}
int IPAInterfaceWrapper::start(struct ipa_context *_ctx)
diff --git a/src/ipa/libipa/ipa_interface_wrapper.h b/src/ipa/libipa/ipa_interface_wrapper.h
index e4bc6dd4..78ccf0f5 100644
--- a/src/ipa/libipa/ipa_interface_wrapper.h
+++ b/src/ipa/libipa/ipa_interface_wrapper.h
@@ -23,7 +23,8 @@ public:
private:
static void destroy(struct ipa_context *ctx);
static void *get_interface(struct ipa_context *ctx);
- static void init(struct ipa_context *ctx);
+ static void init(struct ipa_context *ctx,
+ const struct ipa_settings *settings);
static int start(struct ipa_context *ctx);
static void stop(struct ipa_context *ctx);
static void register_callbacks(struct ipa_context *ctx,