X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=example%2Fdiameter%2Flauncher%2FMyLocalServer.hpp;h=c90d8f2a007e9cd876763614b90d3ae29e87b187;hb=fad7b1cb36dc9d5de0a7b775fdfb82778a693102;hp=e69de29bb2d1d6434b8b29ae775ad8c2e48c5391;hpb=705d780f70b3596a222479ec7ad0dc3b3ab192cf;p=anna.git diff --git a/example/diameter/launcher/MyLocalServer.hpp b/example/diameter/launcher/MyLocalServer.hpp index e69de29..c90d8f2 100644 --- a/example/diameter/launcher/MyLocalServer.hpp +++ b/example/diameter/launcher/MyLocalServer.hpp @@ -0,0 +1,42 @@ +// ANNA - Anna is Not Nothingness Anymore // +// // +// (c) Copyright 2005-2015 Eduardo Ramos Testillano & Francisco Ruiz Rayo // +// // +// See project site at http://redmine.teslayout.com/projects/anna-suite // +// See accompanying file LICENSE or copy at http://www.teslayout.com/projects/public/anna.LICENSE // + + +#ifndef example_diameter_launcher_MyLocalServer_hpp +#define example_diameter_launcher_MyLocalServer_hpp + +// Project +#include + +// Process +#include "ProgrammedAnswers.hpp" + +namespace anna { + namespace diameter { + namespace codec { + class Engine; + } + } +} + +class MyLocalServer : public anna::diameter::comm::LocalServer { + + anna::diameter::codec::Engine * a_codecEngine; // for automatic answers (failed-avp), write logs, etc. + + void eventResponse(const anna::diameter::comm::Response&) throw(anna::RuntimeException); + void eventRequest(anna::diameter::comm::ServerSession *, const anna::DataBlock&) throw(anna::RuntimeException); + void eventUnknownResponse(anna::diameter::comm::ServerSession *, const anna::DataBlock&) throw(anna::RuntimeException); + void eventDPA(anna::diameter::comm::ServerSession *, const anna::DataBlock&) throw(anna::RuntimeException); + +public: + + ProgrammedAnswers a_reactingAnswers; + void setCodecEngine(anna::diameter::codec::Engine *codecEngine) throw() { a_codecEngine = codecEngine; a_reactingAnswers.setCodecEngine(codecEngine); } + ProgrammedAnswers *getReactingAnswers() throw() { return (ProgrammedAnswers *)&a_reactingAnswers; } +}; + +#endif