From patchwork Thu Jan 3 17:38:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 148 Return-Path: Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 436E060B2D for ; Thu, 3 Jan 2019 18:39:04 +0100 (CET) X-Originating-IP: 2.224.242.101 Received: from uno.lan (2-224-242-101.ip172.fastwebnet.it [2.224.242.101]) (Authenticated sender: jacopo@jmondi.org) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id D5F3AFF807; Thu, 3 Jan 2019 17:39:03 +0000 (UTC) From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Date: Thu, 3 Jan 2019 18:38:58 +0100 Message-Id: <20190103173859.22624-5-jacopo@jmondi.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190103173859.22624-1-jacopo@jmondi.org> References: <20190103173859.22624-1-jacopo@jmondi.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 4/5] libcamera: Document private members X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2019 17:39:04 -0000 The newly added MediaDevice::setLink() function is defined as private, but it is worth being documented, as it is called from the friend method MediaLink::setup(). In the library code base, several private methods and fields are documented, but do not show up in the generated documentation output. Change doxygen settings to output processed documentation for the private fields and methods, when proper doxygen comments are applied to them (and do not complain if private members are not documented at all). Signed-off-by: Jacopo Mondi --- Documentation/Doxyfile.in | 4 ++-- src/libcamera/media_device.cpp | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/Documentation/Doxyfile.in b/Documentation/Doxyfile.in index b1a70d3..16dcccd 100644 --- a/Documentation/Doxyfile.in +++ b/Documentation/Doxyfile.in @@ -442,7 +442,7 @@ EXTRACT_ALL = NO # be included in the documentation. # The default value is: NO. -EXTRACT_PRIVATE = NO +EXTRACT_PRIVATE = YES # If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal # scope will be included in the documentation. @@ -487,7 +487,7 @@ EXTRACT_ANON_NSPACES = NO # section is generated. This option has no effect if EXTRACT_ALL is enabled. # The default value is: NO. -HIDE_UNDOC_MEMBERS = NO +HIDE_UNDOC_MEMBERS = YES # If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. If set diff --git a/src/libcamera/media_device.cpp b/src/libcamera/media_device.cpp index b86d0c4..48aa805 100644 --- a/src/libcamera/media_device.cpp +++ b/src/libcamera/media_device.cpp @@ -641,6 +641,28 @@ bool MediaDevice::populateLinks(const struct media_v2_topology &topology) return true; } +/** + * \brief Apply \a flags to a link between two pads + * \param source The source pad + * \param sink The sink pad + * \param flags The link flags + * + * Implements 'raw' link handling, as this functions applies \a flags, + * (whose only accepted values are the ones defined by the Media Controller + * APIs in MEDIA_LNK_FL_* macros) to a link between two pads. No correctness + * checks on the link existence and validity of \a flags is performed. The + * function assumes the \a source and \a sink pads are connected, and the + * supplied \a flags applies to the link (ie. immutable links cannot be + * disabled). + * + * This function wraps the raw MEDIA_IOC_SETUP_LINK ioctl, and shouldn't be + * called directly by any other class or method but the + * MediaLink::setup(bool enable) one, declared as friend for this reason. + * + * \sa MediaLink::setup(bool enable) + * + * \return 0 for success, negative error number otherwise + */ int MediaDevice::setLink(const MediaPad *source, const MediaPad *sink, unsigned int flags) {