{"id":2132,"url":"https://patchwork.libcamera.org/api/1.1/patches/2132/?format=json","web_url":"https://patchwork.libcamera.org/patch/2132/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20191007224642.6597-5-laurent.pinchart@ideasonboard.com>","date":"2019-10-07T22:46:37","name":"[libcamera-devel,4/9] libcamera: controls: Make ControlList::find() protected","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"fb87ac9bef0de93ae6dbfa69b7782b867663a1bd","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/1.1/people/2/?format=json","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/2132/mbox/","series":[{"id":526,"url":"https://patchwork.libcamera.org/api/1.1/series/526/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=526","date":"2019-10-07T22:46:33","name":"Use ControlList for both libcamera and V4L2 controls","version":1,"mbox":"https://patchwork.libcamera.org/series/526/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/2132/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/2132/checks/","tags":{},"headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B97B561974\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  8 Oct 2019 00:46:54 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(modemcable118.64-20-96.mc.videotron.ca [96.20.64.118])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id E33C3B2E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  8 Oct 2019 00:46:53 +0200 (CEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1570488414;\n\tbh=eGDT+p+P9eWFHXkhfzy2lRVTXwioER1osC4I4X7MPno=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=DHRnc7pAW25Wlz3CuQBVTSLknOclkgbfJNP+jYebBvUp51GD3xBfMf1WRXRQDD1Q5\n\td/lUJwGCNGBUqGehQcGn190oSjcnxRg0dRDwDNoYFtpYYeQBJDPb8woX8wIjapYnGy\n\t2yDhHxLTMWhv3DolFqTPtiNpdEuIq9CKg3BFxKws=","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Tue,  8 Oct 2019 01:46:37 +0300","Message-Id":"<20191007224642.6597-5-laurent.pinchart@ideasonboard.com>","X-Mailer":"git-send-email 2.21.0","In-Reply-To":"<20191007224642.6597-1-laurent.pinchart@ideasonboard.com>","References":"<20191007224642.6597-1-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH 4/9] libcamera: controls: Make\n\tControlList::find() protected","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Mon, 07 Oct 2019 22:46:55 -0000"},"content":"To prepare for\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n include/libcamera/controls.h |  3 ++-\n src/libcamera/controls.cpp   | 14 ++++++++++++++\n 2 files changed, 16 insertions(+), 1 deletion(-)","diff":"diff --git a/include/libcamera/controls.h b/include/libcamera/controls.h\nindex a5a6a135ec16..fc33f0762138 100644\n--- a/include/libcamera/controls.h\n+++ b/include/libcamera/controls.h\n@@ -159,10 +159,11 @@ public:\n \tconst ControlValue &get(const ControlId &id) const;\n \tvoid set(const ControlId &id, const ControlValue &value);\n \n-private:\n+protected:\n \tconst ControlValue *find(const ControlId &id) const;\n \tControlValue *find(const ControlId &id);\n \n+private:\n \tControlValidator *validator_;\n \tControlListMap controls_;\n };\ndiff --git a/src/libcamera/controls.cpp b/src/libcamera/controls.cpp\nindex e528dd80a2a7..afea09d6d7d7 100644\n--- a/src/libcamera/controls.cpp\n+++ b/src/libcamera/controls.cpp\n@@ -515,6 +515,13 @@ void ControlList::set(const ControlId &id, const ControlValue &value)\n \t*val = value;\n }\n \n+/**\n+ * \\brief Find a control in the list\n+ * \\param[in] id The control ID\n+ *\n+ * \\return The control value for the control \\a id, or nullptr if no such\n+ * control exists in the list\n+ */\n const ControlValue *ControlList::find(const ControlId &id) const\n {\n \tconst auto iter = controls_.find(&id);\n@@ -528,6 +535,13 @@ const ControlValue *ControlList::find(const ControlId &id) const\n \treturn &iter->second;\n }\n \n+/**\n+ * \\brief Find a control in the list\n+ * \\param[in] id The control ID\n+ *\n+ * \\return The control value for the control \\a id, or nullptr if no such\n+ * control exists in the list\n+ */\n ControlValue *ControlList::find(const ControlId &id)\n {\n \tif (validator_ && !validator_->validate(id)) {\n","prefixes":["libcamera-devel","4/9"]}