diff options
author | deva <deva> | 2011-02-04 07:35:10 +0000 |
---|---|---|
committer | deva <deva> | 2011-02-04 07:35:10 +0000 |
commit | 9ec9a98e83076bb339d1d546fa445b2420e5a4fb (patch) | |
tree | d507ac2dff3825719c6557a672ad8eb64c303e18 /server/src/connection.h | |
parent | e137415d0e0325d143b69a9917d8ebba411b3c12 (diff) |
A new connection handling mechanism.
Diffstat (limited to 'server/src/connection.h')
-rw-r--r-- | server/src/connection.h | 37 |
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__*/ |