Commit d6ad098e8f9d9d3f37c115c9536f81d8d28ce566
Committed by
Jan
1 parent
178e5750
Fix doxygen errors.
Showing
4 changed files
with
24 additions
and
25 deletions
.travis.yml
hueplusplus/include/Hue.h
| ... | ... | @@ -78,7 +78,7 @@ public: |
| 78 | 78 | //! \throws nlohmann::json::parse_error when response could not be parsed |
| 79 | 79 | Hue GetBridge(const HueIdentification& identification); |
| 80 | 80 | |
| 81 | - //! \brief Function that adds a username to the \ref usernames map | |
| 81 | + //! \brief Function that adds a username to the usernames map | |
| 82 | 82 | //! |
| 83 | 83 | //! \param mac MAC address of Hue bridge |
| 84 | 84 | //! \param username Username that is used to control the Hue bridge |
| ... | ... | @@ -136,7 +136,7 @@ public: |
| 136 | 136 | //! \brief Send a username request to the Hue bridge. |
| 137 | 137 | //! |
| 138 | 138 | //! Blocks for about 30 seconds and 5 seconds to prepare. |
| 139 | - //! It automatically sets the \ref username variable according to the username received and returns the username | |
| 139 | + //! It automatically sets the username variable according to the username received and returns the username | |
| 140 | 140 | //! received. This function should only be called once to acquire a username to control the bridge and the username |
| 141 | 141 | //! should be saved for future use. |
| 142 | 142 | //! \return username for API usage |
| ... | ... | @@ -146,9 +146,9 @@ public: |
| 146 | 146 | //! \throws nlohmann::json::parse_error when response could not be parsed |
| 147 | 147 | std::string requestUsername(); |
| 148 | 148 | |
| 149 | - //! \brief Function that returns the \ref username | |
| 149 | + //! \brief Function that returns the username | |
| 150 | 150 | //! |
| 151 | - //! \return String containing \ref username | |
| 151 | + //! \return The username used for API access | |
| 152 | 152 | std::string getUsername(); |
| 153 | 153 | |
| 154 | 154 | //! \brief Function to set the ip address of this class representing a bridge |
| ... | ... | @@ -162,7 +162,7 @@ public: |
| 162 | 162 | //! "192.168.2.1:8080" |
| 163 | 163 | void setPort(const int port); |
| 164 | 164 | |
| 165 | - //! \brief Function that returns a \ref Hue::HueLight of specified id | |
| 165 | + //! \brief Function that returns a \ref HueLight of specified id | |
| 166 | 166 | //! |
| 167 | 167 | //! \param id Integer that specifies the ID of a Hue light |
| 168 | 168 | //! \return \ref HueLight that can be controlled | ... | ... |
hueplusplus/include/HueCommandAPI.h
| ... | ... | @@ -40,7 +40,7 @@ public: |
| 40 | 40 | //! \param ip ip address of the Hue bridge in dotted decimal notation like "192.168.2.1" |
| 41 | 41 | //! \param port of the hue bridge |
| 42 | 42 | //! \param username username that is used to control the bridge |
| 43 | - //! \param handler HttpHandler for communication with the bridge | |
| 43 | + //! \param httpHandler HttpHandler for communication with the bridge | |
| 44 | 44 | HueCommandAPI( |
| 45 | 45 | const std::string& ip, int port, const std::string& username, std::shared_ptr<const IHttpHandler> httpHandler); |
| 46 | 46 | |
| ... | ... | @@ -58,10 +58,10 @@ public: |
| 58 | 58 | //! \note All copies refer to the same timeout data, so even calls from different objects will be delayed |
| 59 | 59 | HueCommandAPI& operator=(HueCommandAPI&&) = default; |
| 60 | 60 | |
| 61 | - //! \brief Sends a HTTP PUT request via the \ref httpHandler to the bridge and returns the response | |
| 61 | + //! \brief Sends a HTTP PUT request to the bridge and returns the response | |
| 62 | 62 | //! |
| 63 | 63 | //! This function will block until at least \ref minDelay has passed to any previous request |
| 64 | - //! \param path API request path (appended after /api/<username>) | |
| 64 | + //! \param path API request path (appended after /api/{username}) | |
| 65 | 65 | //! \param request Request to the api, may be empty |
| 66 | 66 | //! \returns The return value of the underlying \ref IHttpHandler::PUTJson call |
| 67 | 67 | //! \throws std::system_error when system or socket operations fail |
| ... | ... | @@ -70,10 +70,10 @@ public: |
| 70 | 70 | nlohmann::json PUTRequest(const std::string& path, const nlohmann::json& request) const; |
| 71 | 71 | nlohmann::json PUTRequest(const std::string& path, const nlohmann::json& request, FileInfo fileInfo) const; |
| 72 | 72 | |
| 73 | - //! \brief Sends a HTTP GET request via the \ref httpHandler to the bridge and returns the response | |
| 73 | + //! \brief Sends a HTTP GET request to the bridge and returns the response | |
| 74 | 74 | //! |
| 75 | 75 | //! This function will block until at least \ref minDelay has passed to any previous request |
| 76 | - //! \param path API request path (appended after /api/<username>) | |
| 76 | + //! \param path API request path (appended after /api/{username}) | |
| 77 | 77 | //! \param request Request to the api, may be empty |
| 78 | 78 | //! \returns The return value of the underlying \ref IHttpHandler::GETJson call |
| 79 | 79 | //! \throws std::system_error when system or socket operations fail |
| ... | ... | @@ -82,10 +82,10 @@ public: |
| 82 | 82 | nlohmann::json GETRequest(const std::string& path, const nlohmann::json& request) const; |
| 83 | 83 | nlohmann::json GETRequest(const std::string& path, const nlohmann::json& request, FileInfo fileInfo) const; |
| 84 | 84 | |
| 85 | - //! \brief Sends a HTTP DELETE request via the \ref httpHandler to the bridge and returns the response | |
| 85 | + //! \brief Sends a HTTP DELETE request to the bridge and returns the response | |
| 86 | 86 | //! |
| 87 | 87 | //! This function will block until at least \ref minDelay has passed to any previous request |
| 88 | - //! \param path API request path (appended after /api/<username>) | |
| 88 | + //! \param path API request path (appended after /api/{username}) | |
| 89 | 89 | //! \param request Request to the api, may be empty |
| 90 | 90 | //! \returns The return value of the underlying \ref IHttpHandler::DELETEJson call |
| 91 | 91 | //! \throws std::system_error when system or socket operations fail |
| ... | ... | @@ -110,8 +110,9 @@ private: |
| 110 | 110 | //! \returns "/api/<username>/<path>" |
| 111 | 111 | std::string CombinedPath(const std::string& path) const; |
| 112 | 112 | |
| 113 | -private: | |
| 113 | +public: | |
| 114 | 114 | static constexpr std::chrono::steady_clock::duration minDelay = std::chrono::milliseconds(100); |
| 115 | +private: | |
| 115 | 116 | std::string ip; |
| 116 | 117 | int port; |
| 117 | 118 | std::string username; | ... | ... |
hueplusplus/include/HueLight.h
| ... | ... | @@ -333,11 +333,11 @@ public: |
| 333 | 333 | //! light |
| 334 | 334 | //! |
| 335 | 335 | //! \note The color temperature will only be returned when the light has a |
| 336 | - //! reference to a specific \ref ColorTemperatureStrategy. \note This will not | |
| 337 | - //! refresh the light state | |
| 336 | + //! reference to a specific \ref ColorTemperatureStrategy. | |
| 337 | + //! \note This will not refresh the light state | |
| 338 | 338 | //! The color temperature in mired ranges from 153 to 500 whereas 153 is cold |
| 339 | - //! and 500 is warm. \param light A reference of the light \return Unsigned | |
| 340 | - //! int representing the color temperature in mired or 0 when failed | |
| 339 | + //! and 500 is warm. | |
| 340 | + //! \return Unsigned int representing the color temperature in mired or 0 when failed | |
| 341 | 341 | virtual unsigned int getColorTemperature() const |
| 342 | 342 | { |
| 343 | 343 | if (colorTemperatureStrategy) |
| ... | ... | @@ -354,7 +354,6 @@ public: |
| 354 | 354 | //! Updates the lights state by calling refreshState() |
| 355 | 355 | //! The color temperature in mired ranges from 153 to 500 whereas 153 is cold |
| 356 | 356 | //! and 500 is warm. |
| 357 | - //! \param light A reference of the light | |
| 358 | 357 | //! \return Unsigned int representing the color temperature in mired or 0 when failed |
| 359 | 358 | //! \throws std::system_error when system or socket operations fail |
| 360 | 359 | //! \throws HueException when response contained no body |
| ... | ... | @@ -439,7 +438,6 @@ public: |
| 439 | 438 | //! \note The color hue and saturation will only be returned when the light |
| 440 | 439 | //! has a reference to a specific \ref ColorHueStrategy. |
| 441 | 440 | //! \note This will not refresh the light state |
| 442 | - //! \param light A reference of the light | |
| 443 | 441 | //! \return Pair containing the hue as first value and saturation as second value or an empty one when failed |
| 444 | 442 | //! \throws std::system_error when system or socket operations fail |
| 445 | 443 | //! \throws HueException when response contained no body |
| ... | ... | @@ -460,7 +458,6 @@ public: |
| 460 | 458 | //! \note The color hue and saturation will only be returned when the light |
| 461 | 459 | //! has a reference to a specific \ref ColorHueStrategy. Updates the lights |
| 462 | 460 | //! state by calling refreshState() |
| 463 | - //! \param light A const reference of the light | |
| 464 | 461 | //! \return Pair containing the hue as first value and saturation as second value or an empty one when failed |
| 465 | 462 | //! \throws std::system_error when system or socket operations fail |
| 466 | 463 | //! \throws HueException when response contained no body |
| ... | ... | @@ -501,7 +498,6 @@ public: |
| 501 | 498 | //! \note The color x and y will only be returned when the light has a |
| 502 | 499 | //! reference to a specific \ref ColorHueStrategy. |
| 503 | 500 | //! \note This does not update the lights state |
| 504 | - //! \param light A const reference of the light | |
| 505 | 501 | //! \return Pair containing the x as first value and y as second value or an |
| 506 | 502 | //! empty one when failed |
| 507 | 503 | virtual std::pair<float, float> getColorXY() const |
| ... | ... | @@ -518,7 +514,6 @@ public: |
| 518 | 514 | //! \note The color x and y will only be returned when the light has a |
| 519 | 515 | //! reference to a specific \ref ColorHueStrategy. |
| 520 | 516 | //! Updates the lights state by calling refreshState() |
| 521 | - //! \param light A reference of the light | |
| 522 | 517 | //! \return Pair containing the x as first value and y as second value or an empty one when failed |
| 523 | 518 | //! \throws std::system_error when system or socket operations fail |
| 524 | 519 | //! \throws HueException when response contained no body |
| ... | ... | @@ -538,7 +533,8 @@ public: |
| 538 | 533 | //! |
| 539 | 534 | //! \note The color will only be set if the light has a reference to a |
| 540 | 535 | //! specific \ref ColorHueStrategy. The values of red, green and blue are |
| 541 | - //! ranging from 0 to 255. \param r uint8_t that specifies the red color value | |
| 536 | + //! ranging from 0 to 255. | |
| 537 | + //! \param r uint8_t that specifies the red color value | |
| 542 | 538 | //! \param g uint8_t that specifies the green color value |
| 543 | 539 | //! \param b uint8_t that specifies the blue color value |
| 544 | 540 | //! \param transition Optional parameter to set the transition from current state to new, standard is 4 = 400ms |
| ... | ... | @@ -660,8 +656,8 @@ public: |
| 660 | 656 | //! setter functions check whether this feature is enabled and the colorloop |
| 661 | 657 | //! can only be disabled with this function or by simply calling |
| 662 | 658 | //! Off()/OffNoRefresh() and then On()/OnNoRefresh(), so you could |
| 663 | - //! alternatively call Off() and then use any of the setter functions. \param | |
| 664 | - //! on bool that enables this feature when true and disables it when false | |
| 659 | + //! alternatively call Off() and then use any of the setter functions. | |
| 660 | + //! \param on bool that enables this feature when true and disables it when false | |
| 665 | 661 | //! \return Bool that is true on success |
| 666 | 662 | //! \throws std::system_error when system or socket operations fail |
| 667 | 663 | //! \throws HueException when response contained no body |
| ... | ... | @@ -761,6 +757,7 @@ protected: |
| 761 | 757 | //! \throws nlohmann::json::parse_error if the reply could not be parsed |
| 762 | 758 | //! \param request A nlohmann::json aka the request to send |
| 763 | 759 | //! \param subPath A path that is appended to the uri, note it should always start with a slash ("/") |
| 760 | + //! \param fileInfo FileInfo from calling function for exception details. | |
| 764 | 761 | //! \return The parsed reply |
| 765 | 762 | //! \throws std::system_error when system or socket operations fail |
| 766 | 763 | //! \throws HueException when response contained no body | ... | ... |