From cdc68bf7f775538bcc58ff85a14cf89fc6c8668e Mon Sep 17 00:00:00 2001
From: Jacopo Mondi <jacopo@jmondi.org>
Date: Wed, 23 Oct 2019 09:40:27 +0200
Subject: libcamera: controls: Store reference to the InfoMap
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Store a reference to the ControlInfoMap used to create a ControlList and
provide an operation to retrieve it. This will be used to implement
serialization of ControlList.

Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
---
 include/libcamera/controls.h | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'include')

diff --git a/include/libcamera/controls.h b/include/libcamera/controls.h
index d692e088..b1b73367 100644
--- a/include/libcamera/controls.h
+++ b/include/libcamera/controls.h
@@ -233,12 +233,16 @@ public:
 	const ControlValue &get(unsigned int id) const;
 	void set(unsigned int id, const ControlValue &value);
 
+	const ControlInfoMap *infoMap() const { return infoMap_; }
+
 private:
 	const ControlValue *find(unsigned int id) const;
 	ControlValue *find(unsigned int id);
 
 	ControlValidator *validator_;
 	const ControlIdMap *idmap_;
+	const ControlInfoMap *infoMap_;
+
 	ControlListMap controls_;
 };
 
-- 
cgit v1.2.1