Commit d6ad098e8f9d9d3f37c115c9536f81d8d28ce566

Authored by Jojo-1000
Committed by Jan
1 parent 178e5750

Fix doxygen errors.

.travis.yml
@@ -28,6 +28,7 @@ matrix: @@ -28,6 +28,7 @@ matrix:
28 # Misc 28 # Misc
29 - python-yaml 29 - python-yaml
30 - doxygen 30 - doxygen
  31 + - graphviz
31 sources: &sources 32 sources: &sources
32 - ubuntu-toolchain-r-test 33 - ubuntu-toolchain-r-test
33 - llvm-toolchain-trusty-6.0 34 - llvm-toolchain-trusty-6.0
hueplusplus/include/Hue.h
@@ -78,7 +78,7 @@ public: @@ -78,7 +78,7 @@ public:
78 //! \throws nlohmann::json::parse_error when response could not be parsed 78 //! \throws nlohmann::json::parse_error when response could not be parsed
79 Hue GetBridge(const HueIdentification& identification); 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 //! \param mac MAC address of Hue bridge 83 //! \param mac MAC address of Hue bridge
84 //! \param username Username that is used to control the Hue bridge 84 //! \param username Username that is used to control the Hue bridge
@@ -136,7 +136,7 @@ public: @@ -136,7 +136,7 @@ public:
136 //! \brief Send a username request to the Hue bridge. 136 //! \brief Send a username request to the Hue bridge.
137 //! 137 //!
138 //! Blocks for about 30 seconds and 5 seconds to prepare. 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 //! received. This function should only be called once to acquire a username to control the bridge and the username 140 //! received. This function should only be called once to acquire a username to control the bridge and the username
141 //! should be saved for future use. 141 //! should be saved for future use.
142 //! \return username for API usage 142 //! \return username for API usage
@@ -146,9 +146,9 @@ public: @@ -146,9 +146,9 @@ public:
146 //! \throws nlohmann::json::parse_error when response could not be parsed 146 //! \throws nlohmann::json::parse_error when response could not be parsed
147 std::string requestUsername(); 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 std::string getUsername(); 152 std::string getUsername();
153 153
154 //! \brief Function to set the ip address of this class representing a bridge 154 //! \brief Function to set the ip address of this class representing a bridge
@@ -162,7 +162,7 @@ public: @@ -162,7 +162,7 @@ public:
162 //! "192.168.2.1:8080" 162 //! "192.168.2.1:8080"
163 void setPort(const int port); 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 //! \param id Integer that specifies the ID of a Hue light 167 //! \param id Integer that specifies the ID of a Hue light
168 //! \return \ref HueLight that can be controlled 168 //! \return \ref HueLight that can be controlled
hueplusplus/include/HueCommandAPI.h
@@ -40,7 +40,7 @@ public: @@ -40,7 +40,7 @@ public:
40 //! \param ip ip address of the Hue bridge in dotted decimal notation like "192.168.2.1" 40 //! \param ip ip address of the Hue bridge in dotted decimal notation like "192.168.2.1"
41 //! \param port of the hue bridge 41 //! \param port of the hue bridge
42 //! \param username username that is used to control the bridge 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 HueCommandAPI( 44 HueCommandAPI(
45 const std::string& ip, int port, const std::string& username, std::shared_ptr<const IHttpHandler> httpHandler); 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,10 +58,10 @@ public:
58 //! \note All copies refer to the same timeout data, so even calls from different objects will be delayed 58 //! \note All copies refer to the same timeout data, so even calls from different objects will be delayed
59 HueCommandAPI& operator=(HueCommandAPI&&) = default; 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 //! This function will block until at least \ref minDelay has passed to any previous request 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 //! \param request Request to the api, may be empty 65 //! \param request Request to the api, may be empty
66 //! \returns The return value of the underlying \ref IHttpHandler::PUTJson call 66 //! \returns The return value of the underlying \ref IHttpHandler::PUTJson call
67 //! \throws std::system_error when system or socket operations fail 67 //! \throws std::system_error when system or socket operations fail
@@ -70,10 +70,10 @@ public: @@ -70,10 +70,10 @@ public:
70 nlohmann::json PUTRequest(const std::string& path, const nlohmann::json& request) const; 70 nlohmann::json PUTRequest(const std::string& path, const nlohmann::json& request) const;
71 nlohmann::json PUTRequest(const std::string& path, const nlohmann::json& request, FileInfo fileInfo) const; 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 //! This function will block until at least \ref minDelay has passed to any previous request 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 //! \param request Request to the api, may be empty 77 //! \param request Request to the api, may be empty
78 //! \returns The return value of the underlying \ref IHttpHandler::GETJson call 78 //! \returns The return value of the underlying \ref IHttpHandler::GETJson call
79 //! \throws std::system_error when system or socket operations fail 79 //! \throws std::system_error when system or socket operations fail
@@ -82,10 +82,10 @@ public: @@ -82,10 +82,10 @@ public:
82 nlohmann::json GETRequest(const std::string& path, const nlohmann::json& request) const; 82 nlohmann::json GETRequest(const std::string& path, const nlohmann::json& request) const;
83 nlohmann::json GETRequest(const std::string& path, const nlohmann::json& request, FileInfo fileInfo) const; 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 //! This function will block until at least \ref minDelay has passed to any previous request 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 //! \param request Request to the api, may be empty 89 //! \param request Request to the api, may be empty
90 //! \returns The return value of the underlying \ref IHttpHandler::DELETEJson call 90 //! \returns The return value of the underlying \ref IHttpHandler::DELETEJson call
91 //! \throws std::system_error when system or socket operations fail 91 //! \throws std::system_error when system or socket operations fail
@@ -110,8 +110,9 @@ private: @@ -110,8 +110,9 @@ private:
110 //! \returns "/api/<username>/<path>" 110 //! \returns "/api/<username>/<path>"
111 std::string CombinedPath(const std::string& path) const; 111 std::string CombinedPath(const std::string& path) const;
112 112
113 -private: 113 +public:
114 static constexpr std::chrono::steady_clock::duration minDelay = std::chrono::milliseconds(100); 114 static constexpr std::chrono::steady_clock::duration minDelay = std::chrono::milliseconds(100);
  115 +private:
