Show a patch.

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

{
    "id": 4000,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/4000/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/4000/",
    "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": "<20200608232844.10150-6-jacopo@jmondi.org>",
    "date": "2020-06-08T23:28:43",
    "name": "[libcamera-devel,v2,5/6] libcamera: formats: Expose std::map::value_type",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "fd7bf8fc229ce5fe826e33a19ee34dc5301d11d5",
    "submitter": {
        "id": 3,
        "url": "https://patchwork.libcamera.org/api/1.1/people/3/?format=api",
        "name": "Jacopo Mondi",
        "email": "jacopo@jmondi.org"
    },
    "delegate": {
        "id": 15,
        "url": "https://patchwork.libcamera.org/api/1.1/users/15/?format=api",
        "username": "jmondi",
        "first_name": "Jacopo",
        "last_name": "Mondi",
        "email": "jacopo@jmondi.org"
    },
    "mbox": "https://patchwork.libcamera.org/patch/4000/mbox/",
    "series": [
        {
            "id": 979,
            "url": "https://patchwork.libcamera.org/api/1.1/series/979/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=979",
            "date": "2020-06-08T23:28:38",
            "name": "ImageFormats, you again",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/979/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/4000/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/4000/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<jacopo@jmondi.org>",
        "Received": [
            "from relay10.mail.gandi.net (relay10.mail.gandi.net\n\t[217.70.178.230])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 58EC463CC7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  9 Jun 2020 01:25:28 +0200 (CEST)",
            "from uno.lan (2-224-242-101.ip172.fastwebnet.it [2.224.242.101])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay10.mail.gandi.net (Postfix) with ESMTPSA id CD218240004;\n\tMon,  8 Jun 2020 23:25:27 +0000 (UTC)"
        ],
        "From": "Jacopo Mondi <jacopo@jmondi.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Tue,  9 Jun 2020 01:28:43 +0200",
        "Message-Id": "<20200608232844.10150-6-jacopo@jmondi.org>",
        "X-Mailer": "git-send-email 2.27.0",
        "In-Reply-To": "<20200608232844.10150-1-jacopo@jmondi.org>",
        "References": "<20200608232844.10150-1-jacopo@jmondi.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v2 5/6] libcamera: formats: Expose\n\tstd::map::value_type",
        "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": "Mon, 08 Jun 2020 23:25:29 -0000"
    },
    "content": "In order to prepare to replace usage of custom map in pipeline handlers,\nexpose the formats map value_type type definition, to allow pipeline\nhandlers to use STL functions to iterate the class.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n include/libcamera/internal/formats.h | 2 ++\n src/libcamera/formats.cpp            | 5 +++++\n 2 files changed, 7 insertions(+)",
    "diff": "diff --git a/include/libcamera/internal/formats.h b/include/libcamera/internal/formats.h\nindex 914fdde27d0c..1361b55d63d2 100644\n--- a/include/libcamera/internal/formats.h\n+++ b/include/libcamera/internal/formats.h\n@@ -22,6 +22,8 @@ template<typename T>\n class ImageFormats\n {\n public:\n+\tusing value_type = typename std::map<T, std::vector<SizeRange>>::value_type;\n+\n \tusing iterator = typename std::map<T, std::vector<SizeRange>>::iterator;\n \tusing const_iterator = typename std::map<T, std::vector<SizeRange>>::const_iterator;\n \ndiff --git a/src/libcamera/formats.cpp b/src/libcamera/formats.cpp\nindex 9f46f82c9059..5037c5928669 100644\n--- a/src/libcamera/formats.cpp\n+++ b/src/libcamera/formats.cpp\n@@ -34,6 +34,11 @@ LOG_DEFINE_CATEGORY(Formats)\n  * Sizes are stored as a list of SizeRange.\n  */\n \n+/**\n+ * \\typedef ImageFormats::value_type\n+ * \\brief Value type of the entries in the formats map\n+ */\n+\n /**\n  * \\typedef ImageFormats::iterator\n  * \\brief Iterator for the formats map\n",
    "prefixes": [
        "libcamera-devel",
        "v2",
        "5/6"
    ]
}