Show a patch.

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

{
    "id": 462,
    "url": "https://patchwork.libcamera.org/api/patches/462/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/462/",
    "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": "<20190131234721.22606-3-laurent.pinchart@ideasonboard.com>",
    "date": "2019-01-31T23:47:15",
    "name": "[libcamera-devel,v2,2/8] cam: options: Move struct Option",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "767d5cf27884bad3c06a9afc0086ec633f3459f1",
    "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/462/mbox/",
    "series": [
        {
            "id": 158,
            "url": "https://patchwork.libcamera.org/api/series/158/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=158",
            "date": "2019-01-31T23:47:13",
            "name": "cam: add --format option to configure a stream",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/158/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/462/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/462/checks/",
    "tags": {},
    "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 545E360DBB\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  1 Feb 2019 00:47:36 +0100 (CET)",
            "from pendragon.ideasonboard.com (85-76-34-136-nat.elisa-mobile.fi\n\t[85.76.34.136])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 69B9241;\n\tFri,  1 Feb 2019 00:47:34 +0100 (CET)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1548978455;\n\tbh=s1qlEfEwpCpQPl9CEYvMUJVqLPjuycDiB/CiAU4HOTQ=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=WMfpaUg10KOjUQcKzFbmrPrDemMCKlGjQsvk5/Eu+VaQ30HrmHrPUjs2ixPwQtUH8\n\tzi0KDZBc+926eTl7kZ9lgGgbkD271AiuSXiFuB6KfWPMnxa5MPcQcmG2Jg4iYX2fov\n\tCja/sKBJyLIPwjUyd9K5jgfBunyuzXVzCAqHVt5w=",
        "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Fri,  1 Feb 2019 01:47:15 +0200",
        "Message-Id": "<20190131234721.22606-3-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.19.2",
        "In-Reply-To": "<20190131234721.22606-1-laurent.pinchart@ideasonboard.com>",
        "References": "<20190131234721.22606-1-laurent.pinchart@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v2 2/8] cam: options: Move struct Option",
        "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": "Thu, 31 Jan 2019 23:47:36 -0000"
    },
    "content": "The Option structure is declared within the OptionsParser, but will\nlater be needed by other parsers. Move it outside the OptionsParser\nclass.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/cam/options.h | 22 +++++++++++-----------\n 1 file changed, 11 insertions(+), 11 deletions(-)",
    "diff": "diff --git a/src/cam/options.h b/src/cam/options.h\nindex 491f6a316fff..6d1b12d235d8 100644\n--- a/src/cam/options.h\n+++ b/src/cam/options.h\n@@ -17,6 +17,17 @@ enum OptionArgument {\n \tArgumentOptional,\n };\n \n+struct Option {\n+\tint opt;\n+\tconst char *name;\n+\tOptionArgument argument;\n+\tconst char *argumentName;\n+\tconst char *help;\n+\n+\tbool hasShortOption() const { return isalnum(opt); }\n+\tbool hasLongOption() const { return name != nullptr; }\n+};\n+\n class OptionsParser\n {\n public:\n@@ -42,17 +53,6 @@ public:\n \tvoid usage();\n \n private:\n-\tstruct Option {\n-\t\tint opt;\n-\t\tconst char *name;\n-\t\tOptionArgument argument;\n-\t\tconst char *argumentName;\n-\t\tconst char *help;\n-\n-\t\tbool hasShortOption() const { return isalnum(opt); }\n-\t\tbool hasLongOption() const { return name != nullptr; }\n-\t};\n-\n \tstd::vector<Option> options_;\n \tstd::map<unsigned int, Option *> optionsMap_;\n };\n",
    "prefixes": [
        "libcamera-devel",
        "v2",
        "2/8"
    ]
}