diff options
Diffstat (limited to 'server/src/sessionheaderparser.cc')
-rw-r--r-- | server/src/sessionheaderparser.cc | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/server/src/sessionheaderparser.cc b/server/src/sessionheaderparser.cc index 93bd80b..c9a8e67 100644 --- a/server/src/sessionheaderparser.cc +++ b/server/src/sessionheaderparser.cc @@ -107,8 +107,17 @@ void SessionHeaderParser::startTag(std::string name, attributes_t &attr) if(name == "session") { done = true; - if(attr.find("patientid") != attr.end()) patientid = attr["patientid"]; - if(attr.find("template") != attr.end()) templ = attr["template"]; + if(attr.find("patientid") != attr.end()) { + header.patientid = attr["patientid"]; + } + + if(attr.find("template") != attr.end()) { + header.templ = attr["template"]; + } + + if(attr.find("id") != attr.end()) { + header.id = attr["id"]; + } } else { throw Exception("Missing root tag 'session' - found '" + name + "'"); } @@ -149,14 +158,9 @@ void SessionHeaderParser::parseError(const char *buf, size_t len, std::string er } } -std::string SessionHeaderParser::getPatientID() -{ - return patientid; -} - -std::string SessionHeaderParser::getTemplate() +SessionHeaderParser::Header SessionHeaderParser::getHeader() { - return templ; + return header; } #ifdef TEST_SESSIONHEADERPARSER |