add server version "(4) Kreuz Aachen"

refactor-result-recursion
Lars Rohwedder 7 years ago
parent 421a7e53a1
commit d9bf48f4de

@ -22,7 +22,7 @@
</head>
<body>
<h1>Send example calls via jQuery v142</h1>
<h1>Send example calls via jQuery <span id="spn_version">(no JavaScript?)</span></h1>
<form id="frm" name="frm">

@ -351,6 +351,6 @@ function init_pep_functions()
optionList += '<option' + (f.separator? ' disabled>':'>') + f.name + "</option>\n";
}
document.getElementById("fn_name").innerHTML = optionList;
document.getElementById("spn_version").innerHTML = "version: " + server_version;
getAllSessions();
}

@ -36,6 +36,13 @@ const std::string CreateSessionUrl = BaseUrl + "createSession";
const std::string GetAllSessionsUrl = BaseUrl + "getAllSessions";
const std::string ApiRequestUrl = BaseUrl + "callFunction";
// version names comes from here:
// https://de.wikipedia.org/wiki/Bundesautobahn_4
const std::string server_version =
"(4) Kreuz Aachen"; // first version with this version scheme :-)
template<>
In<PEP_SESSION>::~In()
{
@ -239,7 +246,7 @@ void OnOtherRequest(evhttp_request* req, void*)
// generate a JavaScript file containing the definition of all registered callable functions, see above.
void OnGetFunctions(evhttp_request* req, void*)
{
static const char* const preamble =
static const std::string preamble =
"var Direction = { In:1, Out:2, InOut:3 };\n"
"var Type = {\n"
" Blob : 10, // binary strings or 'array of octet'\n"
@ -253,6 +260,7 @@ void OnGetFunctions(evhttp_request* req, void*)
" Session : 90 // opaque type. only a special encoded 'handle' is used in JavaScript code\n"
" };\n"
"\n"
"var server_version = \"" + server_version + "\";\n"
"var pep_functions = ";
js::Array jsonfunctions;

Loading…
Cancel
Save