Browse Source

implement request getters

CPP-GTK4
yggverse 4 months ago
parent
commit
0ce0c6776a
  1. 29
      src/app/browser/main/tab/page/navbar.cpp
  2. 9
      src/app/browser/main/tab/page/navbar.hpp

29
src/app/browser/main/tab/page/navbar.cpp

@ -99,8 +99,33 @@ void Navbar::refresh() @@ -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();
}

9
src/app/browser/main/tab/page/navbar.hpp

@ -6,6 +6,7 @@ @@ -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 @@ -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();
};
}

Loading…
Cancel
Save