summaryrefslogtreecommitdiff
path: root/server/src/session.h
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/session.h')
-rw-r--r--server/src/session.h13
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 {