{"id":2929,"url":"https://patchwork.libcamera.org/api/1.1/patches/2929/?format=json","web_url":"https://patchwork.libcamera.org/patch/2929/","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":"<20200229164254.23604-12-laurent.pinchart@ideasonboard.com>","date":"2020-02-29T16:42:34","name":"[libcamera-devel,11/31] libcamera: controls: Add templates to convert a type T to a ControlType","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"e97aa5467e82737073f3c2d98902095d118520e7","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/2929/mbox/","series":[{"id":696,"url":"https://patchwork.libcamera.org/api/1.1/series/696/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=696","date":"2020-02-29T16:42:23","name":"libcamera: Add support for array controls","version":1,"mbox":"https://patchwork.libcamera.org/series/696/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/2929/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/2929/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 07E1262789\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 29 Feb 2020 17:43:26 +0100 (CET)","from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id A507033E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 29 Feb 2020 17:43:25 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1582994605;\n\tbh=9jDC8xaUozZIOtVPQBHRJ+FMhjCUXQ/Or5ur1AT8m00=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=rj1pLBXGfSwrVHuwPPORyHNJkvsw/zmC0emi0xQ5HAUEefdAPcPbBjSIHKhggSRdL\n\tHo/qt8EWvZ+SSB+pI17srV0QsnsZb1zBe6rifhFBHL3dp54f5Yi/3wROIY0AT0yV1r\n\t8QYzl3jlw6bAkW+15Lz/PFdY2VYPURRMvBLc+ay4=","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Sat, 29 Feb 2020 18:42:34 +0200","Message-Id":"<20200229164254.23604-12-laurent.pinchart@ideasonboard.com>","X-Mailer":"git-send-email 2.24.1","In-Reply-To":"<20200229164254.23604-1-laurent.pinchart@ideasonboard.com>","References":"<20200229164254.23604-1-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH 11/31] libcamera: controls: Add templates\n\tto convert a type T to a ControlType","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":"Sat, 29 Feb 2020 16:43:26 -0000"},"content":"This will be used to implement ControlValue::get() and set() as template\nfunctions.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n Documentation/Doxyfile.in    |  2 +-\n include/libcamera/controls.h | 28 ++++++++++++++++++++++++++++\n 2 files changed, 29 insertions(+), 1 deletion(-)","diff":"diff --git a/Documentation/Doxyfile.in b/Documentation/Doxyfile.in\nindex 457e23a086a2..430d80d5f21b 100644\n--- a/Documentation/Doxyfile.in\n+++ b/Documentation/Doxyfile.in\n@@ -882,7 +882,7 @@ EXCLUDE_SYMBOLS        = libcamera::BoundMethodArgs \\\n                          libcamera::BoundMethodStatic \\\n                          libcamera::SignalBase \\\n                          libcamera::*::Private \\\n-                         libcamera::*::details::* \\\n+                         *::details::* \\\n                          std::*\n \n # The EXAMPLE_PATH tag can be used to specify one or more files or directories\ndiff --git a/include/libcamera/controls.h b/include/libcamera/controls.h\nindex 3b6b231c7c64..429f01b0fd24 100644\n--- a/include/libcamera/controls.h\n+++ b/include/libcamera/controls.h\n@@ -22,6 +22,34 @@ enum ControlType {\n \tControlTypeInteger64,\n };\n \n+namespace details {\n+\n+template<typename T>\n+struct control_type {\n+};\n+\n+template<>\n+struct control_type<void> {\n+\tstatic constexpr ControlType value = ControlTypeNone;\n+};\n+\n+template<>\n+struct control_type<bool> {\n+\tstatic constexpr ControlType value = ControlTypeBool;\n+};\n+\n+template<>\n+struct control_type<int32_t> {\n+\tstatic constexpr ControlType value = ControlTypeInteger32;\n+};\n+\n+template<>\n+struct control_type<int64_t> {\n+\tstatic constexpr ControlType value = ControlTypeInteger64;\n+};\n+\n+} /* namespace details */\n+\n class ControlValue\n {\n public:\n","prefixes":["libcamera-devel","11/31"]}