diff options
Diffstat (limited to 'server/src/server.cc')
-rw-r--r-- | server/src/server.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/server/src/server.cc b/server/src/server.cc index 2f89c73..a82b716 100644 --- a/server/src/server.cc +++ b/server/src/server.cc @@ -131,17 +131,31 @@ static void connection(TCPSocket &socket) // Map the results LUAQueryMapper lqm(qp.result); + socket.write(" <course name=\""); + socket.write(templ->course.attributes["name"]); + socket.write("\">\n"); + // Generate the macro and return it to the client std::vector< Macro >::iterator mi2 = templ->course.macroes.begin(); while(mi2 != templ->course.macroes.end()) { Macro ¯o = (*mi2); printf("Macro: %s ?= %s\n", macro.attributes["name"].c_str(), request.macro.c_str()); + + socket.write(" <macro name=\""); + socket.write(macro.attributes["name"]); + socket.write("\">\n"); + if(macro.attributes["name"] == request.macro) { widgetgenerator(socket, macro, lqm); } + + socket.write(" </macro>\n"); + mi2++; } + socket.write(" </course>\n"); + i++; } |