implement request getters

This commit is contained in:
yggverse 2024-08-16 09:02:50 +03:00
parent 107ab08784
commit 0ce0c6776a
2 changed files with 35 additions and 3 deletions

View File

@ -99,8 +99,33 @@ void Navbar::refresh()
);
}
// Getters
Glib::ustring Navbar::get_request_value()
// Public getters
Glib::ustring Navbar::get_request()
{
return request->get_text();
}
std::string Navbar::get_request_scheme()
{
return request->get_scheme();
}
std::string Navbar::get_request_host()
{
return request->get_host();
}
std::string Navbar::get_request_path()
{
return request->get_path();
}
std::string Navbar::get_request_query()
{
return request->get_query();
}
std::string Navbar::get_request_port()
{
return request->get_port();
}

View File

@ -6,6 +6,7 @@
#include <glibmm/ustring.h>
#include <gtkmm/box.h>
#include <sigc++/functors/mem_fun.h>
#include <string>
namespace app::browser::main::tab::page
{
@ -45,7 +46,13 @@ namespace app::browser::main::tab::page
void refresh();
// Getters
Glib::ustring get_request_value();
Glib::ustring get_request();
std::string get_request_scheme();
std::string get_request_host();
std::string get_request_port();
std::string get_request_path();
std::string get_request_query();
};
}