| 24 | #pragma once |
| 25 | |
| 26 | class HTTPVersion |
| 27 | { |
| 28 | public: |
| 29 | HTTPVersion() {} |
| 30 | HTTPVersion(HTTPVersion const &that) = default; |
| 31 | HTTPVersion &operator=(const HTTPVersion &) = default; |
| 32 | |
| 33 | explicit HTTPVersion(int version); |
| 34 | constexpr HTTPVersion(uint8_t ver_major, uint8_t ver_minor); |
| 35 | |
| 36 | int operator==(const HTTPVersion &hv) const; |
| 37 | int operator!=(const HTTPVersion &hv) const; |
| 38 | int operator>(const HTTPVersion &hv) const; |
| 39 | int operator<(const HTTPVersion &hv) const; |
| 40 | int operator>=(const HTTPVersion &hv) const; |
| 41 | int operator<=(const HTTPVersion &hv) const; |
| 42 | |
| 43 | uint8_t get_major() const; |
| 44 | uint8_t get_minor() const; |
| 45 | uint32_t get_flat_version() const; |
| 46 | |
| 47 | private: |
| 48 | uint8_t vmajor = 0; |
| 49 | uint8_t vminor = 0; |
| 50 | }; |
| 51 | |
| 52 | /*------------------------------------------------------------------------- |
| 53 | -------------------------------------------------------------------------*/ |
no outgoing calls
no test coverage detected