Show a patch.

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

{
    "id": 18646,
    "url": "https://patchwork.libcamera.org/api/patches/18646/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/18646/",
    "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": "<20230523111948.2832224-1-kieran.bingham@ideasonboard.com>",
    "date": "2023-05-23T11:19:48",
    "name": "[libcamera-devel,3/2] libcamera: deprecated: Add new deprecated header",
    "commit_ref": null,
    "pull_url": null,
    "state": "rfc",
    "archived": false,
    "hash": "3824aa11bd5244f2fc6975387f0a5ce4626b4d88",
    "submitter": {
        "id": 4,
        "url": "https://patchwork.libcamera.org/api/people/4/?format=api",
        "name": "Kieran Bingham",
        "email": "kieran.bingham@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/18646/mbox/",
    "series": [
        {
            "id": 3884,
            "url": "https://patchwork.libcamera.org/api/series/3884/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3884",
            "date": "2023-05-23T11:19:48",
            "name": null,
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/3884/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/18646/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/18646/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<libcamera-devel-bounces@lists.libcamera.org>",
        "X-Original-To": "parsemail@patchwork.libcamera.org",
        "Delivered-To": "parsemail@patchwork.libcamera.org",
        "Received": [
            "from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 5E278C3284\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 23 May 2023 11:20:02 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8C8766285F;\n\tTue, 23 May 2023 13:20:01 +0200 (CEST)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 33AA5603F7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 23 May 2023 13:20:00 +0200 (CEST)",
            "from Monstersaurus.local\n\t(aztw-30-b2-v4wan-166917-cust845.vm26.cable.virginm.net\n\t[82.37.23.78])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id E887F881;\n\tTue, 23 May 2023 13:19:43 +0200 (CEST)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1684840801;\n\tbh=s8Pb5nIe+0N8NmfsXBWO7RbN7v8Fa2K9Q/kYu4j8JUA=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=G8nMxz+lLHD4/9iCWs/eOVUuXJ17E+SQue3rCC5D/gBCXPteCavaFhl5hYj3rzeBv\n\tE6oQv/itMIQRc+o5PbfS3zhLc4x8kN8mBwUL5u7gcyLr8Zft6RSFCDIfXXwuKBB6G+\n\t06kMqGFfd3X/Pa8vwYhn7QLAU/Lxti9j3OuJpAk2E43waGhDnyBWHBd0QDyNDG//iV\n\tHBexX5E6fHifZi1mxI5usbvaRwZXD20Pz8r7YXtHnv6gOJxmCtoSNSKS7o/NPE4It1\n\tt1DdMdP3AWA+zH3lFHqrX3dlHFdGNDyPbKUeeAMI795pvE0j5gYU9pzeC2BwvBxk0X\n\tM+HJ+VE85W5cg==",
            "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1684840784;\n\tbh=s8Pb5nIe+0N8NmfsXBWO7RbN7v8Fa2K9Q/kYu4j8JUA=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=CdVp0VF+yEVVccoA32OZv9jU5/hOLJXIzAqnQK7RWcZRqIRIUJE0qtKqD/n/NG0bA\n\tX1IlGzQyERnZhax5oCJpyeAYSBGsELBaphMIuq32T9CwgLzFXG+aJdvpZ5rzwumzVK\n\tJ+evpyxutVve0/5cYe4MgtiAEtSBto2zU+dZgix8="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"CdVp0VF+\"; dkim-atps=neutral",
        "To": "libcamera devel <libcamera-devel@lists.libcamera.org>",
        "Date": "Tue, 23 May 2023 12:19:48 +0100",
        "Message-Id": "<20230523111948.2832224-1-kieran.bingham@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20230509231542.1123025-1-pobrn@protonmail.com>",
        "References": "<20230509231542.1123025-1-pobrn@protonmail.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH 3/2] libcamera: deprecated: Add new\n\tdeprecated header",
        "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>",
        "From": "Kieran Bingham via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>",
        "Reply-To": "Kieran Bingham <kieran.bingham@ideasonboard.com>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "Provide a new header that will be included when applications\nuse <libcamera/libcamera.h> to bring in additional context and warnings\nto generate when the libcamera API is modified where possible.\n\nIntroduce a deprecated implemenation of StreamRoles to report\nthat StreamRoles is no longer a libcamera definition.\n\nThis allows the compiler to report the following when the header is\navailable:\n\n../../src/apps/qcam/main_window.cpp: In member function ‘int MainWindow::startCapture()’:\n../../src/apps/qcam/main_window.cpp:366:21: error: ‘using StreamRoles = class std::vector<libcamera::StreamRole>’ is deprecated: Use a span, array or vector directly [-Werror=deprecated-declarations]\n  366 |         StreamRoles roles = StreamKeyValueParser::roles(options_[OptStream]);\n      |                     ^~~~~\nIn file included from include/libcamera/libcamera.h:16,\n                 from ../../src/apps/qcam/main_window.cpp:14:\n../../include/libcamera/deprecated.h:21:7: note: declared here\n   21 | using StreamRoles [[deprecated(\"Use a span, array or vector directly\")]]\n      |       ^~~~~~~~~~~\n\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n\nThis is a proposal to support reporting deprecated functionality to\napplications at compile time.\n\n include/libcamera/deprecated.h | 24 ++++++++++++++++++++++++\n include/libcamera/meson.build  |  1 +\n 2 files changed, 25 insertions(+)\n create mode 100644 include/libcamera/deprecated.h",
    "diff": "diff --git a/include/libcamera/deprecated.h b/include/libcamera/deprecated.h\nnew file mode 100644\nindex 000000000000..ba48d5a142dc\n--- /dev/null\n+++ b/include/libcamera/deprecated.h\n@@ -0,0 +1,24 @@\n+/* SPDX-License-Identifier: LGPL-2.1-or-later */\n+/*\n+ * Copyright (C) 2023, Ideas on Board Oy.\n+ *\n+ * deprecated.h - Deprecated API reporting\n+ *\n+ * Deprecated features of the API will be exposed here for at least one release\n+ * iteration to ease reporting of API adjustments for applications.\n+ */\n+\n+#pragma once\n+\n+namespace libcamera {\n+\n+/*\n+ * Deprectated following v0.0.5\n+ *\n+ * The use of StreamRoles indicates applications to use dynamic allocations\n+ * of the StreamRole when this is not always required.\n+ */\n+using StreamRoles [[deprecated(\"Use a span, array or vector directly\")]]\n+\t= std::vector<StreamRole>;\n+\n+} /* namespace libcamera */\ndiff --git a/include/libcamera/meson.build b/include/libcamera/meson.build\nindex 408b7acf152c..2f470d2ac61e 100644\n--- a/include/libcamera/meson.build\n+++ b/include/libcamera/meson.build\n@@ -7,6 +7,7 @@ libcamera_public_headers = files([\n     'camera_manager.h',\n     'color_space.h',\n     'controls.h',\n+    'deprecated.h',\n     'fence.h',\n     'framebuffer.h',\n     'framebuffer_allocator.h',\n",
    "prefixes": [
        "libcamera-devel",
        "3/2"
    ]
}