Show a patch.

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

{
    "id": 2979,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/2979/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/2979/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/1.1/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": "<20200306160002.30549-8-laurent.pinchart@ideasonboard.com>",
    "date": "2020-03-06T15:59:37",
    "name": "[libcamera-devel,v2,07/32] libcamera: controls: Reorder ControlValue methods",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "28a4455b89ff386590c818a8b939c9760f8ac19c",
    "submitter": {
        "id": 2,
        "url": "https://patchwork.libcamera.org/api/1.1/people/2/?format=api",
        "name": "Laurent Pinchart",
        "email": "laurent.pinchart@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/2979/mbox/",
    "series": [
        {
            "id": 703,
            "url": "https://patchwork.libcamera.org/api/1.1/series/703/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=703",
            "date": "2020-03-06T15:59:30",
            "name": "libcamera: Add support for array controls",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/703/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/2979/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/2979/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 97F9E60424\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  6 Mar 2020 17:00:16 +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 7193224B;\n\tFri,  6 Mar 2020 17:00:15 +0100 (CET)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1583510416;\n\tbh=iy4JGQCx0rlLCHuusEvC2m0rR877q4nzbFbBRZOjQJI=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=qhhYYSH3Z99G3qZM9ieo5en++v8d0RDp+6gfJmEGu86tL5Nb7/uDccciq6sT5zrB5\n\tFgzmmEWZGcl4YsgxRN2KFRPxUwUG06TW3SW3Mc2i/os4DPQt5DWuN9clmlE/bhli7w\n\thuFeDHwpCiPJvMvgK7sZ6Zv5eeehtXY94EvX9NS4=",
        "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Fri,  6 Mar 2020 17:59:37 +0200",
        "Message-Id": "<20200306160002.30549-8-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.24.1",
        "In-Reply-To": "<20200306160002.30549-1-laurent.pinchart@ideasonboard.com>",
        "References": "<20200306160002.30549-1-laurent.pinchart@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v2 07/32] libcamera: controls: Reorder\n\tControlValue methods",
        "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": "Fri, 06 Mar 2020 16:00:17 -0000"
    },
    "content": "From: Jacopo Mondi <jacopo@jmondi.org>\n\nReorder functions in ControlValue class to group const methods together.\n\nCosmetic change only.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n include/libcamera/controls.h | 10 ++--\n src/libcamera/controls.cpp   | 94 ++++++++++++++++++------------------\n 2 files changed, 52 insertions(+), 52 deletions(-)",
    "diff": "diff --git a/include/libcamera/controls.h b/include/libcamera/controls.h\nindex 458b84e8fa8c..9f8a9031bd74 100644\n--- a/include/libcamera/controls.h\n+++ b/include/libcamera/controls.h\n@@ -33,11 +33,6 @@ public:\n \tControlType type() const { return type_; }\n \tbool isNone() const { return type_ == ControlTypeNone; }\n \n-\ttemplate<typename T>\n-\tconst T &get() const;\n-\ttemplate<typename T>\n-\tvoid set(const T &value);\n-\n \tstd::string toString() const;\n \n \tbool operator==(const ControlValue &other) const;\n@@ -46,6 +41,11 @@ public:\n \t\treturn !(*this == other);\n \t}\n \n+\ttemplate<typename T>\n+\tconst T &get() const;\n+\ttemplate<typename T>\n+\tvoid set(const T &value);\n+\n private:\n \tControlType type_;\n \ndiff --git a/src/libcamera/controls.cpp b/src/libcamera/controls.cpp\nindex 0031cd064da9..613e6d768c0f 100644\n--- a/src/libcamera/controls.cpp\n+++ b/src/libcamera/controls.cpp\n@@ -112,6 +112,53 @@ ControlValue::ControlValue(int64_t value)\n  * \\return True if the value type is ControlTypeNone, false otherwise\n  */\n \n+/**\n+ * \\brief Assemble and return a string describing the value\n+ * \\return A string describing the ControlValue\n+ */\n+std::string ControlValue::toString() const\n+{\n+\tswitch (type_) {\n+\tcase ControlTypeNone:\n+\t\treturn \"<None>\";\n+\tcase ControlTypeBool:\n+\t\treturn bool_ ? \"True\" : \"False\";\n+\tcase ControlTypeInteger32:\n+\t\treturn std::to_string(integer32_);\n+\tcase ControlTypeInteger64:\n+\t\treturn std::to_string(integer64_);\n+\t}\n+\n+\treturn \"<ValueType Error>\";\n+}\n+\n+/**\n+ * \\brief Compare ControlValue instances for equality\n+ * \\return True if the values have identical types and values, false otherwise\n+ */\n+bool ControlValue::operator==(const ControlValue &other) const\n+{\n+\tif (type_ != other.type_)\n+\t\treturn false;\n+\n+\tswitch (type_) {\n+\tcase ControlTypeBool:\n+\t\treturn bool_ == other.bool_;\n+\tcase ControlTypeInteger32:\n+\t\treturn integer32_ == other.integer32_;\n+\tcase ControlTypeInteger64:\n+\t\treturn integer64_ == other.integer64_;\n+\tdefault:\n+\t\treturn false;\n+\t}\n+}\n+\n+/**\n+ * \\fn bool ControlValue::operator!=()\n+ * \\brief Compare ControlValue instances for non equality\n+ * \\return False if the values have identical types and values, true otherwise\n+ */\n+\n /**\n  * \\fn template<typename T> const T &ControlValue::get() const\n  * \\brief Get the control value\n@@ -175,53 +222,6 @@ void ControlValue::set<int64_t>(const int64_t &value)\n }\n #endif /* __DOXYGEN__ */\n \n-/**\n- * \\brief Assemble and return a string describing the value\n- * \\return A string describing the ControlValue\n- */\n-std::string ControlValue::toString() const\n-{\n-\tswitch (type_) {\n-\tcase ControlTypeNone:\n-\t\treturn \"<None>\";\n-\tcase ControlTypeBool:\n-\t\treturn bool_ ? \"True\" : \"False\";\n-\tcase ControlTypeInteger32:\n-\t\treturn std::to_string(integer32_);\n-\tcase ControlTypeInteger64:\n-\t\treturn std::to_string(integer64_);\n-\t}\n-\n-\treturn \"<ValueType Error>\";\n-}\n-\n-/**\n- * \\brief Compare ControlValue instances for equality\n- * \\return True if the values have identical types and values, false otherwise\n- */\n-bool ControlValue::operator==(const ControlValue &other) const\n-{\n-\tif (type_ != other.type_)\n-\t\treturn false;\n-\n-\tswitch (type_) {\n-\tcase ControlTypeBool:\n-\t\treturn bool_ == other.bool_;\n-\tcase ControlTypeInteger32:\n-\t\treturn integer32_ == other.integer32_;\n-\tcase ControlTypeInteger64:\n-\t\treturn integer64_ == other.integer64_;\n-\tdefault:\n-\t\treturn false;\n-\t}\n-}\n-\n-/**\n- * \\fn bool ControlValue::operator!=()\n- * \\brief Compare ControlValue instances for non equality\n- * \\return False if the values have identical types and values, true otherwise\n- */\n-\n /**\n  * \\class ControlId\n  * \\brief Control static metadata\n",
    "prefixes": [
        "libcamera-devel",
        "v2",
        "07/32"
    ]
}