ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cvsroot/cf.schmorp.de/dclient/src/backend/communicator/command_parser/replyinfo.h
Revision: 1.2
Committed: Mon Oct 25 12:06:58 2010 UTC (16 years ago) by sf-pippijn
Content type: text/plain
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -0 lines
Log Message:
be more strict about the protocol

File Contents

# Content
1 void
2 command_parser::on_replyinfo (std::istream &args)
3 {
4 std::string title;
5 std::getline (args, title);
6
7 std::vector<std::pair<int, std::string>> info;
8 while (args.peek () != EOF)
9 {
10 int key;
11 args >> key;
12 {
13 char colon = args.get ();
14 assert (colon == ':');
15 }
16 std::string value;
17 std::getline (args, value);
18
19 info.emplace_back (key, std::move (value));
20
21 assert (args);
22 }
23 PARSE_END;
24
25 emit replyinfo (title, info);
26 }