From patchwork Fri Nov 8 20:53:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 2304 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 2BA5F61520 for ; Fri, 8 Nov 2019 21:54:25 +0100 (CET) Received: from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi [81.175.216.236]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id BFC2871D for ; Fri, 8 Nov 2019 21:54:24 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1573246464; bh=U8IClzdsfFjEIH8l0jtC+GTgMg6JFpnH1Wr0kAPKv20=; h=From:To:Subject:Date:In-Reply-To:References:From; b=oLQvp+cjHFlXEteUUFvrZlqJCWJ0w8m5wnqiSrAWl4x6tuzCRHIqDmmZkbg+5ToxG Px5FepcPuzyJW2Ib+PEKpS7ORpBo4AkeFszxL867dPWHp3DZefU0/BVyGh7D/p4Wae ewzXpx0NWxGSUWJA2iS60x0Er4aSlEZzOEFq5ASo= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Fri, 8 Nov 2019 22:53:53 +0200 Message-Id: <20191108205409.18845-9-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191108205409.18845-1-laurent.pinchart@ideasonboard.com> References: <20191108205409.18845-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 08/24] libcamera: controls: Make ControList constructor public X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Nov 2019 20:54:26 -0000 We need to construct empty ControlList objects to serialization. Make the constructor public. Signed-off-by: Laurent Pinchart Reviewed-by: Niklas Söderlund Reviewed-by: Jacopo Mondi --- include/libcamera/controls.h | 1 + src/libcamera/controls.cpp | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/include/libcamera/controls.h b/include/libcamera/controls.h index 6bad36cbc369..b35e006bc046 100644 --- a/include/libcamera/controls.h +++ b/include/libcamera/controls.h @@ -188,6 +188,7 @@ private: using ControlListMap = std::unordered_map; public: + ControlList(); ControlList(const ControlIdMap &idmap, ControlValidator *validator = nullptr); ControlList(const ControlInfoMap &info, ControlValidator *validator = nullptr); diff --git a/src/libcamera/controls.cpp b/src/libcamera/controls.cpp index ae6ca2a7cf7e..178ce3d99bce 100644 --- a/src/libcamera/controls.cpp +++ b/src/libcamera/controls.cpp @@ -588,6 +588,17 @@ void ControlInfoMap::generateIdmap() * controls. */ +/** + * \brief Construct a ControlList not associated with any object + * + * This constructor is meant to support ControlList serialization and shall not + * be used directly by application. + */ +ControlList::ControlList() + : validator_(nullptr), idmap_(nullptr) +{ +} + /** * \brief Construct a ControlList with an optional control validator * \param[in] idmap The ControlId map for the control list target object