2025-03-07 02:25:54 +01:00
|
|
|
#ifndef seafire__routing__endpoint_hxx_
|
|
|
|
#define seafire__routing__endpoint_hxx_
|
|
|
|
|
|
|
|
#include <seafire/server/request-handler.hxx>
|
|
|
|
|
|
|
|
#include <ostream>
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
namespace seafire::routing
|
|
|
|
{
|
|
|
|
|
|
|
|
class endpoint_t
|
|
|
|
{
|
|
|
|
public:
|
2025-03-07 22:13:09 +01:00
|
|
|
endpoint_t(std::string, std::string, server::request_handler_t);
|
2025-03-07 02:25:54 +01:00
|
|
|
|
|
|
|
std::string const&
|
2025-03-07 22:13:09 +01:00
|
|
|
host() const;
|
|
|
|
|
|
|
|
std::string const&
|
|
|
|
path() const;
|
2025-03-07 02:25:54 +01:00
|
|
|
|
|
|
|
server::request_handler_t const&
|
|
|
|
handler() const;
|
|
|
|
|
|
|
|
private:
|
2025-03-07 22:13:09 +01:00
|
|
|
std::string host_;
|
|
|
|
std::string path_;
|
2025-03-07 02:25:54 +01:00
|
|
|
server::request_handler_t handler_;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
std::ostream&
|
|
|
|
to_stream(std::ostream&, endpoint_t const&);
|
|
|
|
|
|
|
|
std::ostream&
|
|
|
|
operator<<(std::ostream&, endpoint_t const&);
|
|
|
|
|
|
|
|
} // namespace seafire::routing
|
|
|
|
|
|
|
|
#endif
|