115 std::string ip; 116 std::string ip;
116 int port; 117 int port;
117 std::string username; 118 std::string username;
hueplusplus/include/HueLight.h
@@ -333,11 +333,11 @@ public: @@ -333,11 +333,11 @@ public:
333 //! light 333 //! light
334 //! 334 //!
335 //! \note The color temperature will only be returned when the light has a 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 //! The color temperature in mired ranges from 153 to 500 whereas 153 is cold 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 virtual unsigned int getColorTemperature() const 341 virtual unsigned int getColorTemperature() const
342 { 342 {
343 if (colorTemperatureStrategy) 343 if (colorTemperatureStrategy)
@@ -354,7 +354,6 @@ public: @@ -354,7 +354,6 @@ public:
354 //! Updates the lights state by calling refreshState() 354 //! Updates the lights state by calling refreshState()
355 //! The color temperature in mired ranges from 153 to 500 whereas 153 is cold 355 //! The color temperature in mired ranges from 153 to 500 whereas 153 is cold
356 //! and 500 is warm. 356 //! and 500 is warm.
357 - //! \param light A reference of the light  
358 //! \return Unsigned int representing the color temperature in mired or 0 when failed 357 //! \return Unsigned int representing the color temperature in mired or 0 when failed
359 //! \throws std::system_error when system or socket operations fail 358 //! \throws std::system_error when system or socket operations fail
360 //! \throws HueException when response contained no body 359 //! \throws HueException when response contained no body
@@ -439,7 +438,6 @@ public: @@ -439,7 +438,6 @@ public:
439 //! \note The color hue and saturation will only be returned when the light 438 //! \note The color hue and saturation will only be returned when the light
440 //! has a reference to a specific \ref ColorHueStrategy. 439 //! has a reference to a specific \ref ColorHueStrategy.
441 //! \note This will not refresh the light state 440 //! \note This will not refresh the light state
442 - //! \param light A reference of the light  
443 //! \return Pair containing the hue as first value and saturation as second value or an empty one when failed 441 //! \return Pair containing the hue as first value and saturation as second value or an empty one when failed
444 //! \throws std::system_error when system or socket operations fail 442 //! \throws std::system_error when system or socket operations fail
445 //! \throws HueException when response contained no body 443 //! \throws HueException when response contained no body
@@ -460,7 +458,6 @@ public: @@ -460,7 +458,6 @@ public:
460 //! \note The color hue and saturation will only be returned when the light 458 //! \note The color hue and saturation will only be returned when the light
461 //! has a reference to a specific \ref ColorHueStrategy. Updates the lights 459 //! has a reference to a specific \ref ColorHueStrategy. Updates the lights
462 //! state by calling refreshState() 460 //! state by calling refreshState()
463 - //! \param light A const reference of the light  
464 //! \return Pair containing the hue as first value and saturation as second value or an empty one when failed 461 //! \return Pair containing the hue as first value and saturation as second value or an empty one when failed
465 //! \throws std::system_error when system or socket operations fail 462 //! \throws std::system_error when system or socket operations fail
466 //! \throws HueException when response contained no body 463 //! \throws HueException when response contained no body
@@ -501,7 +498,6 @@ public: @@ -501,7 +498,6 @@ public:
501 //! \note The color x and y will only be returned when the light has a 498 //! \note The color x and y will only be returned when the light has a
502 //! reference to a specific \ref ColorHueStrategy. 499 //! reference to a specific \ref ColorHueStrategy.
503 //! \note This does not update the lights state 500 //! \note This does not update the lights state
504 - //! \param light A const reference of the light  
505 //! \return Pair containing the x as first value and y as second value or an 501 //! \return Pair containing the x as first value and y as second value or an
506 //! empty one when failed 502 //! empty one when failed
507 virtual std::pair<float, float> getColorXY() const 503 virtual std::pair<float, float> getColorXY() const
@@ -518,7 +514,6 @@ public: @@ -518,7 +514,6 @@ public:
518 //! \note The color x and y will only be returned when the light has a 514 //! \note The color x and y will only be returned when the light has a
519 //! reference to a specific \ref ColorHueStrategy. 515 //! reference to a specific \ref ColorHueStrategy.
520 //! Updates the lights state by calling refreshState() 516 //! Updates the lights state by calling refreshState()
521 - //! \param light A reference of the light  
522 //! \return Pair containing the x as first value and y as second value or an empty one when failed 517 //! \return Pair containing the x as first value and y as second value or an empty one when failed
523 //! \throws std::system_error when system or socket operations fail 518 //! \throws std::system_error when system or socket operations fail
524 //! \throws HueException when response contained no body 519 //! \throws HueException when response contained no body
@@ -538,7 +533,8 @@ public: @@ -538,7 +533,8 @@ public:
538 //! 533 //!
539 //! \note The color will only be set if the light has a reference to a 534 //! \note The color will only be set if the light has a reference to a
540 //! specific \ref ColorHueStrategy. The values of red, green and blue are 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 //! \param g uint8_t that specifies the green color value 538 //! \param g uint8_t that specifies the green color value
543 //! \param b uint8_t that specifies the blue color value 539 //! \param b uint8_t that specifies the blue color value
544 //! \param transition Optional parameter to set the transition from current state to new, standard is 4 = 400ms 540 //! \param transition Optional parameter to set the transition from current state to new, standard is 4 = 400ms
@@ -660,8 +656,8 @@ public: @@ -660,8 +656,8 @@ public:
660 //! setter functions check whether this feature is enabled and the colorloop 656 //! setter functions check whether this feature is enabled and the colorloop
661 //! can only be disabled with this function or by simply calling 657 //! can only be disabled with this function or by simply calling
662 //! Off()/OffNoRefresh() and then On()/OnNoRefresh(), so you could 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 //! \return Bool that is true on success 661 //! \return Bool that is true on success
666 //! \throws std::system_error when system or socket operations fail 662 //! \throws std::system_error when system or socket operations fail
667 //! \throws HueException when response contained no body 663 //! \throws HueException when response contained no body
@@ -761,6 +757,7 @@ protected: @@ -761,6 +757,7 @@ protected:
761 //! \throws nlohmann::json::parse_error if the reply could not be parsed 757 //! \throws nlohmann::json::parse_error if the reply could not be parsed
762 //! \param request A nlohmann::json aka the request to send 758 //! \param request A nlohmann::json aka the request to send
763 //! \param subPath A path that is appended to the uri, note it should always start with a slash ("/") 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 //! \return The parsed reply 761 //! \return The parsed reply
765 //! \throws std::system_error when system or socket operations fail 762 //! \throws std::system_error when system or socket operations fail
766 //! \throws HueException when response contained no body 763 //! \throws HueException when response contained no body