From 8efa1313f3614f34ac0bac947314bb53e9a2412b Mon Sep 17 00:00:00 2001 From: Antonio Juarez Date: Thu, 20 Mar 2014 11:46:11 +0000 Subject: some fixes --- contrib/epee/include/net/http_protocol_handler.h | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'contrib/epee/include/net/http_protocol_handler.h') diff --git a/contrib/epee/include/net/http_protocol_handler.h b/contrib/epee/include/net/http_protocol_handler.h index 4aebcf2aa..4bf48750e 100644 --- a/contrib/epee/include/net/http_protocol_handler.h +++ b/contrib/epee/include/net/http_protocol_handler.h @@ -55,10 +55,11 @@ namespace net_utils /************************************************************************/ /* */ /************************************************************************/ + template class simple_http_connection_handler { public: - typedef net_utils::connection_context_base connection_context; + typedef t_connection_context connection_context;//t_connection_context net_utils::connection_context_base connection_context; typedef http_server_config config_type; simple_http_connection_handler(i_service_endpoint* psnd_hndlr, config_type& config); @@ -141,30 +142,32 @@ namespace net_utils i_service_endpoint* m_psnd_hndlr; }; - + template struct i_http_server_handler { virtual ~i_http_server_handler(){} - virtual bool handle_http_request(const http_request_info& query_info, http_response_info& response, const net_utils::connection_context_base& m_conn_context)=0; + virtual bool handle_http_request(const http_request_info& query_info, http_response_info& response, t_connection_context& m_conn_context)=0; virtual bool init_server_thread(){return true;} virtual bool deinit_server_thread(){return true;} }; - + template struct custum_handler_config: public http_server_config { - i_http_server_handler* m_phandler; + i_http_server_handler* m_phandler; }; /************************************************************************/ /* */ /************************************************************************/ - class http_custom_handler: public simple_http_connection_handler + + template + class http_custom_handler: public simple_http_connection_handler { public: - typedef custum_handler_config config_type; + typedef custum_handler_config config_type; - http_custom_handler(i_service_endpoint* psnd_hndlr, config_type& config, const net_utils::connection_context_base& conn_context):simple_http_connection_handler(psnd_hndlr, config), + http_custom_handler(i_service_endpoint* psnd_hndlr, config_type& config, t_connection_context& conn_context):simple_http_connection_handler(psnd_hndlr, config), m_config(config), m_conn_context(conn_context) {} @@ -198,7 +201,7 @@ namespace net_utils private: //simple_http_connection_handler::config_type m_stub_config; config_type& m_config; - const net_utils::connection_context_base& m_conn_context; + t_connection_context& m_conn_context; }; } } -- cgit v1.2.3