From patchwork Fri Sep 27 02:44:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Niklas_S=C3=B6derlund?= X-Patchwork-Id: 2028 Return-Path: Received: from vsp-unauthed02.binero.net (vsp-unauthed02.binero.net [195.74.38.227]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 080C261919 for ; Fri, 27 Sep 2019 04:45:26 +0200 (CEST) X-Halon-ID: cd30da6a-e0d0-11e9-bdc3-005056917a89 Authorized-sender: niklas@soderlund.pp.se Received: from bismarck.berto.se (unknown [84.172.88.101]) by bin-vsp-out-01.atm.binero.net (Halon) with ESMTPA id cd30da6a-e0d0-11e9-bdc3-005056917a89; Fri, 27 Sep 2019 04:45:01 +0200 (CEST) From: =?utf-8?q?Niklas_S=C3=B6derlund?= To: libcamera-devel@lists.libcamera.org Date: Fri, 27 Sep 2019 04:44:08 +0200 Message-Id: <20190927024417.725906-5-niklas.soderlund@ragnatech.se> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190927024417.725906-1-niklas.soderlund@ragnatech.se> References: <20190927024417.725906-1-niklas.soderlund@ragnatech.se> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 04/13] libcamera: request: Allow read only access to controls 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, 27 Sep 2019 02:45:27 -0000 Allow the controls in a Request to be examined from a const environment. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart --- include/libcamera/request.h | 1 + src/libcamera/request.cpp | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/include/libcamera/request.h b/include/libcamera/request.h index 9edf1cedc054014f..5eb012e41b4a377b 100644 --- a/include/libcamera/request.h +++ b/include/libcamera/request.h @@ -37,6 +37,7 @@ public: ~Request(); ControlList &controls() { return controls_; } + const ControlList &controls() const { return controls_; } const std::map &buffers() const { return bufferMap_; } int addBuffer(std::unique_ptr buffer); Buffer *findBuffer(Stream *stream) const; diff --git a/src/libcamera/request.cpp b/src/libcamera/request.cpp index ee2158fc7a9cf0b9..ebae99b07c696512 100644 --- a/src/libcamera/request.cpp +++ b/src/libcamera/request.cpp @@ -84,6 +84,12 @@ Request::~Request() * \return A reference to the ControlList in this request */ +/** + * \fn Request::controls() const + * \brief Retrieve the request's ControlList + * \sa Request::controls() + */ + /** * \fn Request::buffers() * \brief Retrieve the request's streams to buffers map