From d6ad098e8f9d9d3f37c115c9536f81d8d28ce566 Mon Sep 17 00:00:00 2001 From: Jojo-1000 <33495614+Jojo-1000@users.noreply.github.com> Date: Wed, 8 Apr 2020 21:00:30 +0200 Subject: [PATCH] Fix doxygen errors. --- .travis.yml | 1 + hueplusplus/include/Hue.h | 10 +++++----- hueplusplus/include/HueCommandAPI.h | 17 +++++++++-------- hueplusplus/include/HueLight.h | 21 +++++++++------------ 4 files changed, 24 insertions(+), 25 deletions(-) diff --git a/.travis.yml b/.travis.yml index dee6691..165e5fa 100755 --- a/.travis.yml +++ b/.travis.yml @@ -28,6 +28,7 @@ matrix: # Misc - python-yaml - doxygen + - graphviz sources: &sources - ubuntu-toolchain-r-test - llvm-toolchain-trusty-6.0 diff --git a/hueplusplus/include/Hue.h b/hueplusplus/include/Hue.h index 2765a4f..1aa8360 100644 --- a/hueplusplus/include/Hue.h +++ b/hueplusplus/include/Hue.h @@ -78,7 +78,7 @@ public: //! \throws nlohmann::json::parse_error when response could not be parsed Hue GetBridge(const HueIdentification& identification); - //! \brief Function that adds a username to the \ref usernames map + //! \brief Function that adds a username to the usernames map //! //! \param mac MAC address of Hue bridge //! \param username Username that is used to control the Hue bridge @@ -136,7 +136,7 @@ public: //! \brief Send a username request to the Hue bridge. //! //! Blocks for about 30 seconds and 5 seconds to prepare. - //! It automatically sets the \ref username variable according to the username received and returns the username + //! It automatically sets the username variable according to the username received and returns the username //! received. This function should only be called once to acquire a username to control the bridge and the username //! should be saved for future use. //! \return username for API usage @@ -146,9 +146,9 @@ public: //! \throws nlohmann::json::parse_error when response could not be parsed std::string requestUsername(); - //! \brief Function that returns the \ref username + //! \brief Function that returns the username //! - //! \return String containing \ref username + //! \return The username used for API access std::string getUsername(); //! \brief Function to set the ip address of this class representing a bridge @@ -162,7 +162,7 @@ public: //! "192.168.2.1:8080" void setPort(const int port); - //! \brief Function that returns a \ref Hue::HueLight of specified id + //! \brief Function that returns a \ref HueLight of specified id //! //! \param id Integer that specifies the ID of a Hue light //! \return \ref HueLight that can be controlled diff --git a/hueplusplus/include/HueCommandAPI.h b/hueplusplus/include/HueCommandAPI.h index e73dfbb..7bd9895 100644 --- a/hueplusplus/include/HueCommandAPI.h +++ b/hueplusplus/include/HueCommandAPI.h @@ -40,7 +40,7 @@ public: //! \param ip ip address of the Hue bridge in dotted decimal notation like "192.168.2.1" //! \param port of the hue bridge //! \param username username that is used to control the bridge - //! \param handler HttpHandler for communication with the bridge + //! \param httpHandler HttpHandler for communication with the bridge HueCommandAPI( const std::string& ip, int port, const std::string& username, std::shared_ptr httpHandler); @@ -58,10 +58,10 @@ public: //! \note All copies refer to the same timeout data, so even calls from different objects will be delayed HueCommandAPI& operator=(HueCommandAPI&&) = default; - //! \brief Sends a HTTP PUT request via the \ref httpHandler to the bridge and returns the response + //! \brief Sends a HTTP PUT request to the bridge and returns the response //! //! This function will block until at least \ref minDelay has passed to any previous request - //! \param path API request path (appended after /api/) + //! \param path API request path (appended after /api/{username}) //! \param request Request to the api, may be empty //! \returns The return value of the underlying \ref IHttpHandler::PUTJson call //! \throws std::system_error when system or socket operations fail @@ -70,10 +70,10 @@ public: nlohmann::json PUTRequest(const std::string& path, const nlohmann::json& request) const; nlohmann::json PUTRequest(const std::string& path, const nlohmann::json& request, FileInfo fileInfo) const; - //! \brief Sends a HTTP GET request via the \ref httpHandler to the bridge and returns the response + //! \brief Sends a HTTP GET request to the bridge and returns the response //! //! This function will block until at least \ref minDelay has passed to any previous request - //! \param path API request path (appended after /api/) + //! \param path API request path (appended after /api/{username}) //! \param request Request to the api, may be empty //! \returns The return value of the underlying \ref IHttpHandler::GETJson call //! \throws std::system_error when system or socket operations fail @@ -82,10 +82,10 @@ public: nlohmann::json GETRequest(const std::string& path, const nlohmann::json& request) const; nlohmann::json GETRequest(const std::string& path, const nlohmann::json& request, FileInfo fileInfo) const; - //! \brief Sends a HTTP DELETE request via the \ref httpHandler to the bridge and returns the response + //! \brief Sends a HTTP DELETE request to the bridge and returns the response //! //! This function will block until at least \ref minDelay has passed to any previous request - //! \param path API request path (appended after /api/) + //! \param path API request path (appended after /api/{username}) //! \param request Request to the api, may be empty //! \returns The return value of the underlying \ref IHttpHandler::DELETEJson call //! \throws std::system_error when system or socket operations fail @@ -110,8 +110,9 @@ private: //! \returns "/api//" std::string CombinedPath(const std::string& path) const; -private: +public: static constexpr std::chrono::steady_clock::duration minDelay = std::chrono::milliseconds(100); +private: std::string ip; int port; std::string username; diff --git a/hueplusplus/include/HueLight.h b/hueplusplus/include/HueLight.h index addac44..be434ad 100644 --- a/hueplusplus/include/HueLight.h +++ b/hueplusplus/include/HueLight.h @@ -333,11 +333,11 @@ public: //! light //! //! \note The color temperature will only be returned when the light has a - //! reference to a specific \ref ColorTemperatureStrategy. \note This will not - //! refresh the light state + //! reference to a specific \ref ColorTemperatureStrategy. + //! \note This will not refresh the light state //! The color temperature in mired ranges from 153 to 500 whereas 153 is cold - //! and 500 is warm. \param light A reference of the light \return Unsigned - //! int representing the color temperature in mired or 0 when failed + //! and 500 is warm. + //! \return Unsigned int representing the color temperature in mired or 0 when failed virtual unsigned int getColorTemperature() const { if (colorTemperatureStrategy) @@ -354,7 +354,6 @@ public: //! Updates the lights state by calling refreshState() //! The color temperature in mired ranges from 153 to 500 whereas 153 is cold //! and 500 is warm. - //! \param light A reference of the light //! \return Unsigned int representing the color temperature in mired or 0 when failed //! \throws std::system_error when system or socket operations fail //! \throws HueException when response contained no body @@ -439,7 +438,6 @@ public: //! \note The color hue and saturation will only be returned when the light //! has a reference to a specific \ref ColorHueStrategy. //! \note This will not refresh the light state - //! \param light A reference of the light //! \return Pair containing the hue as first value and saturation as second value or an empty one when failed //! \throws std::system_error when system or socket operations fail //! \throws HueException when response contained no body @@ -460,7 +458,6 @@ public: //! \note The color hue and saturation will only be returned when the light //! has a reference to a specific \ref ColorHueStrategy. Updates the lights //! state by calling refreshState() - //! \param light A const reference of the light //! \return Pair containing the hue as first value and saturation as second value or an empty one when failed //! \throws std::system_error when system or socket operations fail //! \throws HueException when response contained no body @@ -501,7 +498,6 @@ public: //! \note The color x and y will only be returned when the light has a //! reference to a specific \ref ColorHueStrategy. //! \note This does not update the lights state - //! \param light A const reference of the light //! \return Pair containing the x as first value and y as second value or an //! empty one when failed virtual std::pair getColorXY() const @@ -518,7 +514,6 @@ public: //! \note The color x and y will only be returned when the light has a //! reference to a specific \ref ColorHueStrategy. //! Updates the lights state by calling refreshState() - //! \param light A reference of the light //! \return Pair containing the x as first value and y as second value or an empty one when failed //! \throws std::system_error when system or socket operations fail //! \throws HueException when response contained no body @@ -538,7 +533,8 @@ public: //! //! \note The color will only be set if the light has a reference to a //! specific \ref ColorHueStrategy. The values of red, green and blue are - //! ranging from 0 to 255. \param r uint8_t that specifies the red color value + //! ranging from 0 to 255. + //! \param r uint8_t that specifies the red color value //! \param g uint8_t that specifies the green color value //! \param b uint8_t that specifies the blue color value //! \param transition Optional parameter to set the transition from current state to new, standard is 4 = 400ms @@ -660,8 +656,8 @@ public: //! setter functions check whether this feature is enabled and the colorloop //! can only be disabled with this function or by simply calling //! Off()/OffNoRefresh() and then On()/OnNoRefresh(), so you could - //! alternatively call Off() and then use any of the setter functions. \param - //! on bool that enables this feature when true and disables it when false + //! alternatively call Off() and then use any of the setter functions. + //! \param on bool that enables this feature when true and disables it when false //! \return Bool that is true on success //! \throws std::system_error when system or socket operations fail //! \throws HueException when response contained no body @@ -761,6 +757,7 @@ protected: //! \throws nlohmann::json::parse_error if the reply could not be parsed //! \param request A nlohmann::json aka the request to send //! \param subPath A path that is appended to the uri, note it should always start with a slash ("/") + //! \param fileInfo FileInfo from calling function for exception details. //! \return The parsed reply //! \throws std::system_error when system or socket operations fail //! \throws HueException when response contained no body -- libgit2 0.21.4