|
22 | 22 | #error "Only <httpserver.hpp> or <httpserverpp> can be included directly." |
23 | 23 | #endif |
24 | 24 |
|
25 | | -#ifndef _BASIC_AUTH_FAIL_RESPONSE_HPP_ |
26 | | -#define _BASIC_AUTH_FAIL_RESPONSE_HPP_ |
| 25 | +#ifndef SRC_HTTPSERVER_BASIC_AUTH_FAIL_RESPONSE_HPP_ |
| 26 | +#define SRC_HTTPSERVER_BASIC_AUTH_FAIL_RESPONSE_HPP_ |
27 | 27 |
|
28 | 28 | #include <string> |
29 | 29 | #include "http_utils.hpp" |
|
32 | 32 | struct MHD_Connection; |
33 | 33 | struct MHD_Response; |
34 | 34 |
|
35 | | -namespace httpserver |
36 | | -{ |
| 35 | +namespace httpserver { |
37 | 36 |
|
38 | | -class basic_auth_fail_response : public string_response |
39 | | -{ |
40 | | - public: |
41 | | - basic_auth_fail_response() = default; |
| 37 | +class basic_auth_fail_response : public string_response { |
| 38 | + public: |
| 39 | + basic_auth_fail_response() = default; |
42 | 40 |
|
43 | | - explicit basic_auth_fail_response( |
| 41 | + explicit basic_auth_fail_response( |
44 | 42 | const std::string& content, |
45 | 43 | const std::string& realm = "", |
46 | 44 | int response_code = http::http_utils::http_ok, |
47 | | - const std::string& content_type = http::http_utils::text_plain |
48 | | - ): |
| 45 | + const std::string& content_type = http::http_utils::text_plain): |
49 | 46 | string_response(content, response_code, content_type), |
50 | | - realm(realm) |
51 | | - { |
| 47 | + realm(realm) { |
52 | 48 | } |
53 | 49 |
|
54 | | - basic_auth_fail_response(const basic_auth_fail_response& other) = default; |
55 | | - basic_auth_fail_response(basic_auth_fail_response&& other) noexcept = default; |
56 | | - basic_auth_fail_response& operator=(const basic_auth_fail_response& b) = default; |
57 | | - basic_auth_fail_response& operator=(basic_auth_fail_response&& b) = default; |
| 50 | + basic_auth_fail_response(const basic_auth_fail_response& other) = default; |
| 51 | + basic_auth_fail_response(basic_auth_fail_response&& other) noexcept = default; |
| 52 | + basic_auth_fail_response& operator=(const basic_auth_fail_response& b) = default; |
| 53 | + basic_auth_fail_response& operator=(basic_auth_fail_response&& b) = default; |
58 | 54 |
|
59 | | - ~basic_auth_fail_response() = default; |
| 55 | + ~basic_auth_fail_response() = default; |
60 | 56 |
|
61 | | - int enqueue_response(MHD_Connection* connection, MHD_Response* response); |
| 57 | + int enqueue_response(MHD_Connection* connection, MHD_Response* response); |
62 | 58 |
|
63 | | - private: |
64 | | - std::string realm = ""; |
| 59 | + private: |
| 60 | + std::string realm = ""; |
65 | 61 | }; |
66 | 62 |
|
67 | | -} |
68 | | -#endif // _BASIC_AUTH_FAIL_RESPONSE_HPP_ |
| 63 | +} // namespace httpserver |
| 64 | +#endif // SRC_HTTPSERVER_BASIC_AUTH_FAIL_RESPONSE_HPP_ |
0 commit comments