diff options
author | deva <deva> | 2011-02-04 13:34:40 +0000 |
---|---|---|
committer | deva <deva> | 2011-02-04 13:34:40 +0000 |
commit | 6bae4fd17d2660d53279dac9287de52be2a00c6c (patch) | |
tree | 595f7aa65558735a3fc05062d39e95e88b026a51 /server/src/session.h | |
parent | e6a824034c742b9a414d32ecfbcc8531180f93dc (diff) |
Database pool is now used instead of one connection per session. Admin interface supports session unlock.
Diffstat (limited to 'server/src/session.h')
-rw-r--r-- | server/src/session.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/server/src/session.h b/server/src/session.h index 31dee3f..f532452 100644 --- a/server/src/session.h +++ b/server/src/session.h @@ -34,12 +34,13 @@ #include "mutex.h" -class Database; +class Environment; class Journal; class Session { public: - Session(std::string sessionid, std::string patientid, std::string templ); + Session(Environment *env, + std::string sessionid, std::string patientid, std::string templ); ~Session(); std::string id(); @@ -52,19 +53,20 @@ public: void discard(); Journal *journal(); - Database *database(); std::string patientid; std::string templ; bool active(); + void setActive(bool active); bool isreadonly; private: + Environment *env; Journal *_journal; - Database *_database; Mutex mutex; + std::string sessionid; }; class Sessions { @@ -76,7 +78,7 @@ public: const std::string sessionid; }; - Sessions(); + Sessions(Environment *env); /** * Create a new session, with a unique id. Insert it into the session list, @@ -114,6 +116,7 @@ public: private: std::map<std::string, Session *> sessions; + Environment *env; }; class SessionAutolock { |