[{"id":2605,"web_url":"https://patchwork.libcamera.org/comment/2605/","msgid":"<20190904183516.GI5433@pendragon.ideasonboard.com>","date":"2019-09-04T18:35:16","subject":"Re: [libcamera-devel] [PATCH v2 09/14] libcamera: request: Allow\n\tread only access to controls","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Niklas,\n\nThank you for the patch.\n\nOn Fri, Aug 30, 2019 at 01:26:48AM +0200, Niklas Söderlund wrote:\n> Allow the controls in a Request to be examined from a const\n> environment.\n> \n> Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> ---\n>  include/libcamera/request.h | 1 +\n>  src/libcamera/request.cpp   | 5 +++++\n>  2 files changed, 6 insertions(+)\n> \n> diff --git a/include/libcamera/request.h b/include/libcamera/request.h\n> index 570924c5ef5e2425..f5de5257bba3f2bb 100644\n> --- a/include/libcamera/request.h\n> +++ b/include/libcamera/request.h\n> @@ -40,6 +40,7 @@ public:\n>  \t~Request();\n>  \n>  \tControlList &controls() { return controls_; }\n> +\tconst ControlList &controls() const { return controls_; }\n>  \tconst std::map<Stream *, Buffer *> &buffers() const { return bufferMap_; }\n>  \tint addBuffer(std::unique_ptr<Buffer> buffer);\n>  \tBuffer *findBuffer(Stream *stream) const;\n> diff --git a/src/libcamera/request.cpp b/src/libcamera/request.cpp\n> index b8b4dfb4b7549163..bdb4f908fb664ccf 100644\n> --- a/src/libcamera/request.cpp\n> +++ b/src/libcamera/request.cpp\n> @@ -84,6 +84,11 @@ Request::~Request()\n>   * \\return A reference to the ControlList in this request\n>   */\n>  \n> +/**\n> + * \\fn Request::controls() const\n> + * \\sa Request::controls()\n> + */\n> +\n>  /**\n>   * \\fn Request::buffers()\n>   * \\brief Retrieve the request's streams to buffers map","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 AD3F560BB2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  4 Sep 2019 20:35:22 +0200 (CEST)","from pendragon.ideasonboard.com (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 4158D440;\n\tWed,  4 Sep 2019 20:35:22 +0200 (CEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1567622122;\n\tbh=UYm/3jCxiUf6A7rZh5K2LSFEQJcg2cI5Cppocs5zL7M=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=iu+BAMRChXfd5E95rr87dh7OKoYr5JwpzS4PILTGIki/uWM/ptXCfCoXKtArCL463\n\tcUHdqgZCJN8bmeTBBfa3tDkuT+d8RVgrGEsa/aoweS+zdwWwbu84y9AdxA+CmQ8CZy\n\tH1eq6A9VdbCxU0zYxPPwMlE8XZyiCJN1Qg7YgbKg=","Date":"Wed, 4 Sep 2019 21:35:16 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Niklas =?utf-8?q?S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20190904183516.GI5433@pendragon.ideasonboard.com>","References":"<20190829232653.13214-1-niklas.soderlund@ragnatech.se>\n\t<20190829232653.13214-10-niklas.soderlund@ragnatech.se>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20190829232653.13214-10-niklas.soderlund@ragnatech.se>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH v2 09/14] libcamera: request: Allow\n\tread only access to controls","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.23","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":"Wed, 04 Sep 2019 18:35:22 -0000"}},{"id":2606,"web_url":"https://patchwork.libcamera.org/comment/2606/","msgid":"<20190904183810.GJ5433@pendragon.ideasonboard.com>","date":"2019-09-04T18:38:10","subject":"Re: [libcamera-devel] [PATCH v2 09/14] libcamera: request: Allow\n\tread only access to controls","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Niklas,\n\nOn Wed, Sep 04, 2019 at 09:35:16PM +0300, Laurent Pinchart wrote:\n> On Fri, Aug 30, 2019 at 01:26:48AM +0200, Niklas Söderlund wrote:\n> > Allow the controls in a Request to be examined from a const\n> > environment.\n> > \n> > Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n> \n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> \n> > ---\n> >  include/libcamera/request.h | 1 +\n> >  src/libcamera/request.cpp   | 5 +++++\n> >  2 files changed, 6 insertions(+)\n> > \n> > diff --git a/include/libcamera/request.h b/include/libcamera/request.h\n> > index 570924c5ef5e2425..f5de5257bba3f2bb 100644\n> > --- a/include/libcamera/request.h\n> > +++ b/include/libcamera/request.h\n> > @@ -40,6 +40,7 @@ public:\n> >  \t~Request();\n> >  \n> >  \tControlList &controls() { return controls_; }\n> > +\tconst ControlList &controls() const { return controls_; }\n> >  \tconst std::map<Stream *, Buffer *> &buffers() const { return bufferMap_; }\n> >  \tint addBuffer(std::unique_ptr<Buffer> buffer);\n> >  \tBuffer *findBuffer(Stream *stream) const;\n> > diff --git a/src/libcamera/request.cpp b/src/libcamera/request.cpp\n> > index b8b4dfb4b7549163..bdb4f908fb664ccf 100644\n> > --- a/src/libcamera/request.cpp\n> > +++ b/src/libcamera/request.cpp\n> > @@ -84,6 +84,11 @@ Request::~Request()\n> >   * \\return A reference to the ControlList in this request\n> >   */\n> >  \n> > +/**\n> > + * \\fn Request::controls() const\n> > + * \\sa Request::controls()\n\nActually I think you should at least copy the brief, otherwise the\nmethod will have no description in the list of member functions.\n\n> > + */\n> > +\n> >  /**\n> >   * \\fn Request::buffers()\n> >   * \\brief Retrieve the request's streams to buffers map","headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6DAFD60BB2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  4 Sep 2019 20:38:17 +0200 (CEST)","from pendragon.ideasonboard.com (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id D71BB440;\n\tWed,  4 Sep 2019 20:38:16 +0200 (CEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1567622297;\n\tbh=j37ZTuh2Mnhnpru6mYVIKUVqD8bYQqdbRMpYltmzD50=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=VNX7fIrY4LzG1lehcKqrFIgT6shHLu37E1btPQ12MLXCiCJpoO5ppcOS3IcDlB0TK\n\t5fF6++MYpz+th3nMsGrqblyq4nvVeCcng46BnWCIAmGWXg5NRofjtMTErob/1f21GQ\n\tj6ReFpsyRB/X6IGihvPe2feqtK3cqzUr3gB1kGoo=","Date":"Wed, 4 Sep 2019 21:38:10 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Niklas =?utf-8?q?S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20190904183810.GJ5433@pendragon.ideasonboard.com>","References":"<20190829232653.13214-1-niklas.soderlund@ragnatech.se>\n\t<20190829232653.13214-10-niklas.soderlund@ragnatech.se>\n\t<20190904183516.GI5433@pendragon.ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20190904183516.GI5433@pendragon.ideasonboard.com>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH v2 09/14] libcamera: request: Allow\n\tread only access to controls","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.23","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":"Wed, 04 Sep 2019 18:38:17 -0000"}}]