{"id":12808,"url":"https://patchwork.libcamera.org/api/patches/12808/?format=json","web_url":"https://patchwork.libcamera.org/patch/12808/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20210704234344.10765-1-laurent.pinchart@ideasonboard.com>","date":"2021-07-04T23:43:44","name":"[libcamera-devel] libcamera: media_device: Rename valid() function to isValid()","commit_ref":"fcccd7991f444332d7a0c8462ec683738c72425f","pull_url":null,"state":"accepted","archived":false,"hash":"8c20dcedb54aef22695d3c9e6392c3513f449d3c","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/?format=json","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"delegate":{"id":14,"url":"https://patchwork.libcamera.org/api/users/14/?format=json","username":"pinchartl","first_name":"Laurent","last_name":"Pinchart","email":"laurent.pinchart@ideasonboard.com"},"mbox":"https://patchwork.libcamera.org/patch/12808/mbox/","series":[{"id":2208,"url":"https://patchwork.libcamera.org/api/series/2208/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=2208","date":"2021-07-04T23:43:44","name":"[libcamera-devel] libcamera: media_device: Rename valid() function to isValid()","version":1,"mbox":"https://patchwork.libcamera.org/series/2208/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/12808/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/12808/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 A8068C0100\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun,  4 Jul 2021 23:44:31 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 291EA68501;\n\tMon,  5 Jul 2021 01:44:31 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A9C2260285\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  5 Jul 2021 01:44:29 +0200 (CEST)","from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 2CBFFE7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  5 Jul 2021 01:44:29 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"BTtBfvOg\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1625442269;\n\tbh=Nx0cAEBd9MfONY1tRbijHbMhqgnJwGbETUHNVLVlFpk=;\n\th=From:To:Subject:Date:From;\n\tb=BTtBfvOgEMrts8kjIrmqZRYHCeaw5Sg8rtngLiVdobxVQsxzYEGcBsDVM+ExcwyqS\n\tZRb6CleCC8KY/IphoZeDf+JitKG/AezhUdUagMPlGOOMQDfId6lZidWwcCGbV3Ge2B\n\twKWOvL+QYICpYhv6aIjLm1xcZXqPk1i4SJIu3/Pk=","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Mon,  5 Jul 2021 02:43:44 +0300","Message-Id":"<20210704234344.10765-1-laurent.pinchart@ideasonboard.com>","X-Mailer":"git-send-email 2.31.1","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH] libcamera: media_device: Rename valid()\n\tfunction to isValid()","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"We use isValid() instead of valid() through the code base, make\nMediaDevice consistent.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n include/libcamera/internal/media_device.h | 2 +-\n src/libcamera/media_device.cpp            | 6 +++---\n 2 files changed, 4 insertions(+), 4 deletions(-)","diff":"diff --git a/include/libcamera/internal/media_device.h b/include/libcamera/internal/media_device.h\nindex 8424611d7eda..3a7722c2a215 100644\n--- a/include/libcamera/internal/media_device.h\n+++ b/include/libcamera/internal/media_device.h\n@@ -35,7 +35,7 @@ public:\n \tvoid unlock();\n \n \tint populate();\n-\tbool valid() const { return valid_; }\n+\tbool isValid() const { return valid_; }\n \n \tconst std::string driver() const { return driver_; }\n \tconst std::string deviceNode() const { return deviceNode_; }\ndiff --git a/src/libcamera/media_device.cpp b/src/libcamera/media_device.cpp\nindex e12ab1abb10d..fa50264fa253 100644\n--- a/src/libcamera/media_device.cpp\n+++ b/src/libcamera/media_device.cpp\n@@ -44,7 +44,7 @@ LOG_DEFINE_CATEGORY(MediaDevice)\n  * MediaEntity, MediaPad and MediaLink are created to model the media graph,\n  * and stored in a map indexed by object id.\n  *\n- * The graph is valid once successfully populated, as reported by the valid()\n+ * The graph is valid once successfully populated, as reported by the isValid()\n  * function. It can be queried to list all entities(), or entities can be\n  * looked up by name with getEntityByName(). The graph can be traversed from\n  * entity to entity through pads and links as exposed by the corresponding\n@@ -292,7 +292,7 @@ done:\n }\n \n /**\n- * \\fn MediaDevice::valid()\n+ * \\fn MediaDevice::isValid()\n  * \\brief Query whether the media graph has been populated and is valid\n  * \\return true if the media graph is valid, false otherwise\n  */\n@@ -571,7 +571,7 @@ bool MediaDevice::addObject(MediaObject *object)\n  *\n  * The media device graph state is reset to invalid when the graph is cleared.\n  *\n- * \\sa valid()\n+ * \\sa isValid()\n  */\n void MediaDevice::clear()\n {\n","prefixes":["libcamera-devel"]}