23 #include "footer_generator.h" 25 #include <core/version.h> 26 #include <utils/misc/string_conversions.h> 41 __service_browser = service_browser;
48 std::string f = std::string(
"\n <div id=\"footer\">\n")
51 f +=
" <div id=\"version\"><a href=\"http://www.fawkesrobotics.org\" " 52 "rel=\"external\">Fawkes ";
53 f += FAWKES_VERSION_STRING;
57 f +=
" <div class=\"instances\"><ul>";
59 WebviewServiceBrowseHandler::ServiceList::iterator i;
60 for (i = sl.begin(); i != sl.end(); ++i) {
61 std::string short_host = i->second->host();
62 std::string::size_type s = short_host.find(
".");
63 if (s != std::string::npos) short_host = short_host.substr(0, s);
65 f += std::string(
"<li><a href=\"http://") + i->second->host() +
":" 67 +
" title=\"" + i->first +
"\">" 68 + short_host +
"</a></li>";
ServiceList & service_list()
Get the service list.
Browse handler to detect other Webview instances on the network.
std::map< std::string, fawkes::NetworkService * > ServiceList
A map of services.
static std::string to_string(unsigned int i)
Convert unsigned int value to a string.