5f04d91b42c15271041a2578b47c4e1d1a35322e
[anna.git] / example / diameter / launcher / MyHandler.hpp
1 // ANNA - Anna is Not Nothingness Anymore                                                         //
2 //                                                                                                //
3 // (c) Copyright 2005-2015 Eduardo Ramos Testillano & Francisco Ruiz Rayo                         //
4 //                                                                                                //
5 // See project site at http://redmine.teslayout.com/projects/anna-suite                           //
6 // See accompanying file LICENSE or copy at http://www.teslayout.com/projects/public/anna.LICENSE //
7
8
9 #ifndef example_diameter_launcher_MyHandler_hpp
10 #define example_diameter_launcher_MyHandler_hpp
11
12 // Project
13 #include <anna/http/Response.hpp>
14 #include <anna/http/Handler.hpp>
15
16
17 class MyHandler : public anna::http::Handler {
18 public:
19   MyHandler() : anna::http::Handler("http_converter::MyHandler") {
20     allocateResponse()->createHeader(anna::http::Header::Type::Date);
21   }
22
23 private:
24
25   void evRequest(anna::comm::ClientSocket&, const anna::http::Request& request) throw(anna::RuntimeException);
26   void evResponse(anna::comm::ClientSocket&, const anna::http::Response&) throw(anna::RuntimeException) {;}
27 };
28
29 #endif