From e3376b60791fc7d26fbcf95f55d52c83f75562e9 Mon Sep 17 00:00:00 2001 From: Jonathan Hui Date: Tue, 24 Sep 2024 09:52:36 -0700 Subject: [PATCH] [doxygen] remove empty line at end of block --- src/agent/application.hpp | 6 -- src/agent/uris.hpp | 30 --------- src/backbone_router/backbone_agent.hpp | 3 - src/backbone_router/constants.hpp | 1 - src/backbone_router/dua_routing_manager.hpp | 4 -- src/backbone_router/nd_proxy.hpp | 7 --- src/border_agent/border_agent.cpp | 1 - src/border_agent/border_agent.hpp | 7 --- src/common/api_strings.hpp | 1 - src/common/callback.hpp | 1 - src/common/code_utils.hpp | 8 --- src/common/dns_utils.hpp | 9 --- src/common/logging.hpp | 18 ------ src/common/mainloop.hpp | 6 -- src/common/mainloop_manager.hpp | 7 --- src/common/task_runner.hpp | 9 --- src/common/tlv.hpp | 14 ----- src/common/types.hpp | 40 ------------ src/dbus/client/client_error.hpp | 2 - src/dbus/client/thread_api_dbus.hpp | 70 --------------------- src/dbus/common/error.hpp | 1 - src/dbus/common/types.hpp | 35 ----------- src/dbus/server/dbus_agent.hpp | 3 - src/dbus/server/dbus_object.hpp | 11 ---- src/dbus/server/dbus_request.hpp | 9 --- src/dbus/server/dbus_thread_object_ncp.hpp | 2 - src/dbus/server/dbus_thread_object_rcp.hpp | 1 - src/dbus/server/error_helper.hpp | 1 - src/mdns/mdns.hpp | 27 -------- src/mdns/mdns_avahi.cpp | 3 - src/mdns/mdns_avahi.hpp | 1 - src/mdns/mdns_mdnssd.hpp | 1 - src/ncp/async_task.hpp | 6 -- src/ncp/ncp_host.hpp | 4 -- src/ncp/ncp_spinel.hpp | 19 ------ src/ncp/rcp_host.hpp | 15 ----- src/ncp/thread_host.hpp | 13 ---- src/openwrt/ubus/otubus.hpp | 70 --------------------- src/rest/connection.hpp | 6 -- src/rest/json.hpp | 21 ------- src/rest/parser.hpp | 4 -- src/rest/request.hpp | 12 ---- src/rest/resource.hpp | 8 --- src/rest/response.hpp | 9 --- src/rest/rest_web_server.hpp | 4 -- src/sdp_proxy/advertising_proxy.hpp | 6 -- src/sdp_proxy/discovery_proxy.hpp | 4 -- src/trel_dnssd/trel_dnssd.hpp | 7 --- src/utils/crc16.hpp | 5 -- src/utils/dns_utils.hpp | 3 - src/utils/infra_link_selector.hpp | 6 -- src/utils/pskc.hpp | 1 - src/utils/sha256.hpp | 9 --- src/utils/socket_utils.hpp | 2 - src/utils/steering_data.hpp | 9 --- src/utils/string_utils.hpp | 2 - src/utils/system_utils.hpp | 1 - src/utils/thread_helper.cpp | 1 - src/utils/thread_helper.hpp | 19 ------ src/web/web-service/ot_client.hpp | 8 --- src/web/web-service/web_server.hpp | 5 -- src/web/web-service/wpan_service.hpp | 13 ---- 62 files changed, 631 deletions(-) diff --git a/src/agent/application.hpp b/src/agent/application.hpp index a4a6d3ebb90..92b44ef1580 100644 --- a/src/agent/application.hpp +++ b/src/agent/application.hpp @@ -83,7 +83,6 @@ class VendorServer; /** * This class implements OTBR application management. - * */ class Application : private NonCopyable { @@ -97,7 +96,6 @@ class Application : private NonCopyable * @param[in] aEnableAutoAttach Whether or not to automatically attach to the saved network. * @param[in] aRestListenAddress Network address to listen on. * @param[in] aRestListenPort Network port to listen on. - * */ explicit Application(const std::string &aInterfaceName, const std::vector &aBackboneInterfaceNames, @@ -108,13 +106,11 @@ class Application : private NonCopyable /** * This method initializes the Application instance. - * */ void Init(void); /** * This method de-initializes the Application instance. - * */ void Deinit(void); @@ -123,7 +119,6 @@ class Application : private NonCopyable * * @retval OTBR_ERROR_NONE The application exited without any error. * @retval OTBR_ERROR_ERRNO The application exited with some system error. - * */ otbrError Run(void); @@ -246,7 +241,6 @@ class Application : private NonCopyable * This method handles mDNS publisher's state changes. * * @param[in] aState The state of mDNS publisher. - * */ void HandleMdnsState(Mdns::Publisher::State aState); diff --git a/src/agent/uris.hpp b/src/agent/uris.hpp index 9fe79c1a3d7..632fc9f2e12 100644 --- a/src/agent/uris.hpp +++ b/src/agent/uris.hpp @@ -38,7 +38,6 @@ namespace otbr { /** * The URI Path for Address Query. - * */ #define OT_URI_PATH_ADDRESS_QUERY "a/aq" @@ -46,7 +45,6 @@ namespace otbr { * @def OT_URI_PATH_ADDRESS_NOTIFY * * The URI Path for Address Notify. - * */ #define OT_URI_PATH_ADDRESS_NOTIFY "a/an" @@ -54,7 +52,6 @@ namespace otbr { * @def OT_URI_PATH_ADDRESS_ERROR * * The URI Path for Address Error. - * */ #define OT_URI_PATH_ADDRESS_ERROR "a/ae" @@ -62,7 +59,6 @@ namespace otbr { * @def OT_URI_PATH_ADDRESS_RELEASE * * The URI Path for Address Release. - * */ #define OT_URI_PATH_ADDRESS_RELEASE "a/ar" @@ -70,7 +66,6 @@ namespace otbr { * @def OT_URI_PATH_ADDRESS_SOLICIT * * The URI Path for Address Solicit. - * */ #define OT_URI_PATH_ADDRESS_SOLICIT "a/as" @@ -78,7 +73,6 @@ namespace otbr { * @def OT_URI_PATH_ACTIVE_GET * * The URI Path for MGMT_ACTIVE_GET - * */ #define OT_URI_PATH_ACTIVE_GET "c/ag" @@ -86,7 +80,6 @@ namespace otbr { * @def OT_URI_PATH_ACTIVE_SET * * The URI Path for MGMT_ACTIVE_SET - * */ #define OT_URI_PATH_ACTIVE_SET "c/as" @@ -94,7 +87,6 @@ namespace otbr { * @def OT_URI_PATH_DATASET_CHANGED * * The URI Path for MGMT_DATASET_CHANGED - * */ #define OT_URI_PATH_DATASET_CHANGED "c/dc" @@ -102,7 +94,6 @@ namespace otbr { * @def OT_URI_PATH_ENERGY_SCAN * * The URI Path for Energy Scan - * */ #define OT_URI_PATH_ENERGY_SCAN "c/es" @@ -110,7 +101,6 @@ namespace otbr { * @def OT_URI_PATH_ENERGY_REPORT * * The URI Path for Energy Report - * */ #define OT_URI_PATH_ENERGY_REPORT "c/er" @@ -118,7 +108,6 @@ namespace otbr { * @def OT_URI_PATH_PENDING_GET * * The URI Path for MGMT_PENDING_GET - * */ #define OT_URI_PATH_PENDING_GET "c/pg" @@ -126,7 +115,6 @@ namespace otbr { * @def OT_URI_PATH_PENDING_SET * * The URI Path for MGMT_PENDING_SET - * */ #define OT_URI_PATH_PENDING_SET "c/ps" @@ -134,7 +122,6 @@ namespace otbr { * @def OT_URI_PATH_SERVER_DATA * * The URI Path for Server Data Registration. - * */ #define OT_URI_PATH_SERVER_DATA "a/sd" @@ -142,7 +129,6 @@ namespace otbr { * @def OT_URI_PATH_ANNOUNCE_BEGIN * * The URI Path for Announce Begin. - * */ #define OT_URI_PATH_ANNOUNCE_BEGIN "c/ab" @@ -150,7 +136,6 @@ namespace otbr { * @def OT_URI_PATH_RELAY_RX * * The URI Path for Relay RX. - * */ #define OT_URI_PATH_RELAY_RX "c/rx" @@ -158,7 +143,6 @@ namespace otbr { * @def OT_URI_PATH_RELAY_TX * * The URI Path for Relay TX. - * */ #define OT_URI_PATH_RELAY_TX "c/tx" @@ -166,7 +150,6 @@ namespace otbr { * @def OT_URI_PATH_JOINER_FINALIZE * * The URI Path for Joiner Finalize - * */ #define OT_URI_PATH_JOINER_FINALIZE "c/jf" @@ -174,7 +157,6 @@ namespace otbr { * @def OT_URI_PATH_JOINER_ENTRUST * * The URI Path for Joiner Entrust - * */ #define OT_URI_PATH_JOINER_ENTRUST "c/je" @@ -182,7 +164,6 @@ namespace otbr { * @def OT_URI_PATH_LEADER_PETITION * * The URI Path for Leader Petition - * */ #define OT_URI_PATH_LEADER_PETITION "c/lp" @@ -190,7 +171,6 @@ namespace otbr { * @def OT_URI_PATH_LEADER_KEEP_ALIVE * * The URI Path for Leader Keep Alive - * */ #define OT_URI_PATH_LEADER_KEEP_ALIVE "c/la" @@ -198,7 +178,6 @@ namespace otbr { * @def OT_URI_PATH_PANID_CONFLICT * * The URI Path for PAN ID Conflict - * */ #define OT_URI_PATH_PANID_CONFLICT "c/pc" @@ -206,7 +185,6 @@ namespace otbr { * @def OT_URI_PATH_PANID_QUERY * * The URI Path for PAN ID Query - * */ #define OT_URI_PATH_PANID_QUERY "c/pq" @@ -214,7 +192,6 @@ namespace otbr { * @def OT_URI_PATH_COMMISSIONER_GET * * The URI Path for MGMT_COMMISSIONER_GET - * */ #define OT_URI_PATH_COMMISSIONER_GET "c/cg" @@ -222,7 +199,6 @@ namespace otbr { * @def OT_URI_PATH_COMMISSIONER_SET * * The URI Path for MGMT_COMMISSIONER_SET - * */ #define OT_URI_PATH_COMMISSIONER_SET "c/cs" @@ -230,7 +206,6 @@ namespace otbr { * @def OT_URI_PATH_COMMISSIONER_PETITION * * The URI Path for Commissioner Petition. - * */ #define OT_URI_PATH_COMMISSIONER_PETITION "c/cp" @@ -238,7 +213,6 @@ namespace otbr { * @def OT_URI_PATH_COMMISSIONER_KEEP_ALIVE * * The URI Path for Commissioner Keep Alive. - * */ #define OT_URI_PATH_COMMISSIONER_KEEP_ALIVE "c/ca" @@ -246,7 +220,6 @@ namespace otbr { * @def OT_URI_PATH_DIAGNOSTIC_GET_REQUEST * * The URI Path for Network Diagnostic Get Request. - * */ #define OT_URI_PATH_DIAGNOSTIC_GET_REQUEST "d/dg" @@ -254,7 +227,6 @@ namespace otbr { * @def OT_URI_PATH_DIAGNOSTIC_GET_QUERY * * The URI Path for Network Diagnostic Get Query. - * */ #define OT_URI_PATH_DIAGNOSTIC_GET_QUERY "d/dq" @@ -262,7 +234,6 @@ namespace otbr { * @def OT_URI_PATH_DIAGNOSTIC_GET_ANSWER * * The URI Path for Network Diagnostic Get Answer. - * */ #define OT_URI_PATH_DIAGNOSTIC_GET_ANSWER "d/da" @@ -270,7 +241,6 @@ namespace otbr { * @def OT_URI_PATH_DIAG_RST * * The URI Path for Network Diagnostic Reset. - * */ #define OT_URI_PATH_DIAGNOSTIC_RESET "d/dr" diff --git a/src/backbone_router/backbone_agent.hpp b/src/backbone_router/backbone_agent.hpp index 67cb4a150f8..9f1d1884a72 100644 --- a/src/backbone_router/backbone_agent.hpp +++ b/src/backbone_router/backbone_agent.hpp @@ -63,7 +63,6 @@ namespace BackboneRouter { /** * This class implements Thread Backbone agent functionality. - * */ class BackboneAgent : private NonCopyable { @@ -74,13 +73,11 @@ class BackboneAgent : private NonCopyable * This constructor intiializes the `BackboneAgent` instance. * * @param[in] aHost The Thread controller instance. - * */ BackboneAgent(otbr::Ncp::RcpHost &aHost, std::string aInterfaceName, std::string aBackboneInterfaceName); /** * This method initializes the Backbone agent. - * */ void Init(void); diff --git a/src/backbone_router/constants.hpp b/src/backbone_router/constants.hpp index 363e34c3df8..245710cd5fe 100644 --- a/src/backbone_router/constants.hpp +++ b/src/backbone_router/constants.hpp @@ -50,7 +50,6 @@ namespace BackboneRouter { /** * Backbone configurations. - * */ enum { diff --git a/src/backbone_router/dua_routing_manager.hpp b/src/backbone_router/dua_routing_manager.hpp index bb4c929c736..54d76998a99 100644 --- a/src/backbone_router/dua_routing_manager.hpp +++ b/src/backbone_router/dua_routing_manager.hpp @@ -60,14 +60,12 @@ namespace BackboneRouter { /** * This class implements the DUA routing manager. - * */ class DuaRoutingManager : private NonCopyable { public: /** * This constructor initializes a DUA routing manager instance. - * */ explicit DuaRoutingManager(std::string aInterfaceName, std::string aBackboneInterfaceName) : mEnabled(false) @@ -78,13 +76,11 @@ class DuaRoutingManager : private NonCopyable /** * This method enables the DUA routing manager. - * */ void Enable(const Ip6Prefix &aDomainPrefix); /** * This method disables the DUA routing manager. - * */ void Disable(void); diff --git a/src/backbone_router/nd_proxy.hpp b/src/backbone_router/nd_proxy.hpp index 92823c75c28..1a6690cb563 100644 --- a/src/backbone_router/nd_proxy.hpp +++ b/src/backbone_router/nd_proxy.hpp @@ -71,14 +71,12 @@ namespace BackboneRouter { /** * This class implements ND Proxy manager. - * */ class NdProxyManager : public MainloopProcessor, private NonCopyable { public: /** * This constructor initializes a NdProxyManager instance. - * */ explicit NdProxyManager(otbr::Ncp::RcpHost &aHost, std::string aBackboneInterfaceName) : mHost(aHost) @@ -92,7 +90,6 @@ class NdProxyManager : public MainloopProcessor, private NonCopyable /** * This method initializes a ND Proxy manager instance. - * */ void Init(void); @@ -100,13 +97,11 @@ class NdProxyManager : public MainloopProcessor, private NonCopyable * This method enables the ND Proxy manager. * * @param[in] aDomainPrefix The Domain Prefix. - * */ void Enable(const Ip6Prefix &aDomainPrefix); /** * This method disables the ND Proxy manager. - * */ void Disable(void); @@ -119,7 +114,6 @@ class NdProxyManager : public MainloopProcessor, private NonCopyable * @param[in] aEvent The Backbone Router ND Proxy event type. * @param[in] aDua The Domain Unicast Address of the ND Proxy, or `nullptr` if @p `aEvent` is * `OT_BACKBONE_ROUTER_NDPROXY_CLEARED`. - * */ void HandleBackboneRouterNdProxyEvent(otBackboneRouterNdProxyEvent aEvent, const otIp6Address *aDua); @@ -127,7 +121,6 @@ class NdProxyManager : public MainloopProcessor, private NonCopyable * This method returns if the ND Proxy manager is enabled. * * @returns If the ND Proxy manager is enabled; - * */ bool IsEnabled(void) const { return mIcmp6RawSock >= 0; } diff --git a/src/border_agent/border_agent.cpp b/src/border_agent/border_agent.cpp index d63c6176318..47283972a07 100644 --- a/src/border_agent/border_agent.cpp +++ b/src/border_agent/border_agent.cpp @@ -83,7 +83,6 @@ static constexpr int kEpskcRandomGenLen = 8; /** * Locators - * */ enum { diff --git a/src/border_agent/border_agent.hpp b/src/border_agent/border_agent.hpp index 577368af966..ed9686f4c3f 100644 --- a/src/border_agent/border_agent.hpp +++ b/src/border_agent/border_agent.hpp @@ -74,7 +74,6 @@ namespace otbr { /** * This class implements Thread border agent functionality. - * */ class BorderAgent : private NonCopyable { @@ -87,7 +86,6 @@ class BorderAgent : private NonCopyable * * @param[in] aHost A reference to the Thread controller. * @param[in] aPublisher A reference to the mDNS Publisher. - * */ BorderAgent(otbr::Ncp::RcpHost &aHost, Mdns::Publisher &aPublisher); @@ -121,7 +119,6 @@ class BorderAgent : private NonCopyable * This method enables/disables the Border Agent. * * @param[in] aIsEnabled Whether to enable the Border Agent. - * */ void SetEnabled(bool aIsEnabled); @@ -129,13 +126,11 @@ class BorderAgent : private NonCopyable * This method enables/disables the Border Agent Ephemeral Key feature. * * @param[in] aIsEnabled Whether to enable the BA Ephemeral Key feature. - * */ void SetEphemeralKeyEnabled(bool aIsEnabled); /** * This method returns the Border Agent Ephemeral Key feature state. - * */ bool GetEphemeralKeyEnabled(void) const { return mIsEphemeralKeyEnabled; } @@ -143,7 +138,6 @@ class BorderAgent : private NonCopyable * This method handles mDNS publisher's state changes. * * @param[in] aState The state of mDNS publisher. - * */ void HandleMdnsState(Mdns::Publisher::State aState); @@ -162,7 +156,6 @@ class BorderAgent : private NonCopyable * This method adds a callback for ephemeral key changes. * * @param[in] aCallback The callback to receive ephemeral key changed events. - * */ void AddEphemeralKeyChangedCallback(EphemeralKeyChangedCallback aCallback); diff --git a/src/common/api_strings.hpp b/src/common/api_strings.hpp index 30ec9b8093f..7093e049772 100644 --- a/src/common/api_strings.hpp +++ b/src/common/api_strings.hpp @@ -30,7 +30,6 @@ * @file * This file has helper functions to convert internal state representations * to string (useful for APIs). - * */ #ifndef OTBR_COMMON_API_STRINGS_HPP_ #define OTBR_COMMON_API_STRINGS_HPP_ diff --git a/src/common/callback.hpp b/src/common/callback.hpp index 7df19e5d53c..3af21d35c67 100644 --- a/src/common/callback.hpp +++ b/src/common/callback.hpp @@ -51,7 +51,6 @@ template class OnceCallback; * * Inspired by Chromium base::OnceCallback * (https://chromium.googlesource.com/chromium/src.git/+/refs/heads/main/base/callback.h). - * */ template class OnceCallback { diff --git a/src/common/code_utils.hpp b/src/common/code_utils.hpp index ade155c04f2..f6d2620faf2 100644 --- a/src/common/code_utils.hpp +++ b/src/common/code_utils.hpp @@ -52,7 +52,6 @@ * @param[in] aAlignType The type to align with and convert the pointer to this type. * * @returns A pointer to aligned memory. - * */ #define OTBR_ALIGNED(aMem, aAlignType) \ reinterpret_cast( \ @@ -74,7 +73,6 @@ * the status is unsuccessful. * * @param[in] aStatus A scalar status to be evaluated against zero (0). - * */ #define SuccessOrExit(aStatus, ...) \ do \ @@ -92,7 +90,6 @@ * * @param[in] aStatus A scalar error status to be evaluated against zero (0). * @param[in] aMessage A message (text string) to print on failure. - * */ #define SuccessOrDie(aStatus, aMessage) \ do \ @@ -112,7 +109,6 @@ * @param[in] aCondition A Boolean expression to be evaluated. * @param[in] ... An expression or block to execute when the * assertion fails. - * */ #define VerifyOrExit(aCondition, ...) \ do \ @@ -130,7 +126,6 @@ * * @param[in] aCondition The condition to verify * @param[in] aMessage A message (text string) to print on failure. - * */ #define VerifyOrDie(aCondition, aMessage) \ do \ @@ -146,7 +141,6 @@ * This macro prints the message and terminates the program. * * @param[in] aMessage A message (text string) to print. - * */ #define DieNow(aMessage) \ do \ @@ -165,7 +159,6 @@ * * @param[in] ... An optional expression or block to execute * when the assertion fails. - * */ #define ExitNow(...) \ do \ @@ -192,7 +185,6 @@ uint64_t ConvertOpenThreadUint64(const uint8_t *aValue); /** * This class makes any class that derives from it non-copyable. It is intended to be used as a private base class. - * */ class NonCopyable { diff --git a/src/common/dns_utils.hpp b/src/common/dns_utils.hpp index 13d8e8c285f..4645369cccb 100644 --- a/src/common/dns_utils.hpp +++ b/src/common/dns_utils.hpp @@ -29,7 +29,6 @@ /** * @file * This file includes DNS utilities. - * */ #ifndef OTBR_COMMON_DNS_UTILS_HPP_ #define OTBR_COMMON_DNS_UTILS_HPP_ @@ -42,7 +41,6 @@ * This structure represents DNS Name information. * * @sa SplitFullDnsName - * */ struct DnsNameInfo { @@ -55,7 +53,6 @@ struct DnsNameInfo * This method returns if the DNS name is a service instance. * * @returns Whether the DNS name is a service instance. - * */ bool IsServiceInstance(void) const { return !mInstanceName.empty(); }; @@ -63,7 +60,6 @@ struct DnsNameInfo * This method returns if the DNS name is a service. * * @returns Whether the DNS name is a service. - * */ bool IsService(void) const { return !mServiceName.empty() && mInstanceName.empty(); } @@ -71,7 +67,6 @@ struct DnsNameInfo * This method returns if the DNS name is a host. * * @returns Whether the DNS name is a host. - * */ bool IsHost(void) const { return mServiceName.empty(); } }; @@ -84,7 +79,6 @@ struct DnsNameInfo * @returns A `DnsNameInfo` structure containing DNS name information. * * @sa DnsNameInfo - * */ DnsNameInfo SplitFullDnsName(const std::string &aName); @@ -97,7 +91,6 @@ DnsNameInfo SplitFullDnsName(const std::string &aName); * * @retval OTBR_ERROR_NONE Successfully split the full service name. * @retval OTBR_ERROR_INVALID_ARGS If the full service name is not valid. - * */ otbrError SplitFullServiceName(const std::string &aFullName, std::string &aType, std::string &aDomain); @@ -111,7 +104,6 @@ otbrError SplitFullServiceName(const std::string &aFullName, std::string &aType, * * @retval OTBR_ERROR_NONE Successfully split the full service instance name. * @retval OTBR_ERROR_INVALID_ARGS If the full service instance name is not valid. - * */ otbrError SplitFullServiceInstanceName(const std::string &aFullName, std::string &aInstanceName, @@ -127,7 +119,6 @@ otbrError SplitFullServiceInstanceName(const std::string &aFullName, * * @retval OTBR_ERROR_NONE Successfully split the full host name. * @retval OTBR_ERROR_INVALID_ARGS If the full host name is not valid. - * */ otbrError SplitFullHostName(const std::string &aFullName, std::string &aHostName, std::string &aDomain); diff --git a/src/common/logging.hpp b/src/common/logging.hpp index ad36d4f5682..7015b8d2dca 100644 --- a/src/common/logging.hpp +++ b/src/common/logging.hpp @@ -46,7 +46,6 @@ /** * Logging level. - * */ typedef enum { @@ -79,7 +78,6 @@ void otbrLogSetLevel(otbrLogLevel aLevel); * Control log to syslog. * * @param[in] aEnabled True to enable logging to/via syslog. - * */ void otbrLogSyslogSetEnabled(bool aEnabled); @@ -90,7 +88,6 @@ void otbrLogSyslogSetEnabled(bool aEnabled); * @param[in] aLevel Log level of the logger. * @param[in] aPrintStderr Whether to log to stderr. * @param[in] aSyslogDisable Whether to disable logging to syslog. - * */ void otbrLogInit(const char *aProgramName, otbrLogLevel aLevel, bool aPrintStderr, bool aSyslogDisable); @@ -100,7 +97,6 @@ void otbrLogInit(const char *aProgramName, otbrLogLevel aLevel, bool aPrintStder * @param[in] aLevel Log level of the logger. * @param[in] aLogTag Log tag. * @param[in] aFormat Format string as in printf. - * */ void otbrLog(otbrLogLevel aLevel, const char *aLogTag, const char *aFormat, ...); @@ -110,7 +106,6 @@ void otbrLog(otbrLogLevel aLevel, const char *aLogTag, const char *aFormat, ...) * @param[in] aLevel Log level of the logger. * @param[in] aFormat Format string as in printf. * @param[in] aArgList The variable-length arguments list. - * */ void otbrLogv(otbrLogLevel aLevel, const char *aFormat, va_list aArgList); @@ -120,7 +115,6 @@ void otbrLogv(otbrLogLevel aLevel, const char *aFormat, va_list aArgList); * @param[in] aLevel Log level of the logger. * @param[in] aFormat Format string as in printf. * @param[in] aArgList The variable-length arguments list. - * */ void otbrLogvNoFilter(otbrLogLevel aLevel, const char *aFormat, va_list aArgList); @@ -132,7 +126,6 @@ void otbrLogvNoFilter(otbrLogLevel aLevel, const char *aFormat, va_list aArgList * @param[in] aPrefix String before dumping memory. * @param[in] aMemory The pointer to the memory to be dumped. * @param[in] aSize The size of memory in bytes to be dumped. - * */ void otbrDump(otbrLogLevel aLevel, const char *aLogTag, const char *aPrefix, const void *aMemory, size_t aSize); @@ -142,13 +135,11 @@ void otbrDump(otbrLogLevel aLevel, const char *aLogTag, const char *aPrefix, con * @param[in] aError The error code. * * @returns The string information of error. - * */ const char *otbrErrorString(otbrError aError); /** * This function deinitializes the logging service. - * */ void otbrLogDeinit(void); @@ -161,7 +152,6 @@ void otbrLogDeinit(void); * @param[in] aError The action result. * @param[in] aFormat Format string as in printf. * @param[in] ... Arguments for the format specification. - * */ #define otbrLogResult(aError, aFormat, ...) \ do \ @@ -177,7 +167,6 @@ void otbrLogDeinit(void); * Log at level emergency. * * @param[in] ... Arguments for the format specification. - * */ /** @@ -186,7 +175,6 @@ void otbrLogDeinit(void); * Log at level alert. * * @param[in] ... Arguments for the format specification. - * */ /** @@ -195,7 +183,6 @@ void otbrLogDeinit(void); * Log at level critical. * * @param[in] ... Arguments for the format specification. - * */ /** @@ -204,7 +191,6 @@ void otbrLogDeinit(void); * Log at level error. * * @param[in] ... Arguments for the format specification. - * */ /** @@ -213,7 +199,6 @@ void otbrLogDeinit(void); * Log at level warning. * * @param[in] ... Arguments for the format specification. - * */ /** @@ -222,7 +207,6 @@ void otbrLogDeinit(void); * Log at level notice. * * @param[in] ... Arguments for the format specification. - * */ /** @@ -231,7 +215,6 @@ void otbrLogDeinit(void); * Log at level information. * * @param[in] ... Arguments for the format specification. - * */ /** @@ -240,7 +223,6 @@ void otbrLogDeinit(void); * Log at level debug. * * @param[in] ... Arguments for the format specification. - * */ #define otbrLogEmerg(...) otbrLog(OTBR_LOG_EMERG, OTBR_LOG_TAG, __VA_ARGS__) #define otbrLogAlert(...) otbrLog(OTBR_LOG_ALERT, OTBR_LOG_TAG, __VA_ARGS__) diff --git a/src/common/mainloop.hpp b/src/common/mainloop.hpp index 57e960264b2..e887ceafc38 100644 --- a/src/common/mainloop.hpp +++ b/src/common/mainloop.hpp @@ -42,7 +42,6 @@ namespace otbr { /** * This type defines the context data for running a mainloop. - * */ class MainloopContext : public otSysMainloopContext { @@ -55,7 +54,6 @@ class MainloopContext : public otSysMainloopContext * This method adds a fd to the read fd set inside the MainloopContext. * * @param[in] aFd The fd to add. - * */ void AddFdToReadSet(int aFd); @@ -64,7 +62,6 @@ class MainloopContext : public otSysMainloopContext * * @param[in] aFd The fd to add. * @param[in] aFdSetsMask A bitmask indicating which fd sets to add. - * */ void AddFdToSet(int aFd, uint8_t aFdSetsMask); }; @@ -72,7 +69,6 @@ class MainloopContext : public otSysMainloopContext /** * This abstract class defines the interface of a mainloop processor * which adds fds to the mainloop context and handles fds events. - * */ class MainloopProcessor { @@ -85,7 +81,6 @@ class MainloopProcessor * This method updates the mainloop context. * * @param[in,out] aMainloop A reference to the mainloop to be updated. - * */ virtual void Update(MainloopContext &aMainloop) = 0; @@ -93,7 +88,6 @@ class MainloopProcessor * This method processes mainloop events. * * @param[in] aMainloop A reference to the mainloop context. - * */ virtual void Process(const MainloopContext &aMainloop) = 0; }; diff --git a/src/common/mainloop_manager.hpp b/src/common/mainloop_manager.hpp index 739d9de4182..f379e2dfb8a 100644 --- a/src/common/mainloop_manager.hpp +++ b/src/common/mainloop_manager.hpp @@ -48,20 +48,17 @@ namespace otbr { /** * This class implements the mainloop manager. - * */ class MainloopManager : private NonCopyable { public: /** * The constructor to initialize the mainloop manager. - * */ MainloopManager() = default; /** * This method returns the singleton instance of the mainloop manager. - * */ static MainloopManager &GetInstance(void) { @@ -73,7 +70,6 @@ class MainloopManager : private NonCopyable * This method adds a mainloop processors to the mainloop managger. * * @param[in] aMainloopProcessor A pointer to the mainloop processor. - * */ void AddMainloopProcessor(MainloopProcessor *aMainloopProcessor); @@ -81,7 +77,6 @@ class MainloopManager : private NonCopyable * This method removes a mainloop processors from the mainloop managger. * * @param[in] aMainloopProcessor A pointer to the mainloop processor. - * */ void RemoveMainloopProcessor(MainloopProcessor *aMainloopProcessor); @@ -89,7 +84,6 @@ class MainloopManager : private NonCopyable * This method updates the mainloop context of all mainloop processors. * * @param[in,out] aMainloop A reference to the mainloop to be updated. - * */ void Update(MainloopContext &aMainloop); @@ -97,7 +91,6 @@ class MainloopManager : private NonCopyable * This method processes mainloop events of all mainloop processors. * * @param[in] aMainloop A reference to the mainloop context. - * */ void Process(const MainloopContext &aMainloop); diff --git a/src/common/task_runner.hpp b/src/common/task_runner.hpp index 1e72e80775a..f56d613d792 100644 --- a/src/common/task_runner.hpp +++ b/src/common/task_runner.hpp @@ -52,14 +52,12 @@ namespace otbr { /** * This class implements the Task Runner that executes * tasks on the mainloop. - * */ class TaskRunner : public MainloopProcessor, private NonCopyable { public: /** * This type represents the generic executable task. - * */ template using Task = std::function; @@ -67,19 +65,16 @@ class TaskRunner : public MainloopProcessor, private NonCopyable * This type represents a unique task ID to an delayed task. * * Note: A valid task ID is never zero. - * */ typedef uint64_t TaskId; /** * This constructor initializes the Task Runner instance. - * */ TaskRunner(void); /** * This destructor destroys the Task Runner instance. - * */ ~TaskRunner(void) override; @@ -90,7 +85,6 @@ class TaskRunner : public MainloopProcessor, private NonCopyable * It is safe to call this method in different threads concurrently. * * @param[in] aTask The task to be executed. - * */ void Post(Task aTask); @@ -104,7 +98,6 @@ class TaskRunner : public MainloopProcessor, private NonCopyable * @param[in] aTask The task to be executed. * * @returns The unique task ID of the delayed task. - * */ TaskId Post(Milliseconds aDelay, Task aTask); @@ -113,7 +106,6 @@ class TaskRunner : public MainloopProcessor, private NonCopyable * It is safe to call this method in different threads concurrently. * * @param[in] aTaskId The unique task ID of the delayed task to cancel. - * */ void Cancel(TaskId aTaskId); @@ -125,7 +117,6 @@ class TaskRunner : public MainloopProcessor, private NonCopyable * the caller will be blocked forever. * * @returns The result returned by the task @p aTask. - * */ template T PostAndWait(const Task &aTask) { diff --git a/src/common/tlv.hpp b/src/common/tlv.hpp index 16bc00adcb8..ade73b71bd3 100644 --- a/src/common/tlv.hpp +++ b/src/common/tlv.hpp @@ -43,7 +43,6 @@ namespace otbr { /** * This class implements TMF Tlv functionality. - * */ class Tlv { @@ -57,13 +56,11 @@ class Tlv * This method returns the Tlv type. * * @returns The Tlv type. - * */ uint8_t GetType(void) const { return mType; } /** * This method sets the Tlv type. - * */ void SetType(uint8_t aType) { mType = aType; } @@ -71,7 +68,6 @@ class Tlv * This method returns the Tlv length. * * @returns The Tlv length. - * */ uint16_t GetLength(void) const { @@ -99,7 +95,6 @@ class Tlv * This method returns a pointer to the value. * * @returns The Tlv value. - * */ const void *GetValue(void) const { @@ -111,7 +106,6 @@ class Tlv * This method returns the value as a uint16_t. * * @returns The uint16_t value. - * */ uint16_t GetValueUInt16(void) const { @@ -124,7 +118,6 @@ class Tlv * This method returns the value as a uint8_t. * * @returns The uint8_t value. - * */ uint8_t GetValueUInt8(void) const { return *static_cast(GetValue()); } @@ -132,7 +125,6 @@ class Tlv * This method sets a uint64_t as the value. * * @param[in] aValue The uint64_t value. - * */ void SetValue(uint64_t aValue) { @@ -150,7 +142,6 @@ class Tlv * This method sets a uint32_t as the value. * * @param[in] aValue The uint32_t value. - * */ void SetValue(uint32_t aValue) { @@ -168,7 +159,6 @@ class Tlv * This method sets uint16_t as the value. * * @param[in] aValue The uint16_t value. - * */ void SetValue(uint16_t aValue) { @@ -184,7 +174,6 @@ class Tlv * This method sets uint8_t as the value. * * @param[in] aValue The uint8_t value. - * */ void SetValue(uint8_t aValue) { @@ -196,7 +185,6 @@ class Tlv * This method sets int8_t as the value. * * @param[in] aValue The int8_t value. - * */ void SetValue(int8_t aValue) { @@ -217,7 +205,6 @@ class Tlv * This method returns the pointer to the next Tlv. * * @returns A pointer to the next Tlv. - * */ const Tlv *GetNext(void) const { @@ -228,7 +215,6 @@ class Tlv * This method returns the pointer to the next Tlv. * * @returns A pointer to the next Tlv. - * */ Tlv *GetNext(void) { return reinterpret_cast(static_cast(GetValue()) + GetLength()); } diff --git a/src/common/types.hpp b/src/common/types.hpp index c9cb2d07fe5..a102a9eba98 100644 --- a/src/common/types.hpp +++ b/src/common/types.hpp @@ -50,7 +50,6 @@ #ifndef IN6ADDR_ANY /** * Any IPv6 address literal. - * */ #define IN6ADDR_ANY "::" #endif @@ -63,7 +62,6 @@ /** * Forward declaration for otIp6Prefix to avoid including - * */ struct otIp6Prefix; @@ -107,14 +105,12 @@ static constexpr char kLinkLocalAllNodesMulticastAddress[] = "ff02::01"; /** * This class implements the Ipv6 address functionality. - * */ class Ip6Address { public: /** * Default constructor. - * */ Ip6Address(void) { @@ -126,7 +122,6 @@ class Ip6Address * Constructor with an 16-bit Thread locator. * * @param[in] aLocator The 16-bit Thread locator, RLOC or ALOC. - * */ Ip6Address(uint16_t aLocator) { @@ -141,7 +136,6 @@ class Ip6Address * Constructor with an Ip6 address. * * @param[in] aAddress The Ip6 address. - * */ Ip6Address(const uint8_t (&aAddress)[16]); @@ -149,7 +143,6 @@ class Ip6Address * Constructor with an otIp6Address. * * @param[in] aAddress A const reference to an otIp6Address. - * */ explicit Ip6Address(const otIp6Address &aAddress); @@ -157,7 +150,6 @@ class Ip6Address * Constructor with a string. * * @param[in] aString The string representing the IPv6 address. - * */ Ip6Address(const char *aString) { FromString(aString, *this); } @@ -167,7 +159,6 @@ class Ip6Address * @param[in] aOther The other Ip6 address to compare with. * * @returns Whether the Ip6 address is smaller than the other address. - * */ bool operator<(const Ip6Address &aOther) const { return memcmp(this, &aOther, sizeof(Ip6Address)) < 0; } @@ -177,7 +168,6 @@ class Ip6Address * @param[in] aOther The other Ip6 address to compare with. * * @returns Whether the Ip6 address is equal to the other address. - * */ bool operator==(const Ip6Address &aOther) const { return m64[0] == aOther.m64[0] && m64[1] == aOther.m64[1]; } @@ -187,7 +177,6 @@ class Ip6Address * @param[in] aOther The other Ip6 address to compare with. * * @returns Whether the Ip6 address is NOT equal to the other address. - * */ bool operator!=(const Ip6Address &aOther) const { return !(*this == aOther); } @@ -195,7 +184,6 @@ class Ip6Address * Retrieve the 16-bit Thread locator. * * @returns RLOC16 or ALOC16. - * */ uint16_t ToLocator(void) const { return static_cast(m8[14] << 8 | m8[15]); } @@ -203,7 +191,6 @@ class Ip6Address * This method returns the solicited node multicast address. * * @returns The solicited node multicast address. - * */ Ip6Address ToSolicitedNodeMulticastAddress(void) const; @@ -211,7 +198,6 @@ class Ip6Address * This method returns the string representation for the Ip6 address. * * @returns The string representation of the Ip6 address. - * */ std::string ToString(void) const; @@ -220,7 +206,6 @@ class Ip6Address * * @retval TRUE If the Ip6 address is the Unspecified Address. * @retval FALSE If the Ip6 address is not the Unspecified Address. - * */ bool IsUnspecified(void) const { return m64[0] == 0 && m64[1] == 0; } @@ -228,7 +213,6 @@ class Ip6Address * This method returns if the Ip6 address is a multicast address. * * @returns Whether the Ip6 address is a multicast address. - * */ bool IsMulticast(void) const { return m8[0] == 0xff; } @@ -236,7 +220,6 @@ class Ip6Address * This method returns if the Ip6 address is a link-local address. * * @returns Whether the Ip6 address is a link-local address. - * */ bool IsLinkLocal(void) const { return (m16[0] & bswap_16(0xffc0)) == bswap_16(0xfe80); } @@ -245,7 +228,6 @@ class Ip6Address * * @retval TRUE If the Ip6 address is the Loopback Address. * @retval FALSE If the Ip6 address is not the Loopback Address. - * */ bool IsLoopback(void) const { return (m32[0] == 0 && m32[1] == 0 && m32[2] == 0 && m32[3] == htobe32(1)); } @@ -253,7 +235,6 @@ class Ip6Address * This function returns the wellknown Link Local All Nodes Multicast Address (ff02::1). * * @returns The Link Local All Nodes Multicast Address. - * */ static const Ip6Address &GetLinkLocalAllNodesMulticastAddress(void) { @@ -266,7 +247,6 @@ class Ip6Address * This function returns the wellknown Solicited Node Multicast Address Prefix (ff02::01:ff00:0). * * @returns The Solicited Node Multicast Address Prefix. - * */ static const Ip6Address &GetSolicitedMulticastAddressPrefix(void) { @@ -283,7 +263,6 @@ class Ip6Address * * @retval OTBR_ERROR_NONE If the Ip6 address was successfully converted. * @retval OTBR_ERROR_INVALID_ARGS If @p `aStr` is not a valid string representing of Ip6 address. - * */ static otbrError FromString(const char *aStr, Ip6Address &aAddr); @@ -291,7 +270,6 @@ class Ip6Address * This method copies the Ip6 address to a `sockaddr_in6` structure. * * @param[out] aSockAddr The `sockaddr_in6` structure to copy the Ip6 address to. - * */ void CopyTo(struct sockaddr_in6 &aSockAddr) const; @@ -299,7 +277,6 @@ class Ip6Address * This method copies the Ip6 address from a `sockaddr_in6` structure. * * @param[in] aSockAddr The `sockaddr_in6` structure to copy the Ip6 address from. - * */ void CopyFrom(const struct sockaddr_in6 &aSockAddr); @@ -307,7 +284,6 @@ class Ip6Address * This method copies the Ip6 address to a `in6_addr` structure. * * @param[out] aIn6Addr The `in6_addr` structure to copy the Ip6 address to. - * */ void CopyTo(struct in6_addr &aIn6Addr) const; @@ -315,7 +291,6 @@ class Ip6Address * This method copies the Ip6 address from a `in6_addr` structure. * * @param[in] aIn6Addr The `in6_addr` structure to copy the Ip6 address from. - * */ void CopyFrom(const struct in6_addr &aIn6Addr); @@ -333,14 +308,12 @@ class Ip6Address /** * This class represents a Ipv6 prefix. - * */ class Ip6Prefix { public: /** * Default constructor. - * */ Ip6Prefix(void) { Clear(); } @@ -349,7 +322,6 @@ class Ip6Prefix * * @param[in] aIp6AddrStr The IPv6 address string. * @param[in] aLength The prefix length. - * */ Ip6Prefix(const char *aIp6AddrStr, uint8_t aLength) : mPrefix(aIp6AddrStr) @@ -367,7 +339,6 @@ class Ip6Prefix * @param[in] aOther The Ip6Prefix object to compare with. * * @returns True if the two objects are equal, false otherwise. - * */ bool operator==(const Ip6Prefix &aOther) const; @@ -377,7 +348,6 @@ class Ip6Prefix * @param[in] aOther The Ip6Prefix object to compare with. * * @returns True if the two objects are NOT equal, false otherwise. - * */ bool operator!=(const Ip6Prefix &aOther) const; @@ -385,7 +355,6 @@ class Ip6Prefix * This method sets the Ip6 prefix to an `otIp6Prefix` value. * * @param[in] aPrefix The `otIp6Prefix` value to set the Ip6 prefix. - * */ void Set(const otIp6Prefix &aPrefix); @@ -393,13 +362,11 @@ class Ip6Prefix * This method returns the string representation for the Ip6 prefix. * * @returns The string representation of the Ip6 prefix. - * */ std::string ToString(void) const; /** * This method clears the Ip6 prefix to be unspecified. - * */ void Clear(void) { memset(reinterpret_cast(this), 0, sizeof(*this)); } @@ -407,7 +374,6 @@ class Ip6Prefix * This method returns if the Ip6 prefix is valid. * * @returns If the Ip6 prefix is valid. - * */ bool IsValid(void) const { return mLength > 0 && mLength <= 128; } @@ -415,7 +381,6 @@ class Ip6Prefix * This method checks if the object is the default route prefix ("::/0") * * @returns true if the object is the default route prefix, false otherwise. - * */ bool IsDefaultRoutePrefix(void) const { return (*this == Ip6Prefix("::", 0)); } @@ -423,7 +388,6 @@ class Ip6Prefix * This method checks if the object is the ULA prefix ("fc00::/7") * * @returns true if the object is the ULA prefix, false otherwise. - * */ bool IsUlaPrefix(void) const { return (*this == Ip6Prefix("fc00::", 7)); } @@ -433,7 +397,6 @@ class Ip6Prefix /** * This class represents a Ipv6 address and its info. - * */ class Ip6AddressInfo { @@ -472,7 +435,6 @@ class MacAddress public: /** * Default constructor. - * */ MacAddress(void) { @@ -485,7 +447,6 @@ class MacAddress * This method returns the string representation for the MAC address. * * @returns The string representation of the MAC address. - * */ std::string ToString(void) const; @@ -540,7 +501,6 @@ static constexpr size_t kMaxProductNameLength = 24; * @param[in] aError a otbrError code. * * @returns a otError code. - * */ otError OtbrErrorToOtError(otbrError aError); diff --git a/src/dbus/client/client_error.hpp b/src/dbus/client/client_error.hpp index 7f499bdc6c1..8a0363d0e29 100644 --- a/src/dbus/client/client_error.hpp +++ b/src/dbus/client/client_error.hpp @@ -52,7 +52,6 @@ namespace DBus { * * @returns The corresponding otError. OT_ERROR_GENERIC will be returned * if the error name is not defined in OpenThread. - * */ ClientError ConvertFromDBusErrorName(const std::string &aErrorName); @@ -62,7 +61,6 @@ ClientError ConvertFromDBusErrorName(const std::string &aErrorName); * @param[in] aMessage The dbus reply message. * * @returns The error code encoded in the message. - * */ ClientError CheckErrorMessage(DBusMessage *aMessage); diff --git a/src/dbus/client/thread_api_dbus.hpp b/src/dbus/client/thread_api_dbus.hpp index d881f4e9f49..e817e525355 100644 --- a/src/dbus/client/thread_api_dbus.hpp +++ b/src/dbus/client/thread_api_dbus.hpp @@ -64,7 +64,6 @@ class ThreadApiDBus * Will use the default interfacename * * @param[in] aConnection The dbus connection. - * */ ThreadApiDBus(DBusConnection *aConnection); @@ -73,7 +72,6 @@ class ThreadApiDBus * * @param[in] aConnection The dbus connection. * @param[in] aInterfaceName The network interface name. - * */ ThreadApiDBus(DBusConnection *aConnection, const std::string &aInterfaceName); @@ -81,7 +79,6 @@ class ThreadApiDBus * This method adds a callback for device role change. * * @param[in] aHandler The device role handler. - * */ void AddDeviceRoleHandler(const DeviceRoleHandler &aHandler); @@ -94,7 +91,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError PermitUnsecureJoin(uint16_t aPort, uint32_t aSeconds); @@ -106,7 +102,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError Scan(const ScanHandler &aHandler); @@ -121,7 +116,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError EnergyScan(uint32_t aScanDuration, const EnergyScanHandler &aHandler); @@ -138,7 +132,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError Attach(const std::string &aNetworkName, uint16_t aPanId, @@ -159,7 +152,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError Attach(const OtResultHandler &aHandler); @@ -169,7 +161,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError Detach(const OtResultHandler &aHandler); @@ -188,7 +179,6 @@ class ThreadApiDBus * @retval OT_ERROR_INVALID_STATE The device is attaching. * @retval OT_ERROR_INVALID_ARGS Arguments are invalid. * @retval OT_ERROR_BUSY There is an ongoing request. - * */ ClientError AttachAllNodesTo(const std::vector &aDataset); @@ -200,7 +190,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError FactoryReset(const OtResultHandler &aHandler); @@ -210,7 +199,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError Reset(void); @@ -230,7 +218,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError JoinerStart(const std::string &aPskd, const std::string &aProvisioningUrl, @@ -246,7 +233,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError JoinerStop(void); @@ -258,7 +244,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError AddOnMeshPrefix(const OnMeshPrefix &aPrefix); @@ -270,7 +255,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError RemoveOnMeshPrefix(const Ip6Prefix &aPrefix); @@ -282,7 +266,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError AddExternalRoute(const ExternalRoute &aExternalRoute); @@ -294,7 +277,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError RemoveExternalRoute(const Ip6Prefix &aPrefix); @@ -306,7 +288,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError SetMeshLocalPrefix(const std::array &aPrefix); @@ -318,7 +299,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError SetActiveDatasetTlvs(const std::vector &aDataset); @@ -331,7 +311,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError SetFeatureFlagListData(const std::vector &aFeatureFlagListData); @@ -343,7 +322,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError SetLinkMode(const LinkModeConfig &aConfig); @@ -355,7 +333,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError SetRadioRegion(const std::string &aRadioRegion); @@ -367,7 +344,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError SetNat64Enabled(bool aEnabled); @@ -379,7 +355,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError SetEphemeralKeyEnabled(bool aEnabled); @@ -391,7 +366,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError GetEphemeralKeyEnabled(bool &aEnabled); @@ -403,7 +377,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError GetLinkMode(LinkModeConfig &aConfig); @@ -415,7 +388,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError GetDeviceRole(DeviceRole &aDeviceRole); @@ -427,7 +399,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError GetNetworkName(std::string &aName); @@ -439,7 +410,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError GetPanId(uint16_t &aPanId); @@ -451,7 +421,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError GetExtPanId(uint64_t &aExtPanId); @@ -463,7 +432,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError GetChannel(uint16_t &aChannel); @@ -475,7 +443,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError GetNetworkKey(std::vector &aNetworkKey); @@ -487,7 +454,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError GetCcaFailureRate(uint16_t &aFailureRate); @@ -499,7 +465,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError GetLinkCounters(MacCounters &aCounters); // For telemetry @@ -511,7 +476,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError GetIp6Counters(IpCounters &aCounters); // For telemetry @@ -523,7 +487,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError GetSupportedChannelMask(uint32_t &aChannelMask); @@ -535,7 +498,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError GetPreferredChannelMask(uint32_t &aChannelMask); @@ -547,7 +509,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError GetRloc16(uint16_t &aRloc16); @@ -559,7 +520,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError GetExtendedAddress(uint64_t &aExtendedAddress); @@ -572,7 +532,6 @@ class ThreadApiDBus * @retval ERROR_DBUS dbus encode/decode error. * @retval OT_ERROR_INVALID_STATE The node is not a router. * @retval ... OpenThread defined error value otherwise. - * */ ClientError GetRouterId(uint8_t &aRouterId); @@ -584,7 +543,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError GetLeaderData(LeaderData &aLeaderData); @@ -596,7 +554,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError GetNetworkData(std::vector &aNetworkData); @@ -608,7 +565,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError GetStableNetworkData(std::vector &aNetworkData); @@ -620,7 +576,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError GetLocalLeaderWeight(uint8_t &aWeight); @@ -632,7 +587,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError GetChannelMonitorSampleCount(uint32_t &aSampleCount); @@ -644,7 +598,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError GetChannelMonitorAllChannelQualities(std::vector &aChannelQualities); @@ -656,7 +609,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError GetChildTable(std::vector &aChildTable); @@ -668,7 +620,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError GetNeighborTable(std::vector &aNeighborTable); @@ -680,7 +631,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError GetPartitionId(uint32_t &aPartitionId); @@ -692,7 +642,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError GetInstantRssi(int8_t &aRssi); @@ -704,7 +653,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError GetRadioTxPower(int8_t &aTxPower); @@ -716,7 +664,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError GetExternalRoutes(std::vector &aExternalRoutes); @@ -728,7 +675,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError GetOnMeshPrefixes(std::vector &aOnMeshPrefixes); @@ -740,7 +686,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError GetActiveDatasetTlvs(std::vector &aDataset); @@ -752,7 +697,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError GetPendingDatasetTlvs(std::vector &aDataset); @@ -765,7 +709,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError GetFeatureFlagListData(std::vector &aFeatureFlagListData); @@ -777,7 +720,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError GetRadioRegion(std::string &aRadioRegion); @@ -789,7 +731,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError GetSrpServerInfo(SrpServerInfo &aSrpServerInfo); @@ -802,7 +743,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError GetTrelInfo(TrelInfo &aTrelInfo); #endif @@ -815,7 +755,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError GetMdnsTelemetryInfo(MdnsTelemetryInfo &aMdnsTelemetryInfo); @@ -828,7 +767,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError GetDnssdCounters(DnssdCounters &aDnssdCounters); #endif @@ -837,7 +775,6 @@ class ThreadApiDBus * This method returns the network interface name the client is bound to. * * @returns The network interface name. - * */ std::string GetInterfaceName(void); @@ -856,7 +793,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError UpdateVendorMeshCopTxtEntries(std::vector &aUpdate); @@ -868,7 +804,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError GetNat64State(Nat64ComponentState &aState); @@ -880,7 +815,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError GetNat64Mappings(std::vector &aMappings); @@ -892,7 +826,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError GetNat64ProtocolCounters(Nat64ProtocolCounters &aCounters); @@ -904,7 +837,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError GetNat64ErrorCounters(Nat64ErrorCounters &aCounters); @@ -917,7 +849,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError GetTelemetryData(std::vector &aTelemetryData); @@ -930,7 +861,6 @@ class ThreadApiDBus * @retval ERROR_NONE Successfully performed the dbus function call * @retval ERROR_DBUS dbus encode/decode error * @retval ... OpenThread defined error value otherwise - * */ ClientError GetCapabilities(std::vector &aCapabilities); diff --git a/src/dbus/common/error.hpp b/src/dbus/common/error.hpp index 8b7a2239747..7d853d74754 100644 --- a/src/dbus/common/error.hpp +++ b/src/dbus/common/error.hpp @@ -46,7 +46,6 @@ namespace otbr { * @namespace otbr::DBus * * @brief This namespace contains OpenThread Border Router DBus API. - * */ namespace DBus { diff --git a/src/dbus/common/types.hpp b/src/dbus/common/types.hpp index 94687e05178..3c427bf64db 100644 --- a/src/dbus/common/types.hpp +++ b/src/dbus/common/types.hpp @@ -193,7 +193,6 @@ struct ExternalRoute /** * This structure represents the MAC layer counters. - * */ struct MacCounters { @@ -220,61 +219,51 @@ struct MacCounters * @p mTxTotal = @p mTxUnicast + @p mTxBroadcast * @p mTxTotal = @p mTxAckRequested + @p mTxNoAckRequested * @p mTxTotal = @p mTxData + @p mTxDataPoll + @p mTxBeacon + @p mTxBeaconRequest + @p mTxOther - * */ uint32_t mTxTotal; /** * The total number of unique unicast MAC frame transmission requests. - * */ uint32_t mTxUnicast; /** * The total number of unique broadcast MAC frame transmission requests. - * */ uint32_t mTxBroadcast; /** * The total number of unique MAC frame transmission requests with requested acknowledgment. - * */ uint32_t mTxAckRequested; /** * The total number of unique MAC frame transmission requests that were acked. - * */ uint32_t mTxAcked; /** * The total number of unique MAC frame transmission requests without requested acknowledgment. - * */ uint32_t mTxNoAckRequested; /** * The total number of unique MAC Data frame transmission requests. - * */ uint32_t mTxData; /** * The total number of unique MAC Data Poll frame transmission requests. - * */ uint32_t mTxDataPoll; /** * The total number of unique MAC Beacon frame transmission requests. - * */ uint32_t mTxBeacon; /** * The total number of unique MAC Beacon Request frame transmission requests. - * */ uint32_t mTxBeaconRequest; @@ -282,7 +271,6 @@ struct MacCounters * The total number of unique other MAC frame transmission requests. * * This counter is currently unused. - * */ uint32_t mTxOther; @@ -302,19 +290,16 @@ struct MacCounters * * Currently, this counter is invalid if the platform's radio driver capability includes * @sa OT_RADIO_CAPS_TRANSMIT_RETRIES. - * */ uint32_t mTxRetry; /** * The total number of unique MAC transmission packets that meet maximal retry limit for direct packets. - * */ uint32_t mTxDirectMaxRetryExpiry; /** * The total number of unique MAC transmission packets that meet maximal retry limit for indirect packets. - * */ uint32_t mTxIndirectMaxRetryExpiry; @@ -329,19 +314,16 @@ struct MacCounters * If @sa OT_RADIO_CAPS_TRANSMIT_RETRIES is enabled, this counter represents the total number of full CSMA/CA * failed attempts and it is incremented by one for each individual data frame request (regardless of the amount of * retransmissions). - * */ uint32_t mTxErrCca; /** * The total number of unique MAC transmission request failures cause by an abort error. - * */ uint32_t mTxErrAbort; /** * The total number of unique MAC transmission requests failures caused by a busy channel (a CSMA/CA fail). - * */ uint32_t mTxErrBusyChannel; @@ -350,61 +332,51 @@ struct MacCounters * * This counter counts all frames reported by the platform's radio driver, including frames * that were dropped, for example because of an FCS error. - * */ uint32_t mRxTotal; /** * The total number of unicast frames received. - * */ uint32_t mRxUnicast; /** * The total number of broadcast frames received. - * */ uint32_t mRxBroadcast; /** * The total number of MAC Data frames received. - * */ uint32_t mRxData; /** * The total number of MAC Data Poll frames received. - * */ uint32_t mRxDataPoll; /** * The total number of MAC Beacon frames received. - * */ uint32_t mRxBeacon; /** * The total number of MAC Beacon Request frames received. - * */ uint32_t mRxBeaconRequest; /** * The total number of other types of frames received. - * */ uint32_t mRxOther; /** * The total number of frames dropped by MAC Filter module, for example received from denylisted node. - * */ uint32_t mRxAddressFiltered; /** * The total number of frames dropped by destination address check, for example received frame for other node. - * */ uint32_t mRxDestAddrFiltered; @@ -413,25 +385,21 @@ struct MacCounters * * This counter may be incremented, for example when ACK frame generated by the receiver hasn't reached * transmitter node which performed retransmission. - * */ uint32_t mRxDuplicated; /** * The total number of frames dropped because of missing or malformed content. - * */ uint32_t mRxErrNoFrame; /** * The total number of frames dropped due to unknown neighbor. - * */ uint32_t mRxErrUnknownNeighbor; /** * The total number of frames dropped due to invalid source address. - * */ uint32_t mRxErrInvalidSrcAddr; @@ -440,19 +408,16 @@ struct MacCounters * * This counter may be incremented, for example when lower than expected Frame Counter is used * to encrypt the frame. - * */ uint32_t mRxErrSec; /** * The total number of frames dropped due to invalid FCS. - * */ uint32_t mRxErrFcs; /** * The total number of frames dropped due to other error. - * */ uint32_t mRxErrOther; }; diff --git a/src/dbus/server/dbus_agent.hpp b/src/dbus/server/dbus_agent.hpp index 7825ddc79b6..cd6793efa33 100644 --- a/src/dbus/server/dbus_agent.hpp +++ b/src/dbus/server/dbus_agent.hpp @@ -61,13 +61,11 @@ class DBusAgent : public MainloopProcessor, private NonCopyable * * @param[in] aHost A reference to the Thread host. * @param[in] aPublisher A reference to the MDNS publisher. - * */ DBusAgent(otbr::Ncp::ThreadHost &aHost, Mdns::Publisher &aPublisher); /** * This method initializes the dbus agent. - * */ void Init(otbr::BorderAgent &aBorderAgent); @@ -94,7 +92,6 @@ class DBusAgent : public MainloopProcessor, private NonCopyable /** * This map is used to track DBusWatch-es. - * */ std::set mWatches; }; diff --git a/src/dbus/server/dbus_object.hpp b/src/dbus/server/dbus_object.hpp index f1a628bbef5..d77f045000e 100644 --- a/src/dbus/server/dbus_object.hpp +++ b/src/dbus/server/dbus_object.hpp @@ -60,7 +60,6 @@ namespace DBus { /** * This class is a base class for implementing a d-bus object. - * */ class DBusObject : private NonCopyable { @@ -74,7 +73,6 @@ class DBusObject : private NonCopyable * * @param[in] aConnection The dbus-connection the object bounds to. * @param[in] aObjectPath The path of the object. - * */ DBusObject(DBusConnection *aConnection, const std::string &aObjectPath); @@ -85,7 +83,6 @@ class DBusObject : private NonCopyable * * @retval OTBR_ERROR_NONE Successfully registered the object. * @retval OTBR_ERROR_DBUS Failed to ragister an object. - * */ virtual otbrError Init(void); @@ -95,7 +92,6 @@ class DBusObject : private NonCopyable * @param[in] aInterfaceName The interface name. * @param[in] aMethodName The method name. * @param[in] aHandler The method handler. - * */ void RegisterMethod(const std::string &aInterfaceName, const std::string &aMethodName, @@ -107,7 +103,6 @@ class DBusObject : private NonCopyable * @param[in] aInterfaceName The interface name. * @param[in] aPropertyName The property name. * @param[in] aHandler The method handler. - * */ virtual void RegisterGetPropertyHandler(const std::string &aInterfaceName, const std::string &aPropertyName, @@ -119,7 +114,6 @@ class DBusObject : private NonCopyable * @param[in] aInterfaceName The interface name. * @param[in] aPropertyName The property name. * @param[in] aHandler The method handler. - * */ virtual void RegisterSetPropertyHandler(const std::string &aInterfaceName, const std::string &aPropertyName, @@ -131,7 +125,6 @@ class DBusObject : private NonCopyable * @param[in] aInterfaceName The interface name. * @param[in] aPropertyName The property name. * @param[in] aHandler The method handler. - * */ virtual void RegisterAsyncGetPropertyHandler(const std::string &aInterfaceName, const std::string &aPropertyName, @@ -146,7 +139,6 @@ class DBusObject : private NonCopyable * * @retval OTBR_ERROR_NONE Signal successfully sent. * @retval OTBR_ERROR_DBUS Failed to send the signal. - * */ template otbrError Signal(const std::string &aInterfaceName, @@ -174,7 +166,6 @@ class DBusObject : private NonCopyable * * @retval OTBR_ERROR_NONE Signal successfully sent. * @retval OTBR_ERROR_DBUS Failed to send the signal. - * */ template otbrError SignalPropertyChanged(const std::string &aInterfaceName, @@ -222,13 +213,11 @@ class DBusObject : private NonCopyable /** * The destructor of a d-bus object. - * */ virtual ~DBusObject(void); /** * Sends all outgoing messages, blocks until the message queue is empty. - * */ void Flush(void); diff --git a/src/dbus/server/dbus_request.hpp b/src/dbus/server/dbus_request.hpp index 2e7128657ea..27a803e6a72 100644 --- a/src/dbus/server/dbus_request.hpp +++ b/src/dbus/server/dbus_request.hpp @@ -53,7 +53,6 @@ namespace DBus { /** * This class represents a incoming call for a d-bus method. - * */ class DBusRequest { @@ -63,7 +62,6 @@ class DBusRequest * * @param[in] aConnection The dbus connection. * @param[in] aMessage The incoming dbus message. - * */ DBusRequest(DBusConnection *aConnection, DBusMessage *aMessage) : mConnection(aConnection) @@ -77,7 +75,6 @@ class DBusRequest * The copy constructor of dbus request. * * @param[in] aOther The object to be copied from. - * */ DBusRequest(const DBusRequest &aOther) : mConnection(nullptr) @@ -90,7 +87,6 @@ class DBusRequest * The assignment operator of dbus request. * * @param[in] aOther The object to be copied from. - * */ DBusRequest &operator=(const DBusRequest &aOther) { @@ -102,7 +98,6 @@ class DBusRequest * This method returns the message sent to call the d-bus method. * * @returns The dbus message. - * */ DBusMessage *GetMessage(void) { return mMessage; } @@ -110,7 +105,6 @@ class DBusRequest * This method returns underlying d-bus connection. * * @returns The dbus connection. - * */ DBusConnection *GetConnection(void) { return mConnection; } @@ -118,7 +112,6 @@ class DBusRequest * This method replies to the d-bus method call. * * @param[in] aReply The tuple to be sent. - * */ template void Reply(const std::tuple &aReply) { @@ -143,7 +136,6 @@ class DBusRequest * * @param[in] aError The error to be sent. * @param[in] aResult The return value of the method call, if any. - * */ template void ReplyOtResult(otError aError, Optional aResult = Optional()) @@ -186,7 +178,6 @@ class DBusRequest /** * The destructor of DBusRequest - * */ ~DBusRequest(void) { diff --git a/src/dbus/server/dbus_thread_object_ncp.hpp b/src/dbus/server/dbus_thread_object_ncp.hpp index aa7449ba31a..542dc260bd1 100644 --- a/src/dbus/server/dbus_thread_object_ncp.hpp +++ b/src/dbus/server/dbus_thread_object_ncp.hpp @@ -66,7 +66,6 @@ class DBusThreadObjectNcp : public DBusObject * @param[in] aConnection The dbus connection. * @param[in] aInterfaceName The dbus interface name. * @param[in] aHost The Thread controller. - * */ DBusThreadObjectNcp(DBusConnection &aConnection, const std::string &aInterfaceName, otbr::Ncp::NcpHost &aHost); @@ -75,7 +74,6 @@ class DBusThreadObjectNcp : public DBusObject * * @retval OTBR_ERROR_NONE The initialization succeeded. * @retval OTBR_ERROR_DBUS The initialization failed due to dbus connection. - * */ otbrError Init(void) override; diff --git a/src/dbus/server/dbus_thread_object_rcp.hpp b/src/dbus/server/dbus_thread_object_rcp.hpp index 15ec6598fdf..7e55907b703 100644 --- a/src/dbus/server/dbus_thread_object_rcp.hpp +++ b/src/dbus/server/dbus_thread_object_rcp.hpp @@ -68,7 +68,6 @@ class DBusThreadObjectRcp : public DBusObject * @param[in] aHost The Thread controller * @param[in] aPublisher The Mdns::Publisher * @param[in] aBorderAgent The Border Agent - * */ DBusThreadObjectRcp(DBusConnection &aConnection, const std::string &aInterfaceName, diff --git a/src/dbus/server/error_helper.hpp b/src/dbus/server/error_helper.hpp index 6b35ac1d9d1..c8ba79027a1 100644 --- a/src/dbus/server/error_helper.hpp +++ b/src/dbus/server/error_helper.hpp @@ -52,7 +52,6 @@ namespace DBus { * @param[in] aError The otError value. * * @returns The string representation of an otError. - * */ const char *ConvertToDBusErrorName(otError aError); diff --git a/src/mdns/mdns.hpp b/src/mdns/mdns.hpp index ed2dc7c03bd..45dff98d29c 100644 --- a/src/mdns/mdns.hpp +++ b/src/mdns/mdns.hpp @@ -69,14 +69,12 @@ namespace Mdns { /** * This interface defines the functionality of mDNS publisher. - * */ class Publisher : private NonCopyable { public: /** * This structure represents a key/value pair of the TXT record. - * */ struct TxtEntry { @@ -127,7 +125,6 @@ class Publisher : private NonCopyable /** * This structure represents information of a discovered service instance. - * */ struct DiscoveredInstanceInfo { @@ -148,7 +145,6 @@ class Publisher : private NonCopyable /** * This structure represents information of a discovered host. - * */ struct DiscoveredHostInfo { @@ -163,21 +159,18 @@ class Publisher : private NonCopyable /** * This function is called to notify a discovered service instance. - * */ using DiscoveredServiceInstanceCallback = std::function; /** * This function is called to notify a discovered host. - * */ using DiscoveredHostCallback = std::function; /** * mDNS state values. - * */ enum class State { @@ -196,13 +189,11 @@ class Publisher : private NonCopyable * * @retval OTBR_ERROR_NONE Successfully started mDNS publisher; * @retval OTBR_ERROR_MDNS Failed to start mDNS publisher. - * */ virtual otbrError Start(void) = 0; /** * This method stops the mDNS publisher. - * */ virtual void Stop(void) = 0; @@ -211,7 +202,6 @@ class Publisher : private NonCopyable * * @retval true Already started. * @retval false Not started. - * */ virtual bool IsStarted(void) const = 0; @@ -233,7 +223,6 @@ class Publisher : private NonCopyable * failure. Specifically, `OTBR_ERROR_DUPLICATED` indicates that the name has * already been published and the caller can re-publish with a new name if an * alternative name is available/acceptable. - * */ void PublishService(const std::string &aHostName, const std::string &aName, @@ -249,7 +238,6 @@ class Publisher : private NonCopyable * @param[in] aName The name of this service. * @param[in] aType The type of this service, e.g., "_srv._udp" (MUST NOT end with dot). * @param[in] aCallback The callback for receiving the publishing result. - * */ virtual void UnpublishService(const std::string &aName, const std::string &aType, ResultCallback &&aCallback) = 0; @@ -266,7 +254,6 @@ class Publisher : private NonCopyable * failure. Specifically, `OTBR_ERROR_DUPLICATED` indicates that the name has * already been published and the caller can re-publish with a new name if an * alternative name is available/acceptable. - * */ void PublishHost(const std::string &aName, const AddressList &aAddresses, ResultCallback &&aCallback); @@ -275,7 +262,6 @@ class Publisher : private NonCopyable * * @param[in] aName A host name (MUST not end with dot). * @param[in] aCallback The callback for receiving the publishing result. - * */ virtual void UnpublishHost(const std::string &aName, ResultCallback &&aCallback) = 0; @@ -289,7 +275,6 @@ class Publisher : private NonCopyable * failure. Specifically, `OTBR_ERROR_DUPLICATED` indicates that the name has * already been published and the caller can re-publish with a new name if an * alternative name is available/acceptable. - * */ void PublishKey(const std::string &aName, const KeyData &aKeyData, ResultCallback &&aCallback); @@ -298,7 +283,6 @@ class Publisher : private NonCopyable * * @param[in] aName The name associated with key record. * @param[in] aCallback The callback for receiving the publishing result. - * */ virtual void UnpublishKey(const std::string &aName, ResultCallback &&aCallback) = 0; @@ -314,7 +298,6 @@ class Publisher : private NonCopyable * * @param[in] aType The service type, e.g., "_srv._udp" (MUST NOT end with dot). * @param[in] aInstanceName The service instance to subscribe, or empty to subscribe the service. - * */ virtual void SubscribeService(const std::string &aType, const std::string &aInstanceName) = 0; @@ -328,7 +311,6 @@ class Publisher : private NonCopyable * * @param[in] aType The service type, e.g., "_srv._udp" (MUST NOT end with dot). * @param[in] aInstanceName The service instance to unsubscribe, or empty to unsubscribe the service. - * */ virtual void UnsubscribeService(const std::string &aType, const std::string &aInstanceName) = 0; @@ -340,7 +322,6 @@ class Publisher : private NonCopyable * @note Discovery Proxy implementation guarantees no duplicate subscriptions for the same host. * * @param[in] aHostName The host name (without domain). - * */ virtual void SubscribeHost(const std::string &aHostName) = 0; @@ -350,7 +331,6 @@ class Publisher : private NonCopyable * @note Discovery Proxy implementation guarantees no redundant unsubscription for a host. * * @param[in] aHostName The host name (without domain). - * */ virtual void UnsubscribeHost(const std::string &aHostName) = 0; @@ -361,7 +341,6 @@ class Publisher : private NonCopyable * @param[in] aHostCallback The callback function to receive discovered hosts. * * @returns The Subscriber ID for the callbacks. - * */ uint64_t AddSubscriptionCallbacks(DiscoveredServiceInstanceCallback aInstanceCallback, DiscoveredHostCallback aHostCallback); @@ -370,7 +349,6 @@ class Publisher : private NonCopyable * This method cancels callbacks for subscriptions. * * @param[in] aSubscriberId The Subscriber ID previously returned by `AddSubscriptionCallbacks`. - * */ void RemoveSubscriptionCallbacks(uint64_t aSubscriberId); @@ -378,7 +356,6 @@ class Publisher : private NonCopyable * This method returns the mDNS statistics information of the publisher. * * @returns The MdnsTelemetryInfo of the publisher. - * */ const MdnsTelemetryInfo &GetMdnsTelemetryInfo(void) const { return mTelemetryInfo; } @@ -390,7 +367,6 @@ class Publisher : private NonCopyable * @param[in] aCallback The callback for receiving mDNS publisher state changes. * * @returns A pointer to the newly created mDNS publisher. - * */ static Publisher *Create(StateCallback aCallback); @@ -398,7 +374,6 @@ class Publisher : private NonCopyable * This function destroys the mDNS publisher. * * @param[in] aPublisher A pointer to the publisher. - * */ static void Destroy(Publisher *aPublisher); @@ -416,7 +391,6 @@ class Publisher : private NonCopyable * @retval OTBR_ERROR_INVALID_ARGS The @p aTxtList includes invalid TXT entry. * * @sa DecodeTxtData - * */ static otbrError EncodeTxtData(const TxtList &aTxtList, TxtData &aTxtData); @@ -434,7 +408,6 @@ class Publisher : private NonCopyable * @retval OTBR_ERROR_INVALID_ARGS The @p aTxtdata has invalid TXT format. * * @sa EncodeTxtData - * */ static otbrError DecodeTxtData(TxtList &aTxtList, const uint8_t *aTxtData, uint16_t aTxtLength); diff --git a/src/mdns/mdns_avahi.cpp b/src/mdns/mdns_avahi.cpp index 2f3984d739d..2d9719d6a5d 100644 --- a/src/mdns/mdns_avahi.cpp +++ b/src/mdns/mdns_avahi.cpp @@ -81,7 +81,6 @@ struct AvahiWatch * @param[in] aCallback The function to be called when events happened on this file descriptor. * @param[in] aContext A pointer to application-specific context. * @param[in] aPoller The AvahiPoller this watcher belongs to. - * */ AvahiWatch(int aFd, AvahiWatchEvent aEvents, AvahiWatchCallback aCallback, void *aContext, AvahiPoller &aPoller) : mFd(aFd) @@ -96,7 +95,6 @@ struct AvahiWatch /** * This structure implements the AvahiTimeout. - * */ struct AvahiTimeout { @@ -115,7 +113,6 @@ struct AvahiTimeout * @param[in] aCallback The function to be called after timeout. * @param[in] aContext A pointer to application-specific context. * @param[in] aPoller The AvahiPoller this timeout belongs to. - * */ AvahiTimeout(const struct timeval *aTimeout, AvahiTimeoutCallback aCallback, void *aContext, AvahiPoller &aPoller) : mCallback(aCallback) diff --git a/src/mdns/mdns_avahi.hpp b/src/mdns/mdns_avahi.hpp index d42f9a2b595..5a76ca24381 100644 --- a/src/mdns/mdns_avahi.hpp +++ b/src/mdns/mdns_avahi.hpp @@ -68,7 +68,6 @@ class AvahiPoller; /** * This class implements mDNS publisher with avahi. - * */ class PublisherAvahi : public Publisher { diff --git a/src/mdns/mdns_mdnssd.hpp b/src/mdns/mdns_mdnssd.hpp index 068d7861e85..07e641b1303 100644 --- a/src/mdns/mdns_mdnssd.hpp +++ b/src/mdns/mdns_mdnssd.hpp @@ -56,7 +56,6 @@ namespace Mdns { /** * This class implements mDNS publisher with mDNSResponder. - * */ class PublisherMDnsSd : public MainloopProcessor, public Publisher { diff --git a/src/ncp/async_task.hpp b/src/ncp/async_task.hpp index 5421d34bd4f..371f1fa7dd3 100644 --- a/src/ncp/async_task.hpp +++ b/src/ncp/async_task.hpp @@ -56,13 +56,11 @@ class AsyncTask * Constructor. * * @param[in] The error handler called when the result is not OT_ERROR_NONE; - * */ AsyncTask(const ResultHandler &aResultHandler); /** * Destructor. - * */ ~AsyncTask(void); @@ -70,7 +68,6 @@ class AsyncTask * Trigger the initial action of the chained async operations. * * This method should be called to trigger the chained async operations. - * */ void Run(void); @@ -81,7 +78,6 @@ class AsyncTask * This method will pass the result to next operation. * * @param[in] aError The result for the previous async operation. - * */ void SetResult(otError aError, const std::string &aErrorInfo); @@ -91,7 +87,6 @@ class AsyncTask * @param[in] aFirst A reference to a function object for the initial action. * * @returns A shared pointer to a AsyncTask object created in this method. - * */ AsyncTaskPtr &First(const ThenHandler &aFirst); @@ -101,7 +96,6 @@ class AsyncTask * @param[in] aThen A reference to a function object for the next action. * * @returns A shared pointer to a AsyncTask object created in this method. - * */ AsyncTaskPtr &Then(const ThenHandler &aThen); diff --git a/src/ncp/ncp_host.hpp b/src/ncp/ncp_host.hpp index 9d74177bbed..6bb18f77d07 100644 --- a/src/ncp/ncp_host.hpp +++ b/src/ncp/ncp_host.hpp @@ -47,14 +47,12 @@ namespace Ncp { /** * This class implements the NetworkProperties under NCP mode. - * */ class NcpNetworkProperties : virtual public NetworkProperties, public PropsObserver { public: /** * Constructor - * */ explicit NcpNetworkProperties(void); @@ -76,13 +74,11 @@ class NcpHost : public MainloopProcessor, public ThreadHost, public NcpNetworkPr * * @param[in] aInterfaceName A string of the NCP interface name. * @param[in] aDryRun TRUE to indicate dry-run mode. FALSE otherwise. - * */ NcpHost(const char *aInterfaceName, bool aDryRun); /** * Destructor. - * */ ~NcpHost(void) override = default; diff --git a/src/ncp/ncp_spinel.hpp b/src/ncp/ncp_spinel.hpp index e53294bad98..de869c97ec7 100644 --- a/src/ncp/ncp_spinel.hpp +++ b/src/ncp/ncp_spinel.hpp @@ -57,7 +57,6 @@ namespace Ncp { /** * This interface is an observer to subscribe the network properties from NCP. - * */ class PropsObserver { @@ -66,20 +65,17 @@ class PropsObserver * Updates the device role. * * @param[in] aRole The device role. - * */ virtual void SetDeviceRole(otDeviceRole aRole) = 0; /** * The destructor. - * */ virtual ~PropsObserver(void) = default; }; /** * The class provides methods for controlling the Thread stack on the network co-processor (NCP). - * */ class NcpSpinel : public Netif::Dependencies { @@ -91,7 +87,6 @@ class NcpSpinel : public Netif::Dependencies /** * Constructor. - * */ NcpSpinel(void); @@ -100,19 +95,16 @@ class NcpSpinel : public Netif::Dependencies * * @param[in] aSpinelDriver A reference to the SpinelDriver instance that this object depends. * @param[in] aObserver A reference to the Network properties observer. - * */ void Init(ot::Spinel::SpinelDriver &aSpinelDriver, PropsObserver &aObserver); /** * Do the de-initialization. - * */ void Deinit(void); /** * Returns the Co-processor version string. - * */ const char *GetCoprocessorVersion(void) { return mSpinelDriver->GetVersion(); } @@ -124,7 +116,6 @@ class NcpSpinel : public Netif::Dependencies * * @param[in] aActiveOpDatasetTlvs A reference to the active operational dataset of the Thread network. * @param[in] aAsyncTask A pointer to an async result to receive the result of this operation. - * */ void DatasetSetActiveTlvs(const otOperationalDatasetTlvs &aActiveOpDatasetTlvs, AsyncTaskPtr aAsyncTask); @@ -136,7 +127,6 @@ class NcpSpinel : public Netif::Dependencies * * @param[in] aPendingOpDatasetTlvsPtr A shared pointer to the pending operational dataset of the Thread network. * @param[in] aAsyncTask A pointer to an async result to receive the result of this operation. - * */ void DatasetMgmtSetPending(std::shared_ptr aPendingOpDatasetTlvsPtr, AsyncTaskPtr aAsyncTask); @@ -149,7 +139,6 @@ class NcpSpinel : public Netif::Dependencies * * @param[in] aEnable TRUE to enable and FALSE to disable. * @param[in] aAsyncTask A pointer to an async result to receive the result of this operation. - * */ void Ip6SetEnabled(bool aEnable, AsyncTaskPtr aAsyncTask); @@ -161,7 +150,6 @@ class NcpSpinel : public Netif::Dependencies * if it's not used immediately (within the callback). * * @param[in] aCallback The callback to handle the IP6 address table. - * */ void Ip6SetAddressCallback(const Ip6AddressTableCallback &aCallback) { mIp6AddressTableCallback = aCallback; } @@ -173,7 +161,6 @@ class NcpSpinel : public Netif::Dependencies * The callback will be invoked when receiving an IPv6 multicast address table from the NCP. * When the callback is invoked, the callback MUST copy the otIp6Address objects and maintain it * if it's not used immediately (within the callback). - * */ void Ip6SetAddressMulticastCallback(const Ip6MulticastAddressTableCallback &aCallback) { @@ -184,7 +171,6 @@ class NcpSpinel : public Netif::Dependencies * This method sets the callback to receive IP6 datagrams. * * @param[in] aCallback The callback to receive IP6 datagrams. - * */ void Ip6SetReceiveCallback(const Ip6ReceiveCallback &aCallback) { mIp6ReceiveCallback = aCallback; } @@ -196,7 +182,6 @@ class NcpSpinel : public Netif::Dependencies * * @retval OTBR_ERROR_NONE The datagram is sent to NCP successfully. * @retval OTBR_ERROR_BUSY NcpSpinel is busy with other requests. - * */ otbrError Ip6Send(const uint8_t *aData, uint16_t aLength) override; @@ -208,7 +193,6 @@ class NcpSpinel : public Netif::Dependencies * * @param[in] aEnable TRUE to enable and FALSE to disable. * @param[in] aAsyncTask A pointer to an async result to receive the result of this operation. - * */ void ThreadSetEnabled(bool aEnable, AsyncTaskPtr aAsyncTask); @@ -219,7 +203,6 @@ class NcpSpinel : public Netif::Dependencies * The new receiver @p aAsyncTask will be set a result OT_ERROR_BUSY. * * @param[in] aAsyncTask A pointer to an async result to receive the result of this operation. - * */ void ThreadDetachGracefully(AsyncTaskPtr aAsyncTask); @@ -230,7 +213,6 @@ class NcpSpinel : public Netif::Dependencies * The new receiver @p aAsyncTask will be set a result OT_ERROR_BUSY. * * @param[in] aAsyncTask A pointer to an async result to receive the result of this operation. - * */ void ThreadErasePersistentInfo(AsyncTaskPtr aAsyncTask); @@ -238,7 +220,6 @@ class NcpSpinel : public Netif::Dependencies * This method sets the callback invoked when the network interface state changes. * * @param[in] aCallback The callback invoked when the network interface state changes. - * */ void NetifSetStateChangedCallback(const NetifStateChangedCallback &aCallback) { diff --git a/src/ncp/rcp_host.hpp b/src/ncp/rcp_host.hpp index a13e70ccb30..79f441a16af 100644 --- a/src/ncp/rcp_host.hpp +++ b/src/ncp/rcp_host.hpp @@ -62,14 +62,12 @@ namespace Ncp { /** * This class implements the NetworkProperties for architectures where OT APIs are directly accessible. - * */ class OtNetworkProperties : virtual public NetworkProperties { public: /** * Constructor. - * */ explicit OtNetworkProperties(void); @@ -85,7 +83,6 @@ class OtNetworkProperties : virtual public NetworkProperties /** * This interface defines OpenThread Controller under RCP mode. - * */ class RcpHost : public MainloopProcessor, public ThreadHost, public OtNetworkProperties { @@ -100,7 +97,6 @@ class RcpHost : public MainloopProcessor, public ThreadHost, public OtNetworkPro * @param[in] aBackboneInterfaceName The Backbone network interface name. * @param[in] aDryRun TRUE to indicate dry-run mode. FALSE otherwise. * @param[in] aEnableAutoAttach Whether or not to automatically attach to the saved network. - * */ RcpHost(const char *aInterfaceName, const std::vector &aRadioUrls, @@ -110,13 +106,11 @@ class RcpHost : public MainloopProcessor, public ThreadHost, public OtNetworkPro /** * This method initialize the Thread controller. - * */ void Init(void) override; /** * This method deinitialize the Thread controller. - * */ void Deinit(void) override; @@ -132,7 +126,6 @@ class RcpHost : public MainloopProcessor, public ThreadHost, public OtNetworkPro * This method gets the thread functionality helper. * * @retval The pointer to the helper object. - * */ otbr::agent::ThreadHelper *GetThreadHelper(void) { @@ -148,7 +141,6 @@ class RcpHost : public MainloopProcessor, public ThreadHost, public OtNetworkPro * * @param[in] aDelay The delay in milliseconds before executing the task. * @param[in] aTask The task function. - * */ void PostTimerTask(Milliseconds aDelay, TaskRunner::Task aTask); @@ -156,7 +148,6 @@ class RcpHost : public MainloopProcessor, public ThreadHost, public OtNetworkPro * This method registers a reset handler. * * @param[in] aHandler The handler function. - * */ void RegisterResetHandler(std::function aHandler); @@ -164,13 +155,11 @@ class RcpHost : public MainloopProcessor, public ThreadHost, public OtNetworkPro * This method adds a event listener for Thread state changes. * * @param[in] aCallback The callback to receive Thread state changed events. - * */ void AddThreadStateChangedCallback(ThreadStateChangedCallback aCallback); /** * This method resets the OpenThread instance. - * */ void Reset(void); @@ -178,7 +167,6 @@ class RcpHost : public MainloopProcessor, public ThreadHost, public OtNetworkPro * This method returns the Thread protocol version as a string. * * @returns A pointer to the Thread version string. - * */ static const char *GetThreadVersion(void); @@ -186,7 +174,6 @@ class RcpHost : public MainloopProcessor, public ThreadHost, public OtNetworkPro * This method returns the Thread network interface name. * * @returns A pointer to the Thread network interface name string. - * */ const char *GetInterfaceName(void) const override { return mConfig.mInterfaceName; } @@ -199,7 +186,6 @@ class RcpHost : public MainloopProcessor, public ThreadHost, public OtNetworkPro * @param[in] aFeatureFlagList The feature flag list to be applied to OpenThread. * * @returns The error value of underlying OpenThread API calls. - * */ otError ApplyFeatureFlagList(const FeatureFlagList &aFeatureFlagList); @@ -207,7 +193,6 @@ class RcpHost : public MainloopProcessor, public ThreadHost, public OtNetworkPro * This method returns the applied FeatureFlagList in ApplyFeatureFlagList call. * * @returns the applied FeatureFlagList's serialized bytes. - * */ const std::string &GetAppliedFeatureFlagListBytes(void) { diff --git a/src/ncp/thread_host.hpp b/src/ncp/thread_host.hpp index 65e06356141..30b8e45a03d 100644 --- a/src/ncp/thread_host.hpp +++ b/src/ncp/thread_host.hpp @@ -60,13 +60,11 @@ class NetworkProperties * Returns the device role. * * @returns the device role. - * */ virtual otDeviceRole GetDeviceRole(void) const = 0; /** * The destructor. - * */ virtual ~NetworkProperties(void) = default; }; @@ -76,7 +74,6 @@ class NetworkProperties * Thread network. * * The APIs are unified for both NCP and RCP cases. - * */ class ThreadHost : virtual public NetworkProperties { @@ -96,7 +93,6 @@ class ThreadHost : virtual public NetworkProperties * @param[in] aEnableAutoAttach Whether or not to automatically attach to the saved network. * * @returns Non-null OpenThread Controller instance. - * */ static std::unique_ptr Create(const char *aInterfaceName, const std::vector &aRadioUrls, @@ -112,7 +108,6 @@ class ThreadHost : virtual public NetworkProperties * * @param[in] aActiveOpDatasetTlvs A reference to the active operational dataset of the Thread network. * @param[in] aReceiver A receiver to get the async result of this operation. - * */ virtual void Join(const otOperationalDatasetTlvs &aActiveOpDatasetTlvs, const AsyncResultReceiver &aRecevier) = 0; @@ -129,7 +124,6 @@ class ThreadHost : virtual public NetworkProperties * will be passed to @p aReceiver when the error happens. * * @param[in] aReceiver A receiver to get the async result of this operation. - * */ virtual void Leave(const AsyncResultReceiver &aRecevier) = 0; @@ -138,20 +132,17 @@ class ThreadHost : virtual public NetworkProperties * * @param[in] aPendingOpDatasetTlvs A reference to the pending operational dataset of the Thread network. * @param[in] aReceiver A receiver to get the async result of this operation. - * */ virtual void ScheduleMigration(const otOperationalDatasetTlvs &aPendingOpDatasetTlvs, const AsyncResultReceiver aReceiver) = 0; /** * Returns the co-processor type. - * */ virtual CoprocessorType GetCoprocessorType(void) = 0; /** * Returns the co-processor version string. - * */ virtual const char *GetCoprocessorVersion(void) = 0; @@ -159,25 +150,21 @@ class ThreadHost : virtual public NetworkProperties * This method returns the Thread network interface name. * * @returns A pointer to the Thread network interface name string. - * */ virtual const char *GetInterfaceName(void) const = 0; /** * Initializes the Thread controller. - * */ virtual void Init(void) = 0; /** * Deinitializes the Thread controller. - * */ virtual void Deinit(void) = 0; /** * The destructor. - * */ virtual ~ThreadHost(void) = default; diff --git a/src/openwrt/ubus/otubus.hpp b/src/openwrt/ubus/otubus.hpp index 8c44255ea3a..f9131c731d6 100644 --- a/src/openwrt/ubus/otubus.hpp +++ b/src/openwrt/ubus/otubus.hpp @@ -68,7 +68,6 @@ namespace ubus { * * @brief * This namespace contains definitions for ubus related instance. - * */ class UbusServer @@ -86,13 +85,11 @@ class UbusServer * This method return the instance of the global UbusServer. * * @retval The reference of the UbusServer Instance. - * */ static UbusServer &GetInstance(void); /** * This method install ubus object onto OpenWRT. - * */ void InstallUbusObject(void); @@ -106,7 +103,6 @@ class UbusServer * @param[in] aMsg A pointer to the ubus message. * * @retval 0 Successfully handler the request. - * */ static int UbusScanHandler(struct ubus_context *aContext, struct ubus_object *aObj, @@ -124,7 +120,6 @@ class UbusServer * @param[in] aMsg A pointer to the ubus message. * * @retval 0 Successfully handler the request. - * */ static int UbusChannelHandler(struct ubus_context *aContext, struct ubus_object *aObj, @@ -142,7 +137,6 @@ class UbusServer * @param[in] aMsg A pointer to the ubus message. * * @retval 0 Successfully handler the request. - * */ static int UbusSetChannelHandler(struct ubus_context *aContext, struct ubus_object *aObj, @@ -160,7 +154,6 @@ class UbusServer * @param[in] aMsg A pointer to the ubus message. * * @retval 0 Successfully handler the request. - * */ static int UbusNetworknameHandler(struct ubus_context *aContext, struct ubus_object *aObj, @@ -178,7 +171,6 @@ class UbusServer * @param[in] aMsg A pointer to the ubus message. * * @retval 0 Successfully handler the request. - * */ static int UbusSetNetworknameHandler(struct ubus_context *aContext, struct ubus_object *aObj, @@ -196,7 +188,6 @@ class UbusServer * @param[in] aMsg A pointer to the ubus message. * * @retval 0 Successfully handler the request. - * */ static int UbusStateHandler(struct ubus_context *aContext, struct ubus_object *aObj, @@ -214,7 +205,6 @@ class UbusServer * @param[in] aMsg A pointer to the ubus message. * * @retval 0 Successfully handler the request. - * */ static int UbusMacfilterSetStateHandler(struct ubus_context *aContext, struct ubus_object *aObj, @@ -232,7 +222,6 @@ class UbusServer * @param[in] aMsg A pointer to the ubus message. * * @retval 0 Successfully handler the request. - * */ static int UbusPanIdHandler(struct ubus_context *aContext, struct ubus_object *aObj, @@ -250,7 +239,6 @@ class UbusServer * @param[in] aMsg A pointer to the ubus message. * * @retval 0 Successfully handler the request. - * */ static int UbusSetPanIdHandler(struct ubus_context *aContext, struct ubus_object *aObj, @@ -268,7 +256,6 @@ class UbusServer * @param[in] aMsg A pointer to the ubus message. * * @retval 0 Successfully handler the request. - * */ static int UbusPskcHandler(struct ubus_context *aContext, struct ubus_object *aObj, @@ -286,7 +273,6 @@ class UbusServer * @param[in] aMsg A pointer to the ubus message. * * @retval 0 Successfully handler the request. - * */ static int UbusSetPskcHandler(struct ubus_context *aContext, struct ubus_object *aObj, @@ -304,7 +290,6 @@ class UbusServer * @param[in] aMsg A pointer to the ubus message. * * @retval 0 Successfully handler the request. - * */ static int UbusNetworkkeyHandler(struct ubus_context *aContext, struct ubus_object *aObj, @@ -322,7 +307,6 @@ class UbusServer * @param[in] aMsg A pointer to the ubus message. * * @retval 0 Successfully handler the request. - * */ static int UbusSetNetworkkeyHandler(struct ubus_context *aContext, struct ubus_object *aObj, @@ -340,7 +324,6 @@ class UbusServer * @param[in] aMsg A pointer to the ubus message. * * @retval 0 Successfully handler the request. - * */ static int UbusRloc16Handler(struct ubus_context *aContext, struct ubus_object *aObj, @@ -358,7 +341,6 @@ class UbusServer * @param[in] aMsg A pointer to the ubus message. * * @retval 0 Successfully handler the request. - * */ static int UbusExtPanIdHandler(struct ubus_context *aContext, struct ubus_object *aObj, @@ -376,7 +358,6 @@ class UbusServer * @param[in] aMsg A pointer to the ubus message. * * @retval 0 Successfully handler the request. - * */ static int UbusSetExtPanIdHandler(struct ubus_context *aContext, struct ubus_object *aObj, @@ -394,7 +375,6 @@ class UbusServer * @param[in] aMsg A pointer to the ubus message. * * @retval 0 Successfully handler the request. - * */ static int UbusModeHandler(struct ubus_context *aContext, struct ubus_object *aObj, @@ -412,7 +392,6 @@ class UbusServer * @param[in] aMsg A pointer to the ubus message. * * @retval 0 Successfully handler the request. - * */ static int UbusSetModeHandler(struct ubus_context *aContext, struct ubus_object *aObj, @@ -430,7 +409,6 @@ class UbusServer * @param[in] aMsg A pointer to the ubus message. * * @retval 0 Successfully handler the request. - * */ static int UbusPartitionIdHandler(struct ubus_context *aContext, struct ubus_object *aObj, @@ -448,7 +426,6 @@ class UbusServer * @param[in] aMsg A pointer to the ubus message. * * @retval 0 Successfully handler the request. - * */ static int UbusLeaderdataHandler(struct ubus_context *aContext, struct ubus_object *aObj, @@ -466,7 +443,6 @@ class UbusServer * @param[in] aMsg A pointer to the ubus message. * * @retval 0 Successfully handler the request. - * */ static int UbusNetworkdataHandler(struct ubus_context *aContext, struct ubus_object *aObj, @@ -484,7 +460,6 @@ class UbusServer * @param[in] aMsg A pointer to the ubus message. * * @retval 0 Successfully handler the request. - * */ static int UbusParentHandler(struct ubus_context *aContext, struct ubus_object *aObj, @@ -502,7 +477,6 @@ class UbusServer * @param[in] aMsg A pointer to the ubus message. * * @retval 0 Successfully handler the request. - * */ static int UbusNeighborHandler(struct ubus_context *aContext, struct ubus_object *aObj, @@ -520,7 +494,6 @@ class UbusServer * @param[in] aMsg A pointer to the ubus message. * * @retval 0 Successfully handler the request. - * */ static int UbusThreadStartHandler(struct ubus_context *aContext, struct ubus_object *aObj, @@ -538,7 +511,6 @@ class UbusServer * @param[in] aMsg A pointer to the ubus message. * * @retval 0 Successfully handler the request. - * */ static int UbusThreadStopHandler(struct ubus_context *aContext, struct ubus_object *aObj, @@ -556,7 +528,6 @@ class UbusServer * @param[in] aMsg A pointer to the ubus message. * * @retval 0 Successfully handler the request. - * */ static int UbusLeaveHandler(struct ubus_context *aContext, struct ubus_object *aObj, @@ -574,7 +545,6 @@ class UbusServer * @param[in] aMsg A pointer to the ubus message. * * @retval 0 Successfully handler the request. - * */ static int UbusMacfilterAddrHandler(struct ubus_context *aContext, struct ubus_object *aObj, @@ -592,7 +562,6 @@ class UbusServer * @param[in] aMsg A pointer to the ubus message. * * @retval 0 Successfully handler the request. - * */ static int UbusMacfilterStateHandler(struct ubus_context *aContext, struct ubus_object *aObj, @@ -610,7 +579,6 @@ class UbusServer * @param[in] aMsg A pointer to the ubus message. * * @retval 0 Successfully handler the request. - * */ static int UbusMacfilterAddHandler(struct ubus_context *aContext, struct ubus_object *aObj, @@ -628,7 +596,6 @@ class UbusServer * @param[in] aMsg A pointer to the ubus message. * * @retval 0 Successfully handler the request. - * */ static int UbusMacfilterClearHandler(struct ubus_context *aContext, struct ubus_object *aObj, @@ -646,7 +613,6 @@ class UbusServer * @param[in] aMsg A pointer to the ubus message. * * @retval 0 Successfully handler the request. - * */ static int UbusMacfilterRemoveHandler(struct ubus_context *aContext, struct ubus_object *aObj, @@ -664,7 +630,6 @@ class UbusServer * @param[in] aMsg A pointer to the ubus message. * * @retval 0 Successfully handler the request. - * */ static int UbusCommissionerStartHandler(struct ubus_context *aContext, struct ubus_object *aObj, @@ -682,7 +647,6 @@ class UbusServer * @param[in] aMsg A pointer to the ubus message. * * @retval 0 Successfully handler the request. - * */ static int UbusJoinerAddHandler(struct ubus_context *aContext, struct ubus_object *aObj, @@ -700,7 +664,6 @@ class UbusServer * @param[in] aMsg A pointer to the ubus message. * * @retval 0 Successfully handler the request. - * */ static int UbusJoinerRemoveHandler(struct ubus_context *aContext, struct ubus_object *aObj, @@ -718,7 +681,6 @@ class UbusServer * @param[in] aMsg A pointer to the ubus message. * * @retval 0 Successfully handler the request. - * */ static int UbusJoinerNumHandler(struct ubus_context *aContext, struct ubus_object *aObj, @@ -736,7 +698,6 @@ class UbusServer * @param[in] aMsg A pointer to the ubus message. * * @retval 0 Successfully handler the request. - * */ static int UbusMgmtsetHandler(struct ubus_context *aContext, struct ubus_object *aObj, @@ -754,7 +715,6 @@ class UbusServer * @param[in] aMsg A pointer to the ubus message. * * @retval 0 Successfully handler the request. - * */ static int UbusInterfaceNameHandler(struct ubus_context *aContext, struct ubus_object *aObj, @@ -769,7 +729,6 @@ class UbusServer * @param[in] aMessage A pointer to the message. * @param[in] aMessageInfo A pointer to the message information. * @param[in] aContext A pointer to the context. - * */ static void HandleDiagnosticGetResponse(otError aError, otMessage *aMessage, @@ -782,7 +741,6 @@ class UbusServer * @param[in] aError A error of receiving the diagnostic response. * @param[in] aMessage A pointer to the message. * @param[in] aMessageInfo A pointer to the message information. - * */ void HandleDiagnosticGetResponse(otError aError, otMessage *aMessage, const otMessageInfo *aMessageInfo); @@ -810,7 +768,6 @@ class UbusServer /** * This method start scan. - * */ void ProcessScan(void); @@ -824,7 +781,6 @@ class UbusServer * @param[in] aMsg A pointer to the ubus message. * * @retval 0 Successfully handler the request. - * */ int UbusScanHandlerDetail(struct ubus_context *aContext, struct ubus_object *aObj, @@ -837,7 +793,6 @@ class UbusServer * * @param[in] aResult A pointer to result. * @param[in] aContext A pointer to context. - * */ static void HandleActiveScanResult(otActiveScanResult *aResult, void *aContext); @@ -845,7 +800,6 @@ class UbusServer * This method detailly handler the scan result, called by HandleActiveScanResult. * * @param[in] aResult A pointer to result. - * */ void HandleActiveScanResultDetail(otActiveScanResult *aResult); @@ -859,7 +813,6 @@ class UbusServer * @param[in] aMsg A pointer to the ubus message. * * @retval 0 Successfully handler the request. - * */ int UbusNeighborHandlerDetail(struct ubus_context *aContext, struct ubus_object *aObj, @@ -877,7 +830,6 @@ class UbusServer * @param[in] aMsg A pointer to the ubus message. * * @retval 0 Successfully handler the request. - * */ int UbusParentHandlerDetail(struct ubus_context *aContext, struct ubus_object *aObj, @@ -895,7 +847,6 @@ class UbusServer * @param[in] aMsg A pointer to the ubus message. * * @retval 0 Successfully handler the request. - * */ int UbusMgmtset(struct ubus_context *aContext, struct ubus_object *aObj, @@ -913,7 +864,6 @@ class UbusServer * @param[in] aMsg A pointer to the ubus message. * * @retval 0 Successfully handler the request. - * */ int UbusLeaveHandlerDetail(struct ubus_context *aContext, struct ubus_object *aObj, @@ -932,7 +882,6 @@ class UbusServer * @param[in] aAction A pointer to the action needed. * * @retval 0 Successfully handler the request. - * */ int UbusThreadHandler(struct ubus_context *aContext, struct ubus_object *aObj, @@ -952,7 +901,6 @@ class UbusServer * @param[in] aAction A pointer to the action needed. * * @retval 0 Successfully handler the request. - * */ int UbusGetInformation(struct ubus_context *aContext, struct ubus_object *aObj, @@ -972,7 +920,6 @@ class UbusServer * @param[in] aAction A pointer to the action needed. * * @retval 0 Successfully handler the request. - * */ int UbusSetInformation(struct ubus_context *aContext, struct ubus_object *aObj, @@ -992,7 +939,6 @@ class UbusServer * @param[in] aAction A pointer to the action needed. * * @retval 0 Successfully handler the request. - * */ int UbusCommissioner(struct ubus_context *aContext, struct ubus_object *aObj, @@ -1006,7 +952,6 @@ class UbusServer * * @param[in] aState The state of commissioner. * @param[in] aContext A pointer to the ubus context. - * */ static void HandleStateChanged(otCommissionerState aState, void *aContext); @@ -1014,7 +959,6 @@ class UbusServer * This method handle conmmissione state change. * * @param[in] aState The state of commissioner. - * */ void HandleStateChanged(otCommissionerState aState); @@ -1025,7 +969,6 @@ class UbusServer * @param[in] aJoinerInfo A pointer to the Joiner Info. * @param[in] aJoinerId A pointer to the Joiner ID (if not known, it will be NULL). * @param[in] aContext A pointer to application-specific context. - * */ static void HandleJoinerEvent(otCommissionerJoinerEvent aEvent, const otJoinerInfo *aJoinerInfo, @@ -1038,7 +981,6 @@ class UbusServer * @param[in] aEvent The joiner event type. * @param[in] aJoinerInfo A pointer to the Joiner Info. * @param[in] aJoinerId A pointer to the Joiner ID (if not known, it will be NULL). - * */ void HandleJoinerEvent(otCommissionerJoinerEvent aEvent, const otJoinerInfo *aJoinerInfo, @@ -1049,13 +991,11 @@ class UbusServer * * @param[in] aInstance A pointer to the instance. * @param[out] aState A pointer to the string address. - * */ void GetState(otInstance *aInstance, char *aState); /** * This method add fd of ubus object. - * */ void UbusAddFd(void); @@ -1063,7 +1003,6 @@ class UbusServer * This method set ubus reconnect time. * * @param[in] aTimeout A pointer to the timeout. - * */ static void UbusReconnTimer(struct uloop_timeout *aTimeout); @@ -1071,7 +1010,6 @@ class UbusServer * This method detailly handle ubus reconnect time. * * @param[in] aTimeout A pointer to the timeout. - * */ void UbusReconnTimerDetail(struct uloop_timeout *aTimeout); @@ -1079,7 +1017,6 @@ class UbusServer * This method handle ubus connection lost. * * @param[in] aContext A pointer to the context. - * */ static void UbusConnectionLost(struct ubus_context *aContext); @@ -1089,13 +1026,11 @@ class UbusServer * @param[in] aPath A pointer to the ubus server path(default is nullptr). * * @retval 0 Successfully handler the request. - * */ int DisplayUbusInit(const char *aPath); /** * This method disconnect and display ubus. - * */ void DisplayUbusDone(void); @@ -1107,7 +1042,6 @@ class UbusServer * * @retval OT_ERROR_NONE Successfully parsed the ASCII string. * @retval OT_ERROR_PARSE Could not parse the ASCII string. - * */ otError ParseLong(char *aString, long &aLong); @@ -1128,7 +1062,6 @@ class UbusServer * @param[in] aBytes A pointer to the bytes need to be convert. * @param[in] aLength The length of the bytes. * @param[out] aOutput A pointer to the char* string. - * */ void OutputBytes(const uint8_t *aBytes, uint8_t aLength, char *aOutput); @@ -1138,7 +1071,6 @@ class UbusServer * @param[in] aError The error type of the message. * @param[in] aContext A pointer to the context. * @param[in] aRequest A pointer to the request. - * */ void AppendResult(otError aError, struct ubus_context *aContext, struct ubus_request_data *aRequest); }; @@ -1150,7 +1082,6 @@ class UBusAgent : public MainloopProcessor * The constructor to initialize the UBus agent. * * @param[in] aHost A reference to the Thread controller. - * */ UBusAgent(otbr::Ncp::RcpHost &aHost) : mHost(aHost) @@ -1160,7 +1091,6 @@ class UBusAgent : public MainloopProcessor /** * This method initializes the UBus agent. - * */ void Init(void); diff --git a/src/rest/connection.hpp b/src/rest/connection.hpp index 728c2b7e2fd..9ac30373122 100644 --- a/src/rest/connection.hpp +++ b/src/rest/connection.hpp @@ -50,7 +50,6 @@ namespace rest { /** * This class implements a Connection class of each socket connection. - * */ class Connection : public MainloopProcessor { @@ -64,20 +63,16 @@ class Connection : public MainloopProcessor * state. * @param[in] aResource A pointer to the resource handler. * @param[in] aFd The file descriptor for the connection. - * */ Connection(steady_clock::time_point aStartTime, Resource *aResource, int aFd); /** * The desctructor destroys the connection instance. - * */ ~Connection(void) override; /** * This method initializes the connection. - * - * */ void Init(void); @@ -89,7 +84,6 @@ class Connection : public MainloopProcessor * * @retval TRUE This connection could be released in next loop. * @retval FALSE This connection still needs to be processed in next loop. - * */ bool IsComplete(void) const; diff --git a/src/rest/json.hpp b/src/rest/json.hpp index 7df74db5ab0..22cc0f94615 100644 --- a/src/rest/json.hpp +++ b/src/rest/json.hpp @@ -49,7 +49,6 @@ namespace rest { /** * The functions within this namespace provides a tranformation from an object/string/number to a serialized Json * string. - * */ namespace Json { @@ -59,7 +58,6 @@ namespace Json { * @param[in] aNumber An integer need to be format. * * @returns A string of serialized Json number. - * */ std::string Number2JsonString(const uint32_t &aNumber); @@ -69,7 +67,6 @@ std::string Number2JsonString(const uint32_t &aNumber); * @param[in] aBytes A Bytes array representing a hex number. * * @returns A string of serialized Json string. - * */ std::string Bytes2HexJsonString(const uint8_t *aBytes, uint8_t aLength); @@ -81,7 +78,6 @@ std::string Bytes2HexJsonString(const uint8_t *aBytes, uint8_t aLength); * @param[in] aMaxLength Maximum length to parse (in bytes). * * @returns Number of bytes effectively parsed. - * */ int Hex2BytesJsonString(const std::string &aHexString, uint8_t *aBytes, uint8_t aMaxLength); @@ -91,7 +87,6 @@ int Hex2BytesJsonString(const std::string &aHexString, uint8_t *aBytes, uint8_t * @param[in] aCString A char pointer pointing to a C string. * * @returns A string of serialized Json string. - * */ std::string CString2JsonString(const char *aCString); @@ -101,7 +96,6 @@ std::string CString2JsonString(const char *aCString); * @param[in] aString A string. * * @returns A string of serialized Json string. - * */ std::string String2JsonString(const std::string &aString); @@ -121,7 +115,6 @@ bool JsonString2String(const std::string &aJsonString, std::string &aString); * @param[in] aNode A Node object. * * @returns A string of serialized Json object. - * */ std::string Node2JsonString(const NodeInfo &aNode); @@ -131,7 +124,6 @@ std::string Node2JsonString(const NodeInfo &aNode); * @param[in] aDiagSet A vector of diagnostic objects. * * @returns A string of serialized Json array. - * */ std::string Diag2JsonString(const std::vector> &aDiagSet); @@ -141,7 +133,6 @@ std::string Diag2JsonString(const std::vector> &aD * @param[in] aAddress An Ip6Address object. * * @returns A string of serialized Json string. - * */ std::string IpAddr2JsonString(const otIp6Address &aAddress); @@ -151,7 +142,6 @@ std::string IpAddr2JsonString(const otIp6Address &aAddress); * @param[in] aMode A LinkModeConfig object. * * @returns A string of serialized Json object. - * */ std::string Mode2JsonString(const otLinkModeConfig &aMode); @@ -161,7 +151,6 @@ std::string Mode2JsonString(const otLinkModeConfig &aMode); * @param[in] aConnectivity A Connectivity object. * * @returns A string of serialized Json object. - * */ std::string Connectivity2JsonString(const otNetworkDiagConnectivity &aConnectivity); @@ -171,7 +160,6 @@ std::string Connectivity2JsonString(const otNetworkDiagConnectivity &aConnectivi * @param[in] aRoute A Route object. * * @returns A string of serialized Json object. - * */ std::string Route2JsonString(const otNetworkDiagRoute &aRoute); @@ -181,7 +169,6 @@ std::string Route2JsonString(const otNetworkDiagRoute &aRoute); * @param[in] aRouteData A RouteData object. * * @returns A string of serialized Json object. - * */ std::string RouteData2JsonString(const otNetworkDiagRouteData &aRouteData); @@ -191,7 +178,6 @@ std::string RouteData2JsonString(const otNetworkDiagRouteData &aRouteData); * @param[in] aLeaderData A LeaderData object. * * @returns A string of serialized Json object. - * */ std::string LeaderData2JsonString(const otLeaderData &aLeaderData); @@ -201,7 +187,6 @@ std::string LeaderData2JsonString(const otLeaderData &aLeaderData); * @param[in] aMacCounters A MacCounters object. * * @returns A string of serialized Json object. - * */ std::string MacCounters2JsonString(const otNetworkDiagMacCounters &aMacCounters); @@ -211,7 +196,6 @@ std::string MacCounters2JsonString(const otNetworkDiagMacCounters &aMacCounters) * @param[in] aChildEntry A ChildEntry object. * * @returns A string of serialized Json object. - * */ std::string ChildTableEntry2JsonString(const otNetworkDiagChildEntry &aChildEntry); @@ -222,7 +206,6 @@ std::string ChildTableEntry2JsonString(const otNetworkDiagChildEntry &aChildEntr * @param[in] aErrorMessage Error message such as '404 Not Found'. * * @returns A string of serialized Json object. - * */ std::string Error2JsonString(HttpStatusCode aErrorCode, std::string aErrorMessage); @@ -232,7 +215,6 @@ std::string Error2JsonString(HttpStatusCode aErrorCode, std::string aErrorMessag * @param[in] aDataset A dataset struct. * * @returns A string of serialized Json object. - * */ std::string ActiveDataset2JsonString(const otOperationalDataset &aDataset); @@ -242,7 +224,6 @@ std::string ActiveDataset2JsonString(const otOperationalDataset &aDataset); * @param[in] aDataset A dataset struct. * * @returns A string of serialized Json object. - * */ std::string PendingDataset2JsonString(const otOperationalDataset &aPendingDataset); @@ -255,7 +236,6 @@ std::string PendingDataset2JsonString(const otOperationalDataset &aPendingDatase * @param[in] aDataset The dataset struct to be filled. * * @returns If the Json string has been successfully parsed. - * */ bool JsonActiveDatasetString2Dataset(const std::string &aJsonActiveDataset, otOperationalDataset &aDataset); @@ -268,7 +248,6 @@ bool JsonActiveDatasetString2Dataset(const std::string &aJsonActiveDataset, otOp * @param[in] aDataset The dataset struct to be filled. * * @returns If the Json string has been successfully parsed. - * */ bool JsonPendingDatasetString2Dataset(const std::string &aJsonPendingDataset, otOperationalDataset &aDataset); diff --git a/src/rest/parser.hpp b/src/rest/parser.hpp index b79d79a83c5..f54378787e3 100644 --- a/src/rest/parser.hpp +++ b/src/rest/parser.hpp @@ -51,7 +51,6 @@ namespace rest { /** * This class implements Parser class in OTBR-REST which is used to parse the data from read buffer and form a request. - * */ class Parser { @@ -60,13 +59,11 @@ class Parser * The constructor of a http request parser instance. * * @param[in] aRequest A pointer to a request instance. - * */ Parser(Request *aRequest); /** * This method initializea the http-parser. - * */ void Init(void); @@ -75,7 +72,6 @@ class Parser * * @param[in] aBuf A pointer pointing to read buffer. * @param[in] aLength An integer indicates how much data is to be processed by parser. - * */ void Process(const char *aBuf, size_t aLength); diff --git a/src/rest/request.hpp b/src/rest/request.hpp index ceb92a5f2e4..ccae84f5ab2 100644 --- a/src/rest/request.hpp +++ b/src/rest/request.hpp @@ -47,14 +47,12 @@ namespace rest { /** * This class implements an instance to host services used by border router. - * */ class Request { public: /** * The constructor is to initialize Request instance. - * */ Request(void); @@ -63,7 +61,6 @@ class Request * * @param[in] aString A pointer points to url string. * @param[in] aLength Length of the url string - * */ void SetUrl(const char *aString, size_t aLength); @@ -72,7 +69,6 @@ class Request * * @param[in] aString A pointer points to body string. * @param[in] aLength Length of the body string - * */ void SetBody(const char *aString, size_t aLength); @@ -80,7 +76,6 @@ class Request * This method sets the content-length field of a request. * * @param[in] aContentLength An unsigned integer representing content-length. - * */ void SetContentLength(size_t aContentLength); @@ -88,7 +83,6 @@ class Request * This method sets the method of the parsed request. * * @param[in] aMethod An integer representing request method. - * */ void SetMethod(int32_t aMethod); @@ -97,7 +91,6 @@ class Request * * @param[in] aString A pointer points to body string. * @param[in] aLength Length of the body string - * */ void SetNextHeaderField(const char *aString, size_t aLength); @@ -106,19 +99,16 @@ class Request * * @param[in] aString A pointer points to body string. * @param[in] aLength Length of the body string - * */ void SetHeaderValue(const char *aString, size_t aLength); /** * This method labels the request as complete which means it no longer need to be parsed one more time . - * */ void SetReadComplete(void); /** * This method resets the request then it could be set by parser from start. - * */ void ResetReadComplete(void); @@ -153,8 +143,6 @@ class Request /** * This method indicates whether this request is parsed completely. - * - * */ bool IsComplete(void) const; diff --git a/src/rest/resource.hpp b/src/rest/resource.hpp index 0929dbcc50c..7982843b3a6 100644 --- a/src/rest/resource.hpp +++ b/src/rest/resource.hpp @@ -58,7 +58,6 @@ namespace rest { /** * This class implements the Resource handler for OTBR-REST. - * */ class Resource { @@ -67,14 +66,11 @@ class Resource * The constructor initializes the resource handler instance. * * @param[in] aHost A pointer to the Thread controller. - * */ Resource(RcpHost *aHost); /** * This method initialize the Resource handler. - * - * */ void Init(void); @@ -84,7 +80,6 @@ class Resource * * @param[in] aRequest A request instance referred by the Resource handler. * @param[in,out] aResponse A response instance will be set by the Resource handler. - * */ void Handle(Request &aRequest, Response &aResponse) const; @@ -93,7 +88,6 @@ class Resource * * @param[in] aRequest A request instance referred by the Resource handler. * @param[in,out] aResponse A response instance will be set by the Resource handler. - * */ void HandleCallback(Request &aRequest, Response &aResponse); @@ -103,14 +97,12 @@ class Resource * * @param[in] aRequest A request instance referred by the Resource handler. * @param[in,out] aErrorCode An enum class represents the status code. - * */ void ErrorHandler(Response &aResponse, HttpStatusCode aErrorCode) const; private: /** * This enumeration represents the Dataset type (active or pending). - * */ enum class DatasetType : uint8_t { diff --git a/src/rest/response.hpp b/src/rest/response.hpp index 2bab14c638b..1f544b65301 100644 --- a/src/rest/response.hpp +++ b/src/rest/response.hpp @@ -53,15 +53,12 @@ namespace rest { /** * This class implements a response class for OTBR_REST, it could be manipulated by connection instance and resource * handler. - * */ class Response { public: /** * The constructor to initialize a response instance. - * - * */ Response(void); @@ -69,7 +66,6 @@ class Response * This method set the response body. * * @param[in] aBody A string to be set as response body. - * */ void SetBody(std::string &aBody); @@ -84,7 +80,6 @@ class Response * This method set the response code. * * @param[in] aCode A string representing response code such as "404 not found". - * */ void SetResponsCode(std::string &aCode); @@ -92,14 +87,11 @@ class Response * This method sets the content type. * * @param[in] aCode A string representing response content type such as text/plain. - * */ void SetContentType(const std::string &aContentType); /** * This method labels the response as need callback. - * - * */ void SetCallback(void); @@ -112,7 +104,6 @@ class Response /** * This method labels the response as complete which means all fields has been successfully set. - * */ void SetComplete(); diff --git a/src/rest/rest_web_server.hpp b/src/rest/rest_web_server.hpp index 20e4a5b674e..08074c54108 100644 --- a/src/rest/rest_web_server.hpp +++ b/src/rest/rest_web_server.hpp @@ -51,7 +51,6 @@ namespace rest { /** * This class implements a REST server. - * */ class RestWebServer : public MainloopProcessor { @@ -60,19 +59,16 @@ class RestWebServer : public MainloopProcessor * The constructor to initialize a REST server. * * @param[in] aHost A reference to the Thread controller. - * */ RestWebServer(RcpHost &aHost, const std::string &aRestListenAddress, int aRestListenPort); /** * The destructor destroys the server instance. - * */ ~RestWebServer(void) override; /** * This method initializes the REST server. - * */ void Init(void); diff --git a/src/sdp_proxy/advertising_proxy.hpp b/src/sdp_proxy/advertising_proxy.hpp index 4b1931d0112..2077d35010e 100644 --- a/src/sdp_proxy/advertising_proxy.hpp +++ b/src/sdp_proxy/advertising_proxy.hpp @@ -51,7 +51,6 @@ namespace otbr { /** * This class implements the Advertising Proxy. - * */ class AdvertisingProxy : private NonCopyable { @@ -61,7 +60,6 @@ class AdvertisingProxy : private NonCopyable * * @param[in] aHost A reference to the NCP controller. * @param[in] aPublisher A reference to the mDNS publisher. - * */ explicit AdvertisingProxy(Ncp::RcpHost &aHost, Mdns::Publisher &aPublisher); @@ -69,13 +67,11 @@ class AdvertisingProxy : private NonCopyable * This method enables/disables the Advertising Proxy. * * @param[in] aIsEnabled Whether to enable the Advertising Proxy. - * */ void SetEnabled(bool aIsEnabled); /** * This method publishes all registered hosts and services. - * */ void PublishAllHostsAndServices(void); @@ -83,7 +79,6 @@ class AdvertisingProxy : private NonCopyable * This method handles mDNS publisher's state changes. * * @param[in] aState The state of mDNS publisher. - * */ void HandleMdnsState(Mdns::Publisher::State aState); @@ -122,7 +117,6 @@ class AdvertisingProxy : private NonCopyable * * @retval OTBR_ERROR_NONE Successfully published the host and its services. * @retval ... Failed to publish the host and/or its services. - * */ otbrError PublishHostAndItsServices(const otSrpServerHost *aHost, OutstandingUpdate *aUpdate); diff --git a/src/sdp_proxy/discovery_proxy.hpp b/src/sdp_proxy/discovery_proxy.hpp index 188a81bff37..9278cf49667 100644 --- a/src/sdp_proxy/discovery_proxy.hpp +++ b/src/sdp_proxy/discovery_proxy.hpp @@ -55,7 +55,6 @@ namespace Dnssd { /** * This class implements the DNS-SD Discovery Proxy. - * */ class DiscoveryProxy : private NonCopyable { @@ -65,7 +64,6 @@ class DiscoveryProxy : private NonCopyable * * @param[in] aHost A reference to the OpenThread Controller instance. * @param[in] aPublisher A reference to the mDNS Publisher. - * */ explicit DiscoveryProxy(Ncp::RcpHost &aHost, Mdns::Publisher &aPublisher); @@ -73,7 +71,6 @@ class DiscoveryProxy : private NonCopyable * This method enables/disables the Discovery Proxy. * * @param[in] aIsEnabled Whether to enable the Discovery Proxy. - * */ void SetEnabled(bool aIsEnabled); @@ -81,7 +78,6 @@ class DiscoveryProxy : private NonCopyable * This method handles mDNS publisher's state changes. * * @param[in] aState The state of mDNS publisher. - * */ void HandleMdnsState(Mdns::Publisher::State aState) { diff --git a/src/trel_dnssd/trel_dnssd.hpp b/src/trel_dnssd/trel_dnssd.hpp index 6c8555c90b0..d6856b1d8ae 100644 --- a/src/trel_dnssd/trel_dnssd.hpp +++ b/src/trel_dnssd/trel_dnssd.hpp @@ -68,7 +68,6 @@ class TrelDnssd * * @param[in] aHost A reference to the OpenThread Controller instance. * @param[in] aPublisher A reference to the mDNS Publisher. - * */ explicit TrelDnssd(Ncp::RcpHost &aHost, Mdns::Publisher &aPublisher); @@ -76,19 +75,16 @@ class TrelDnssd * This method initializes the TrelDnssd instance. * * @param[in] aTrelNetif The network interface for discovering TREL peers. - * */ void Initialize(std::string aTrelNetif); /** * This method starts browsing for TREL peers. - * */ void StartBrowse(void); /** * This method stops browsing for TREL peers. - * */ void StopBrowse(void); @@ -98,13 +94,11 @@ class TrelDnssd * @param[in] aPort The UDP port of TREL service. * @param[in] aTxtData The TXT data of TREL service. * @param[in] aTxtLength The TXT length of TREL service. - * */ void RegisterService(uint16_t aPort, const uint8_t *aTxtData, uint8_t aTxtLength); /** * This method removes the TREL service from DNS-SD. - * */ void UnregisterService(void); @@ -112,7 +106,6 @@ class TrelDnssd * This method handles mDNS publisher's state changes. * * @param[in] aState The state of mDNS publisher. - * */ void HandleMdnsState(Mdns::Publisher::State aState); diff --git a/src/utils/crc16.hpp b/src/utils/crc16.hpp index 6d2167c01d4..19ae8c6050f 100644 --- a/src/utils/crc16.hpp +++ b/src/utils/crc16.hpp @@ -42,7 +42,6 @@ namespace otbr { /** * This class implements CRC16 computations. - * */ class Crc16 { @@ -57,13 +56,11 @@ class Crc16 * This constructor initializes the object. * * @param[in] aPolynomial The polynomial value. - * */ Crc16(Polynomial aPolynomial); /** * This method initializes the CRC16 computation. - * */ void Init(void) { mCrc = 0; } @@ -71,7 +68,6 @@ class Crc16 * This method feeds a byte value into the CRC16 computation. * * @param[in] aByte The byte value. - * */ void Update(uint8_t aByte); @@ -79,7 +75,6 @@ class Crc16 * This method gets the current CRC16 value. * * @returns The current CRC16 value. - * */ uint16_t Get(void) const { return mCrc; } diff --git a/src/utils/dns_utils.hpp b/src/utils/dns_utils.hpp index 9addf66f74b..829112bcb78 100644 --- a/src/utils/dns_utils.hpp +++ b/src/utils/dns_utils.hpp @@ -51,7 +51,6 @@ namespace DnsUtils { * @param[in] aName The DNS Service Instance name to unescape. * * @returns The unescaped DNS Service Instance name. - * */ std::string UnescapeInstanceName(const std::string &aName); @@ -62,7 +61,6 @@ std::string UnescapeInstanceName(const std::string &aName); * The host name must ends with dot. * * @param[in] aHostName The host name to check. - * */ void CheckHostnameSanity(const std::string &aHostName); @@ -74,7 +72,6 @@ void CheckHostnameSanity(const std::string &aHostName); * The service name must not end with dot. * * @param[in] aServiceName The service name to check. - * */ void CheckServiceNameSanity(const std::string &aServiceName); diff --git a/src/utils/infra_link_selector.hpp b/src/utils/infra_link_selector.hpp index f2bcd832908..5697fd48e03 100644 --- a/src/utils/infra_link_selector.hpp +++ b/src/utils/infra_link_selector.hpp @@ -56,7 +56,6 @@ * * This function should return the infrastructure link that is selected by platform specific rules. * If the function returns nullptr, the generic infrastructure link selections rules will be applied. - * */ extern "C" const char *otbrVendorInfraLinkSelect(void); #endif @@ -66,7 +65,6 @@ namespace Utils { /** * This class implements Infrastructure Link Selector. - * */ class InfraLinkSelector : public MainloopProcessor, private NonCopyable { @@ -75,13 +73,11 @@ class InfraLinkSelector : public MainloopProcessor, private NonCopyable * This constructor initializes the InfraLinkSelector instance. * * @param[in] aInfraLinkNames A list of infrastructure link candidates to select from. - * */ explicit InfraLinkSelector(std::vector aInfraLinkNames); /** * This destructor destroys the InfraLinkSelector instance. - * */ ~InfraLinkSelector(void); @@ -98,14 +94,12 @@ class InfraLinkSelector : public MainloopProcessor, private NonCopyable * The interface has been `up and running` within last 10 seconds * * @returns The selected infrastructure link. - * */ const char *Select(void); private: /** * This enumeration infrastructure link states. - * */ enum LinkState : uint8_t { diff --git a/src/utils/pskc.hpp b/src/utils/pskc.hpp index 3a037e6c5c8..ed26701cd53 100644 --- a/src/utils/pskc.hpp +++ b/src/utils/pskc.hpp @@ -67,7 +67,6 @@ class Pskc * @param[in] aPassphrase A pointer to passphrase. * * @returns The pointer to PSKc value. - * */ const uint8_t *ComputePskc(const uint8_t *aExtPanId, const char *aNetworkName, const char *aPassphrase); diff --git a/src/utils/sha256.hpp b/src/utils/sha256.hpp index df90a846a38..24f119eb6b6 100644 --- a/src/utils/sha256.hpp +++ b/src/utils/sha256.hpp @@ -45,19 +45,16 @@ namespace otbr { * @addtogroup core-security * * @{ - * */ /** * This class implements SHA-256 computation. - * */ class Sha256 { public: /** * This type represents a SHA-256 hash. - * */ class Hash : public otCryptoSha256Hash { @@ -68,26 +65,22 @@ class Sha256 * This method returns a pointer to a byte array containing the hash value. * * @returns A pointer to a byte array containing the hash. - * */ const uint8_t *GetBytes(void) const { return m8; } }; /** * Constructor for `Sha256` object. - * */ Sha256(void); /** * Destructor for `Sha256` object. - * */ ~Sha256(void); /** * This method starts the SHA-256 computation. - * */ void Start(void); @@ -96,7 +89,6 @@ class Sha256 * * @param[in] aBuf A pointer to the input buffer. * @param[in] aBufLength The length of @p aBuf in bytes. - * */ void Update(const void *aBuf, uint16_t aBufLength); @@ -104,7 +96,6 @@ class Sha256 * This method finalizes the hash computation. * * @param[out] aHash A reference to a `Hash` to output the calculated hash. - * */ void Finish(Hash &aHash); diff --git a/src/utils/socket_utils.hpp b/src/utils/socket_utils.hpp index 33986d3e829..7893ac4ec74 100644 --- a/src/utils/socket_utils.hpp +++ b/src/utils/socket_utils.hpp @@ -54,7 +54,6 @@ enum SocketBlockOption * * @retval -1 Failed to create socket. * @retval ... The file descriptor of the created socket. - * */ int SocketWithCloseExec(int aDomain, int aType, int aProtocol, SocketBlockOption aBlockOption); @@ -65,7 +64,6 @@ int SocketWithCloseExec(int aDomain, int aType, int aProtocol, SocketBlockOption * * @retval -1 Failed to create the netlink socket. * @retval ... The file descriptor of the created netlink socket. - * */ int CreateNetLinkRouteSocket(uint32_t aNlGroups); diff --git a/src/utils/steering_data.hpp b/src/utils/steering_data.hpp index 481b9a4d368..1c43840faef 100644 --- a/src/utils/steering_data.hpp +++ b/src/utils/steering_data.hpp @@ -43,7 +43,6 @@ namespace otbr { /** * This class represents Steering Data - * */ class SteeringData { @@ -58,19 +57,16 @@ class SteeringData * This method initializes the bloom filter. * * @param[in] aLength The length of the bloom filter in bytes. - * */ void Init(uint8_t aLength); /** * This method sets all bits in the bloom filter to zero. - * */ void Clear(void) { memset(mBloomFilter, 0, sizeof(mBloomFilter)); } /** * Ths method sets all bits in the bloom filter to one. - * */ void Set(void) { memset(mBloomFilter, 0xff, sizeof(mBloomFilter)); } @@ -78,7 +74,6 @@ class SteeringData * This method sets bit @p aBit. * * @param[in] aBit The bit offset. - * */ void SetBit(uint8_t aBit) { mBloomFilter[mLength - 1 - (aBit / 8)] |= 1 << (aBit % 8); } @@ -86,7 +81,6 @@ class SteeringData * This method computes the Bloom Filter. * * @param[in] aJoinerId Extended address - * */ void ComputeBloomFilter(const uint8_t *aJoinerId); @@ -95,7 +89,6 @@ class SteeringData * * @param[in] aEui64 A pointer to EUI64. * @param[out] aJoinerId A pointer to receive joiner id. This pointer can be the same as @p aEui64. - * */ static void ComputeJoinerId(const uint8_t *aEui64, uint8_t *aJoinerId); @@ -103,13 +96,11 @@ class SteeringData * This method returns a pointer to the bloom filter. * * @returns A pointer to the computed bloom filter. - * */ const uint8_t *GetBloomFilter(void) const { return mBloomFilter; } /** * This method returns the length of the bloom filter. - * */ uint8_t GetLength(void) const { return mLength; } diff --git a/src/utils/string_utils.hpp b/src/utils/string_utils.hpp index 06255ead70f..21fb792212a 100644 --- a/src/utils/string_utils.hpp +++ b/src/utils/string_utils.hpp @@ -50,7 +50,6 @@ namespace StringUtils { * @param[in] aString2 The second string. * * @returns Whether the two strings are equal in a case-insensitive manner. - * */ bool EqualCaseInsensitive(const std::string &aString1, const std::string &aString2); @@ -60,7 +59,6 @@ bool EqualCaseInsensitive(const std::string &aString1, const std::string &aStrin * @param[in] aString The string to convert. * * @returns A copy of @p aString with all letters converted to lowercase. - * */ std::string ToLowercase(const std::string &aString); diff --git a/src/utils/system_utils.hpp b/src/utils/system_utils.hpp index 2af1ae2eb15..dff9938ad12 100644 --- a/src/utils/system_utils.hpp +++ b/src/utils/system_utils.hpp @@ -50,7 +50,6 @@ extern "C" { * @param[in] ... Arguments for the format specification. * * @returns The command exit code. - * */ int ExecuteCommand(const char *aFormat, ...); diff --git a/src/utils/thread_helper.cpp b/src/utils/thread_helper.cpp index b7b62163fad..7722f1a4c3d 100644 --- a/src/utils/thread_helper.cpp +++ b/src/utils/thread_helper.cpp @@ -1726,7 +1726,6 @@ otError ThreadHelper::ProcessDatasetForMigration(otOperationalDatasetTlvs &aData * * | Type | Value | Timestamp Seconds | Timestamp Ticks | U bit | * | 8 | 8 | 48 | 15 | 1 | - * */ tlv->SetType(OT_MESHCOP_TLV_PENDINGTIMESTAMP); clock_gettime(CLOCK_REALTIME, ¤tTime); diff --git a/src/utils/thread_helper.hpp b/src/utils/thread_helper.hpp index 162b6b5c9a0..ed55d3a2a17 100644 --- a/src/utils/thread_helper.hpp +++ b/src/utils/thread_helper.hpp @@ -86,7 +86,6 @@ class ThreadHelper * * @param[in] aInstance The Thread instance. * @param[in] aHost The Thread controller. - * */ ThreadHelper(otInstance *aInstance, otbr::Ncp::RcpHost *aHost); @@ -94,7 +93,6 @@ class ThreadHelper * This method adds a callback for device role change. * * @param[in] aHandler The device role handler. - * */ void AddDeviceRoleHandler(DeviceRoleHandler aHandler); @@ -103,7 +101,6 @@ class ThreadHelper * This method adds a callback for DHCPv6 PD state change. * * @param[in] aCallback The DHCPv6 PD state change callback. - * */ void SetDhcp6PdStateCallback(Dhcp6PdStateCallback aCallback); #endif @@ -122,7 +119,6 @@ class ThreadHelper * @param[in] aSeconds The timeout to close the port, 0 for never close. * * @returns The error value of underlying OpenThread api calls. - * */ otError PermitUnsecureJoin(uint16_t aPort, uint32_t aSeconds); @@ -130,7 +126,6 @@ class ThreadHelper * This method performs a Thread network scan. * * @param[in] aHandler The scan result handler. - * */ void Scan(ScanHandler aHandler); @@ -139,7 +134,6 @@ class ThreadHelper * * @param[in] aScanDuration The duration for the scan, in milliseconds. * @param[in] aHandler The scan result handler. - * */ void EnergyScan(uint32_t aScanDuration, EnergyScanHandler aHandler); @@ -155,7 +149,6 @@ class ThreadHelper * @param[in] aPSKc The pre-shared commissioner key, empty for random. * @param[in] aChannelMask A bitmask for valid channels, will random select one. * @param[in] aHandler The attach result handler. - * */ void Attach(const std::string &aNetworkName, uint16_t aPanId, @@ -169,7 +162,6 @@ class ThreadHelper * This method detaches the device from the Thread network. * * @returns The error value of underlying OpenThread API calls. - * */ otError Detach(void); @@ -180,7 +172,6 @@ class ThreadHelper * network parameter will be set through the active dataset. * * @param[in] aHandler The attach result handler. - * */ void Attach(AttachHandler aHandler); @@ -189,7 +180,6 @@ class ThreadHelper * * @param[in] aDatasetTlvs The dataset TLVs. * @param[in] aHandler The result handler. - * */ void AttachAllNodesTo(const std::vector &aDatasetTlvs, AttachHandler aHandler); @@ -197,7 +187,6 @@ class ThreadHelper * This method resets the OpenThread stack. * * @returns The error value of underlying OpenThread api calls. - * */ otError Reset(void); @@ -213,7 +202,6 @@ class ThreadHelper * @param[in] aVendorSwVersion The vendor software version. * @param[in] aVendorData The vendor custom data. * @param[in] aHandler The join result handler. - * */ void JoinerStart(const std::string &aPskd, const std::string &aProvisioningUrl, @@ -227,7 +215,6 @@ class ThreadHelper * This method tries to restore the network after reboot * * @returns The error value of underlying OpenThread api calls. - * */ otError TryResumeNetwork(void); @@ -235,7 +222,6 @@ class ThreadHelper * This method returns the underlying OpenThread instance. * * @returns The underlying instance. - * */ otInstance *GetInstance(void) { @@ -246,7 +232,6 @@ class ThreadHelper * This method handles OpenThread state changed notification. * * @param[in] aFlags A bit-field indicating specific state that has changed. See `OT_CHANGED_*` definitions. - * */ void StateChangedCallback(otChangedFlags aFlags); @@ -255,7 +240,6 @@ class ThreadHelper * This method sets a callback for calls of UpdateVendorMeshCopTxtEntries D-Bus API. * * @param[in] aHandler The handler on MeshCoP TXT changes. - * */ void SetUpdateMeshCopTxtHandler(UpdateMeshCopTxtHandler aHandler) { @@ -266,7 +250,6 @@ class ThreadHelper * This method handles MeshCoP TXT updates done by UpdateVendorMeshCopTxtEntries D-Bus API. * * @param[in] aUpdate The key-value pairs to be updated in the TXT record. - * */ void OnUpdateMeshCopTxt(std::map> aUpdate); #endif @@ -294,7 +277,6 @@ class ThreadHelper * * @param[in] aAction The action OpenThread performs. * @param[in] aError The action result. - * */ static void LogOpenThreadResult(const char *aAction, otError aError); @@ -313,7 +295,6 @@ class ThreadHelper * * @retval OT_ERROR_NONE Dataset is valid to do Thread network migration. * @retval OT_ERROR_INVALID_ARGS Dataset is invalid to do Thread network migration. - * */ static otError ProcessDatasetForMigration(otOperationalDatasetTlvs &aDatasetTlvs, uint32_t aDelayMilli); diff --git a/src/web/web-service/ot_client.hpp b/src/web/web-service/ot_client.hpp index c1ba5b984d9..103de9396b1 100644 --- a/src/web/web-service/ot_client.hpp +++ b/src/web/web-service/ot_client.hpp @@ -62,7 +62,6 @@ struct WpanNetworkInfo /** * This class implements functionality of OpenThread client. - * */ class OpenThreadClient { @@ -71,13 +70,11 @@ class OpenThreadClient * This constructor creates an OpenThread client. * * @param[in] aNetifName The Thread network interface name. - * */ OpenThreadClient(const char *aNetifName); /** * This destructor destories an OpenThread client. - * */ ~OpenThreadClient(void); @@ -86,7 +83,6 @@ class OpenThreadClient * * @retval TRUE Successfully connected to the daemon. * @retval FALSE Failed to connected to the daemon. - * */ bool Connect(void); @@ -97,7 +93,6 @@ class OpenThreadClient * @param[in] ... C style format arguments. * * @returns A pointer to the output if succeeded, otherwise nullptr. - * */ char *Execute(const char *aFormat, ...); @@ -108,7 +103,6 @@ class OpenThreadClient * @param[in] aTimeout Timeout for the read, in ms. * * @returns A pointer to the output if the expected response is found, otherwise nullptr. - * */ char *Read(const char *aResponse, int aTimeout); @@ -119,13 +113,11 @@ class OpenThreadClient * @param[in] aLength Number of entries in @p aNetworks. * * @returns Number of entries found. 0 if none found. - * */ int Scan(WpanNetworkInfo *aNetworks, int aLength); /** * This method performs factory reset. - * */ bool FactoryReset(void); diff --git a/src/web/web-service/web_server.hpp b/src/web/web-service/web_server.hpp index f54761e20bf..4520e41d037 100644 --- a/src/web/web-service/web_server.hpp +++ b/src/web/web-service/web_server.hpp @@ -61,20 +61,17 @@ typedef SimpleWeb::Server HttpServer; /** * This class implements the http server. - * */ class WebServer { public: /** * This method is constructor to initialize the WebServer. - * */ WebServer(void); /** * This method is destructor to free the WebServer. - * */ ~WebServer(void); @@ -84,13 +81,11 @@ class WebServer * @param[in] aIfName The pointer to the Thread interface name. * @param[in] aListenAddr The http server listen address, can be nullptr for any address. * @param[in] aPort The port of http server. - * */ void StartWebServer(const char *aIfName, const char *aListenAddr, uint16_t aPort); /** * This method stops the Web Server. - * */ void StopWebServer(void); diff --git a/src/web/web-service/wpan_service.hpp b/src/web/web-service/wpan_service.hpp index c27107be8ad..aa9b286a171 100644 --- a/src/web/web-service/wpan_service.hpp +++ b/src/web/web-service/wpan_service.hpp @@ -52,7 +52,6 @@ /** * WPAN parameter constants - * */ #define OT_EXTENDED_PANID_LENGTH 8 @@ -68,7 +67,6 @@ namespace Web { /** * This class provides web service to manage WPAN. - * */ class WpanService { @@ -77,7 +75,6 @@ class WpanService * This method handles http request to get information to generate QR code. * * @returns The string to the http response of getting QR code. - * */ std::string HandleGetQRCodeRequest(void); @@ -87,7 +84,6 @@ class WpanService * @param[in] aJoinRequest A reference to the http request of joining network. * * @returns The string to the http response of joining network. - * */ std::string HandleJoinNetworkRequest(const std::string &aJoinRequest); @@ -97,7 +93,6 @@ class WpanService * @param[in] aFormRequest A reference to the http request of forming network. * * @returns The string to the http response of forming network. - * */ std::string HandleFormNetworkRequest(const std::string &aFormRequest); @@ -107,7 +102,6 @@ class WpanService * @param[in] aAddPrefixRequest A reference to the http request of adding on-mesh prefix. * * @returns The string to the http response of adding on-mesh prefix. - * */ std::string HandleAddPrefixRequest(const std::string &aAddPrefixRequest); @@ -117,7 +111,6 @@ class WpanService * @param[in] aDeleteRequest A reference to the http request of deleting on-mesh prefix. * * @returns The string to the http response of deleting on-mesh prefix. - * */ std::string HandleDeletePrefixRequest(const std::string &aDeleteRequest); @@ -125,7 +118,6 @@ class WpanService * This method handles http request to get netowrk status. * * @returns The string to the http response of getting status. - * */ std::string HandleStatusRequest(void); @@ -133,7 +125,6 @@ class WpanService * This method handles http request to get available networks. * * @returns The string to the http response of getting available networks. - * */ std::string HandleAvailableNetworkRequest(void); @@ -141,7 +132,6 @@ class WpanService * This method handles http request to commission device * * @returns The string to the http response of commissioning - * */ std::string HandleCommission(const std::string &aCommissionRequest); @@ -149,7 +139,6 @@ class WpanService * This method sets the Thread interface name. * * @param[in] aIfName The pointer to the Thread interface name. - * */ void SetInterfaceName(const char *aIfName) { @@ -166,7 +155,6 @@ class WpanService * @retval kWpanStatus_OK Successfully started the Thread service. * @retval kWpanStatus_Offline Not started the Thread service. * @retval kWpanStatus_Down The Thread service was down. - * */ int GetWpanServiceStatus(std::string &aNetworkName, std::string &aExtPanId) const; @@ -177,7 +165,6 @@ class WpanService * @param[in] aNetworkPassword Network password * * @returns The string to the http response of getting available networks. - * */ std::string CommissionDevice(const char *aPskd, const char *aNetworkPassword);