libcamera: global_configuration: Drop Option type

The GlobalConfiguration::Option type was introduced to decouple the
configuration option storage from its users, and make changes to the
underlying implementation easier. While the type could indeed be changed
to map to a different class, the API would need to remain the same. The
Option type therefore brings little value. Drop it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Reviewed-by: Isaac Scott <isaac.scott@ideasonboard.com>
This commit is contained in:
Laurent Pinchart
2026-03-24 18:52:10 +02:00
parent 24c965a234
commit 0ef232b486
3 changed files with 4 additions and 17 deletions

View File

@@ -55,14 +55,6 @@ LOG_DEFINE_CATEGORY(Configuration)
* options, or configuration() to access the whole configuration.
*/
/**
* \typedef GlobalConfiguration::Option
* \brief Type representing a configuration option
*
* All code outside GlobalConfiguration must use this type declaration and not
* the underlying type.
*/
/**
* \brief Initialize the global configuration
*/
@@ -153,12 +145,9 @@ unsigned int GlobalConfiguration::version() const
* The requested part of the configuration can be accessed using \a ValueNode
* methods.
*
* \note \a ValueNode type itself shouldn't be used in type declarations to
* avoid trouble if we decide to change the underlying data objects in future.
*
* \return The top-level configuration option
* \return The global configuration
*/
GlobalConfiguration::Option GlobalConfiguration::configuration() const
const ValueNode &GlobalConfiguration::configuration() const
{
return (*configuration_)["configuration"];
}

View File

@@ -1880,7 +1880,7 @@ bool SimplePipelineHandler::matchDevice(std::shared_ptr<MediaDevice> media,
swIspEnabled_ = info.swIspEnabled;
const GlobalConfiguration &configuration = cameraManager()->_d()->configuration();
for (GlobalConfiguration::Option entry :
for (const ValueNode &entry :
configuration.configuration()["pipelines"]["simple"]["supported_devices"]
.asList()) {
auto name = entry["driver"].get<std::string>();