{\r
std::wstringstream replyString;\r
replyString << TEXT("201 INFO OK\r\n");\r
-\r
+ \r
+ boost::property_tree::wptree info;\r
if(_parameters.size() >= 1)\r
{\r
std::vector<std::wstring> split;\r
layer = boost::lexical_cast<int>(split[1]);\r
\r
if(layer == std::numeric_limits<int>::min())\r
- boost::property_tree::xml_parser::write_xml(replyString, channels_.at(channel)->info(), boost::property_tree::xml_writer_settings<wchar_t>(' ', 3));\r
+ { \r
+ info.add_child(L"channel", channels_.at(channel)->info())\r
+ .add(L"index", channel);\r
+ }\r
else\r
- boost::property_tree::xml_parser::write_xml(replyString, channels_.at(channel)->stage()->info(layer).get(), boost::property_tree::xml_writer_settings<wchar_t>(' ', 3));\r
+ {\r
+ if(_parameters.size() >= 2)\r
+ {\r
+ if(_parameters[1] == L"B")\r
+ info.add_child(L"producer", channels_.at(channel)->stage()->background(layer).get()->info());\r
+ else\r
+ info.add_child(L"producer", channels_.at(channel)->stage()->foreground(layer).get()->info());\r
+ }\r
+ else\r
+ {\r
+ info.add_child(L"layer", channels_.at(channel)->stage()->info(layer).get())\r
+ .add(L"index", layer);\r
+ }\r
+ }\r
}\r
else\r
{\r
- boost::property_tree::wptree info;\r
int index = 0;\r
BOOST_FOREACH(auto channel, channels_)\r
info.add_child(L"channels.channel", channel->info())\r
.add(L"index", ++index);\r
-\r
- boost::property_tree::xml_parser::write_xml(replyString, info, boost::property_tree::xml_writer_settings<wchar_t>(' ', 3));\r
}\r
+\r
+ boost::property_tree::xml_parser::write_xml(replyString, info, boost::property_tree::xml_writer_settings<wchar_t>(' ', 3));\r
replyString << TEXT("\r\n");\r
SetReplyString(replyString.str());\r
return true;\r