JETServer
/home/bradarant/barant/HTTPServer/__index.h
1
#ifndef ____index_h__
2
#define ____index_h__
3
4
#include "HTTPPage.h"
5
#include "HTTPRequest.h"
6
7
namespace
http
{
8
9
class
__index
:
public
HTTPPage
{
10
11
int
processCommand(std::string request, core::Session *session,
HTTPSession
*httpSession,
HTTPRequest
&httpRequest, std::stringstream &data)
override
{
12
13
data <<
"<html>"
<< std::endl;
14
data <<
" <head>"
<< std::endl;
15
data <<
" <link rel=\"icon\" type=\"image/x-icon\" href=\"/favicon.ico\" />"
<< std::endl;
16
data <<
" <link type=\"text/css\" rel=\"stylesheet\" href=\"/style\" />"
<< std::endl;
17
data <<
" <script src=\"/script\"></script>"
<< std::endl;
18
data <<
" </head>"
<< std::endl;
19
20
data <<
"<body ondragstart=\"return false;\" "
<< std::endl;
21
data <<
" ondrop=\"return false;\" "
<< std::endl;
22
data <<
" onLoad=\"getPage('/welcome','main');\">"
<< std::endl;
23
data <<
" <div id=\"main\">If you see this then something is wrong.</div>"
<< std::endl;
24
data <<
" </body>"
<< std::endl;
25
data <<
"</html>"
<< std::endl;
26
27
httpRequest.response.addHeader(
"Content-Type"
,
"text/html"
);
28
return
true
;
29
}
30
};
31
}
32
33
#endif
http::HTTPSession
Definition:
HTTPSession.h:9
http::__index
Definition:
__index.h:9
http
Definition:
__configure.h:4
http::HTTPPage
Definition:
HTTPPage.h:11
http::HTTPRequest
Definition:
HTTPRequest.h:11
Generated by
1.8.13