summaryrefslogtreecommitdiff
path: root/server/src/connection.h
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/connection.h')
-rw-r--r--server/src/connection.h37
1 files changed, 4 insertions, 33 deletions
diff --git a/server/src/connection.h b/server/src/connection.h
index e9a4e50..153e865 100644
--- a/server/src/connection.h
+++ b/server/src/connection.h
@@ -29,43 +29,14 @@
#define __PRACRO_CONNECTION_H__
#include <string>
-#include "environment.h"
-#include "transaction.h"
-#include "transactionparser.h"
-class Session;
+#include "httpd.h"
class Connection {
public:
- Connection(Environment &e, std::string sessionid,
- std::string patientid, std::string templ,
- bool commit, bool discard, bool nocommit);
- ~Connection();
-
- bool handle(const char *data, size_t size);
-
- std::string getResponse();
- std::string getSessionID();
-
-private:
- void commit(Session *session);
- void nocommit(Session *session);
- void discard(Session *session);
-
- std::string patientid;
- std::string templ;
- std::string sessionid;
- bool docommit;
- bool donocommit;
- bool dodiscard;
- Environment &env;
-
- Transaction transaction;
- TransactionParser parser;
-
- std::string response;
-
- bool parser_complete;
+ virtual bool handle(const char *data, size_t size) = 0;
+ virtual std::string getResponse() = 0;
+ virtual headers_t getHeaders() = 0;
};
#endif/*__PRACRO_CONNECTION_H__*/