summaryrefslogtreecommitdiff
path: root/server/src/sessionheaderparser.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2012-08-09 12:04:43 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2012-08-09 12:04:43 +0200
commit05182c2214c5983c8ce7376c42805ad9802c75e5 (patch)
treea6b014773363d9828032056c09e44b3d0f5f830d /server/src/sessionheaderparser.cc
parent40211cd5598c5349358e1d33b6353a4c729b17b3 (diff)
Added session files to admin session list.
Diffstat (limited to 'server/src/sessionheaderparser.cc')
-rw-r--r--server/src/sessionheaderparser.cc22
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