Show a patch.

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

{
    "id": 360,
    "url": "https://patchwork.libcamera.org/api/patches/360/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/360/",
    "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": "<20190124101651.9993-6-laurent.pinchart@ideasonboard.com>",
    "date": "2019-01-24T10:16:46",
    "name": "[libcamera-devel,05/10] libcamera: media_device: Add disconnected signal",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "62fe0d30624f19fda6fe1ebfad7431c06c4519ea",
    "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/360/mbox/",
    "series": [
        {
            "id": 125,
            "url": "https://patchwork.libcamera.org/api/series/125/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=125",
            "date": "2019-01-24T10:16:41",
            "name": "Hotplug support and object lifetime management",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/125/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/360/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/360/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 B198260C78\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 24 Jan 2019 11:16:58 +0100 (CET)",
            "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 4832E23A;\n\tThu, 24 Jan 2019 11:16:58 +0100 (CET)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1548325018;\n\tbh=jiQk+fOuv06fpKtb2EcywkAZQi4ALqLUV3NMZst7JDA=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=JR5YIoO4JRFlcblEcgxwEnKvE9zUhVO5vubEjvIZm3JUX7z9Nn1jvDb3NuRoOvXXx\n\tsD/R1ZVyi/2K6aQP/tDnS2aLpHI1x6I4SQxguptO0/st1jZlYUguRvyShgMs7WByRb\n\tgXy8LuCEOhCBTBDtAzJqFamHj0W0rp4zrzlheTJ8=",
        "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Thu, 24 Jan 2019 12:16:46 +0200",
        "Message-Id": "<20190124101651.9993-6-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.19.2",
        "In-Reply-To": "<20190124101651.9993-1-laurent.pinchart@ideasonboard.com>",
        "References": "<20190124101651.9993-1-laurent.pinchart@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH 05/10] libcamera: media_device: Add\n\tdisconnected signal",
        "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, 24 Jan 2019 10:16:58 -0000"
    },
    "content": "The signal is emitted when the hardware device corresponding to the\nmedia device is unplugged. This will trigger the full unplug handling\nchain.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/libcamera/include/media_device.h |  4 ++++\n src/libcamera/media_device.cpp       | 10 ++++++++++\n 2 files changed, 14 insertions(+)",
    "diff": "diff --git a/src/libcamera/include/media_device.h b/src/libcamera/include/media_device.h\nindex 8a7b9489faa9..27a2b46a4392 100644\n--- a/src/libcamera/include/media_device.h\n+++ b/src/libcamera/include/media_device.h\n@@ -14,6 +14,8 @@\n \n #include <linux/media.h>\n \n+#include <libcamera/signal.h>\n+\n #include \"media_object.h\"\n \n namespace libcamera {\n@@ -48,6 +50,8 @@ public:\n \tMediaLink *link(const MediaPad *source, const MediaPad *sink);\n \tint disableLinks();\n \n+\tSignal<MediaDevice *> disconnected;\n+\n private:\n \tstd::string driver_;\n \tstd::string deviceNode_;\ndiff --git a/src/libcamera/media_device.cpp b/src/libcamera/media_device.cpp\nindex 51e5088ebdd9..be81bd8c4c23 100644\n--- a/src/libcamera/media_device.cpp\n+++ b/src/libcamera/media_device.cpp\n@@ -427,6 +427,16 @@ int MediaDevice::disableLinks()\n \treturn 0;\n }\n \n+/**\n+ * \\var MediaDevice::disconnected\n+ * \\brief Signal emitted when the media device is disconnected from the system\n+ *\n+ * This signal is emitted when the device enumerator detects that the media\n+ * device has been removed from the system. For hot-pluggable devices this is\n+ * usually caused by physical device disconnection, but can also result from\n+ * driver unloading for most devices. The media device is passed as a parameter.\n+ */\n+\n /**\n  * \\var MediaDevice::objects_\n  * \\brief Global map of media objects (entities, pads, links) keyed by their\n",
    "prefixes": [
        "libcamera-devel",
        "05/10"
    ]
}