From: Eduardo Ramos Testillano Date: Mon, 8 Jun 2015 18:53:53 +0000 (+0200) Subject: Codec engine on Avp and Message constructors X-Git-Tag: REFACTORING_TESTING_LIBRARY~128 X-Git-Url: https://git.teslayout.com/public/public/public/?a=commitdiff_plain;h=b105cc8fc16f1d9bf26969a209e3bf1d506a2ef3;p=anna.git Codec engine on Avp and Message constructors --- diff --git a/include/anna/diameter/codec/Avp.hpp b/include/anna/diameter/codec/Avp.hpp index 6deb5d7..cce2a48 100644 --- a/include/anna/diameter/codec/Avp.hpp +++ b/include/anna/diameter/codec/Avp.hpp @@ -373,14 +373,16 @@ public: /** * Default constructor + @param engine Codec engine used */ - Avp(); + Avp(Engine *engine = NULL); /** * Identified constructor * @param id Avp identifier as pair (code,vendor-id). + @param engine Codec engine used */ - Avp(AvpId id); + Avp(AvpId id, Engine *engine = NULL); /** Sets the codec engine */ diff --git a/include/anna/diameter/codec/Message.hpp b/include/anna/diameter/codec/Message.hpp index 133c4af..449a49a 100644 --- a/include/anna/diameter/codec/Message.hpp +++ b/include/anna/diameter/codec/Message.hpp @@ -163,14 +163,16 @@ public: /** * Default constructor + * @param engine Codec engine used */ - Message(); + Message(Engine *engine = NULL); /** * Identified constructor * @param id Command identifier as pair (code,request-indicator). + * @param engine Codec engine used */ - Message(CommandId id); + Message(CommandId id, Engine *engine = NULL); /** Sets the codec engine */ diff --git a/source/diameter/codec/Avp.cpp b/source/diameter/codec/Avp.cpp index f35cca8..79b04b0 100644 --- a/source/diameter/codec/Avp.cpp +++ b/source/diameter/codec/Avp.cpp @@ -55,7 +55,7 @@ const U8 Avp::PBitMask(0x20); //------------------------------------------------------------------------------ //------------------------------------------------------------------- Avp::Avp() //------------------------------------------------------------------------------ -Avp::Avp() { +Avp::Avp(Engine *engine) : a_engine(engine) { initialize(); } @@ -63,7 +63,7 @@ Avp::Avp() { //------------------------------------------------------------------------------ //------------------------------------------------------------------- Avp::Avp() //------------------------------------------------------------------------------ -Avp::Avp(AvpId id) { +Avp::Avp(AvpId id, Engine *engine) : a_engine(engine) { initialize(); setId(id); } diff --git a/source/diameter/codec/Message.cpp b/source/diameter/codec/Message.cpp index 2726992..1d41374 100644 --- a/source/diameter/codec/Message.cpp +++ b/source/diameter/codec/Message.cpp @@ -56,7 +56,7 @@ const U8 Message::TBitMask(0x10); //------------------------------------------------------------------------------ //----------------------------------------------------------- Message::Message() //------------------------------------------------------------------------------ -Message::Message() : a_forCode(true) { +Message::Message(Engine *engine) : a_engine(engine), a_forCode(true) { initialize(); } @@ -64,7 +64,7 @@ Message::Message() : a_forCode(true) { //------------------------------------------------------------------------------ //----------------------------------------------------------- Message::Message() //------------------------------------------------------------------------------ -Message::Message(CommandId id) : a_forCode(true) { +Message::Message(CommandId id, Engine *engine) : a_engine(engine), a_forCode(true) { initialize(); setId(id); }