From d23cdd88012b230692ba115471855031240db9eb Mon Sep 17 00:00:00 2001 From: deva Date: Mon, 21 Jun 2010 13:24:53 +0000 Subject: Split journal code into modules. Fix bug, when user is changed in the middle of an active session. --- server/src/journal.h | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'server/src/journal.h') diff --git a/server/src/journal.h b/server/src/journal.h index 1ba258d..5a4cb99 100644 --- a/server/src/journal.h +++ b/server/src/journal.h @@ -39,31 +39,34 @@ class SessionSerialiser; class Journal { friend class SessionSerialiser; public: - Journal(std::string host, unsigned short int port); + Journal(); void addEntry(Transaction &transaction, Commit &commit, std::string resume, Template *templ); void addEntry(std::string resume, std::string macro, int index); - void commit(); + virtual void commit() = 0; std::string getEntry(std::string macro); void removeEntry(std::string macro); -private: - std::string host; - unsigned short int port; - - std::string currentuser; - std::string currentcpr; + void setUser(std::string user); + std::string user(); + + void setPatientID(std::string id); + std::string patientID(); +protected: class ResumeEntry { public: std::string resume; std::string macro; }; + std::string _user; + std::string _patientid; + std::map< int, ResumeEntry > entrylist; }; -- cgit v1.2.3