Fix retransmission issues (order, tracing, etc.)
[anna.git] / example / diameter / launcher / MyDiameterEntity.hpp
index fe23cfa..9453d64 100644 (file)
 // Process
 #include "ProgrammedAnswers.hpp"
 
+namespace anna {
+  namespace diameter {
+    namespace codec {
+      class Engine;
+    }
+  }
+}
 
 class MyDiameterEntity : public anna::diameter::comm::Entity {
 
+  anna::diameter::codec::Engine * a_codecEngine; // for automatic answers (failed-avp), write logs, etc.
+
+  void eventRequestRetransmission(const anna::diameter::comm::ClientSession *, anna::diameter::comm::Message*) throw();
   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);
@@ -29,6 +39,7 @@ class MyDiameterEntity : public anna::diameter::comm::Entity {
 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; }
 };