From 05182c2214c5983c8ce7376c42805ad9802c75e5 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Thu, 9 Aug 2012 12:04:43 +0200 Subject: Added session files to admin session list. --- server/src/sessionheaderparser.cc | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'server/src/sessionheaderparser.cc') 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 -- cgit v1.2.3