X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=example%2Fdiameter%2Flauncher%2FMyDiameterEntity.hpp;h=554267b5a3f210d28b623c3abaff2b3f668c6304;hb=5a6cba5fde2b2f538a7515f8293cc0a8d9589dfa;hp=e60fdfc8d10cf4bb7dfef1aa35f1ae3d02ffd8bc;hpb=6f990d26c49e6f5bbb31cb1a2a47615918b6c339;p=anna.git diff --git a/example/diameter/launcher/MyDiameterEntity.hpp b/example/diameter/launcher/MyDiameterEntity.hpp index e60fdfc..554267b 100644 --- a/example/diameter/launcher/MyDiameterEntity.hpp +++ b/example/diameter/launcher/MyDiameterEntity.hpp @@ -11,9 +11,8 @@ // Project #include +#include -// Process -#include "ProgrammedAnswers.hpp" namespace anna { namespace diameter { @@ -25,21 +24,19 @@ namespace anna { class MyDiameterEntity : public anna::diameter::comm::Entity { - 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::ClientSession *, const anna::DataBlock&) throw(anna::RuntimeException); - void eventUnknownResponse(anna::diameter::comm::ClientSession *, const anna::DataBlock&) throw(anna::RuntimeException); - void eventDPA(anna::diameter::comm::ClientSession *, const anna::DataBlock&) throw(anna::RuntimeException); - - // Reimplementation - int readSocketId(const anna::diameter::comm::Message* message, int maxClientSessions) const throw(); + void eventRequestRetransmission(const anna::diameter::comm::ClientSession *, anna::diameter::comm::Message*) ; + void eventResponse(const anna::diameter::comm::Response&) noexcept(false); + void eventRequest(anna::diameter::comm::ClientSession *, const anna::DataBlock&) noexcept(false); + void eventUnknownResponse(anna::diameter::comm::ClientSession *, const anna::DataBlock&) noexcept(false); + void eventDPA(anna::diameter::comm::ClientSession *, const anna::DataBlock&) noexcept(false); 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; } + MyDiameterEntity() {;} + virtual ~MyDiameterEntity() {;} + + anna::diameter::codec::MessagesDeque a_reactingAnswers; + anna::diameter::codec::MessagesDeque *getReactingAnswers() { return (anna::diameter::codec::MessagesDeque*)&a_reactingAnswers; } }; #endif