Show a patch.

GET /api/patches/1565/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 1565,
    "url": "https://patchwork.libcamera.org/api/patches/1565/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/1565/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/projects/1/?format=api",
        "name": "libcamera",
        "link_name": "libcamera",
        "list_id": "libcamera_core",
        "list_email": "libcamera-devel@lists.libcamera.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": ""
    },
    "msgid": "<20190701201504.28487-7-laurent.pinchart@ideasonboard.com>",
    "date": "2019-07-01T20:14:57",
    "name": "[libcamera-devel,v4,06/13] libcamera: request: Add a ControlList",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "941525e97aa09efb866baab1e57b968eec645682",
    "submitter": {
        "id": 2,
        "url": "https://patchwork.libcamera.org/api/people/2/?format=api",
        "name": "Laurent Pinchart",
        "email": "laurent.pinchart@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/1565/mbox/",
    "series": [
        {
            "id": 386,
            "url": "https://patchwork.libcamera.org/api/series/386/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=386",
            "date": "2019-07-01T20:14:51",
            "name": "libcamera Controls",
            "version": 4,
            "mbox": "https://patchwork.libcamera.org/series/386/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/1565/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/1565/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 4A25C6157D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  1 Jul 2019 22:15:30 +0200 (CEST)",
            "from pendragon.bb.dnainternet.fi\n\t(dfj612yhrgyx302h3jwwy-3.rev.dnainternet.fi\n\t[IPv6:2001:14ba:21f5:5b00:ce28:277f:58d7:3ca4])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id EC8CB1200\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  1 Jul 2019 22:15:29 +0200 (CEST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1562012130;\n\tbh=97rotAarLcRh7B0x2D9xvvSQFwEyzgihulrD5ySrM20=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=aB8W0TxzhXkxEVWcLBEohbsO7Bif4bC1fY4UNaER59VtMykwz93wuOMNvc7V/GIXw\n\tlI0tkMbspGFP+YOCSNrq+Ns0NZlxiQ8IgZP9bxfx7HXt56YkROGXIBkSs0b/D2h28l\n\tV08L3+LsgUf0SRky8sqQNcCIChxEcSbFGZflRNII=",
        "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Mon,  1 Jul 2019 23:14:57 +0300",
        "Message-Id": "<20190701201504.28487-7-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.21.0",
        "In-Reply-To": "<20190701201504.28487-1-laurent.pinchart@ideasonboard.com>",
        "References": "<20190701201504.28487-1-laurent.pinchart@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v4 06/13] libcamera: request: Add a\n\tControlList",
        "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": "Mon, 01 Jul 2019 20:15:31 -0000"
    },
    "content": "From: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nProvide a ControlList on request objects to facilitate setting controls.\n\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\nChanges since v3:\n\n- Don't clear controls when the request completes\n- Fixed include ordering\n---\n include/libcamera/request.h |  3 +++\n src/libcamera/request.cpp   | 12 +++++++++++-\n 2 files changed, 14 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/include/libcamera/request.h b/include/libcamera/request.h\nindex 58de6f00a554..a93468d7c8b7 100644\n--- a/include/libcamera/request.h\n+++ b/include/libcamera/request.h\n@@ -10,6 +10,7 @@\n #include <map>\n #include <unordered_set>\n \n+#include <libcamera/controls.h>\n #include <libcamera/signal.h>\n \n namespace libcamera {\n@@ -32,6 +33,7 @@ public:\n \tRequest(const Request &) = delete;\n \tRequest &operator=(const Request &) = delete;\n \n+\tControlList &controls() { return controls_; }\n \tconst std::map<Stream *, Buffer *> &buffers() const { return bufferMap_; }\n \tint setBuffers(const std::map<Stream *, Buffer *> &streamMap);\n \tBuffer *findBuffer(Stream *stream) const;\n@@ -50,6 +52,7 @@ private:\n \tbool completeBuffer(Buffer *buffer);\n \n \tCamera *camera_;\n+\tControlList controls_;\n \tstd::map<Stream *, Buffer *> bufferMap_;\n \tstd::unordered_set<Buffer *> pending_;\n \ndiff --git a/src/libcamera/request.cpp b/src/libcamera/request.cpp\nindex fa3ee46da440..e749e41baa42 100644\n--- a/src/libcamera/request.cpp\n+++ b/src/libcamera/request.cpp\n@@ -48,10 +48,20 @@ LOG_DEFINE_CATEGORY(Request)\n  * \\param[in] camera The camera that creates the request\n  */\n Request::Request(Camera *camera)\n-\t: camera_(camera), status_(RequestPending)\n+\t: camera_(camera), controls_(camera), status_(RequestPending)\n {\n }\n \n+/**\n+ * \\fn Request::controls()\n+ * \\brief Retrieve the request's ControlList\n+ *\n+ * Return a reference to the ControlList that stores all the controls relevant\n+ * to this request.\n+ *\n+ * \\return A reference to the ControlList in this request\n+ */\n+\n /**\n  * \\fn Request::buffers()\n  * \\brief Retrieve the request's streams to buffers map\n",
    "prefixes": [
        "libcamera-devel",
        "v4",
        "06/13"
    ]
}