X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=include%2Fanna%2Fdiameter%2Fcodec%2FEngineImpl.hpp;h=b973e8dd8a700fe6403f877a48a93f846eeda3d3;hb=2921c651c9945cefec0715167201596aaa079e8d;hp=e28272426f13c85ad290e6247ec7682d195668a4;hpb=93366a0bda79e6fd6e7dad6316bfcf8cc82f5731;p=anna.git diff --git a/include/anna/diameter/codec/EngineImpl.hpp b/include/anna/diameter/codec/EngineImpl.hpp index e282724..b973e8d 100644 --- a/include/anna/diameter/codec/EngineImpl.hpp +++ b/include/anna/diameter/codec/EngineImpl.hpp @@ -114,8 +114,7 @@ class Avp; * * class MyEngine : public EngineImpl { * public: - * Engine (getClassName()) {;} - * static const char* getClassName() throw() { return "::MyEngine"; } + * MyEngine (const char *className = "MyEngine") : Engine(className) {;} * * private: * anna::Recycler a_avps; @@ -179,6 +178,7 @@ private: anna::xml::DTDMemory a_dtd; ValidationDepth::_v a_validationDepth; ValidationMode::_v a_validationMode; + bool a_singleFailedAVP; bool a_ignoreFlags; FixMode::_v a_fixMode; bool a_selectStackWithApplicationId; // default behaviour: let the user switch the stack (false for this boolean) @@ -238,7 +238,9 @@ public: * this to have the commonly recommended way to choose the stack: using the Application-Id value. * * @warning do not activate in case of multithreaded applications. + * @warning must register the base protocol stack (with id = 0 = application-id) to manage base protocol messages. * @param enable Activates/deactivates the stack selection from the Application-Id value within the message header. + * False by default on engine construction. */ void selectStackWithApplicationId (bool enable) throw() { a_selectStackWithApplicationId = enable; } @@ -248,7 +250,7 @@ public: Gets the currently configured behaviour regarding stack selection for multistack codec engines in mono thread applications. - @return True if selection is done with the Application-Id. False if no selection is performed (user responsibility). + @return True if selection is done with the Application-Id. False (default) if no selection is performed (user responsibility). */ bool hasSelectStackWithApplicationId (void) throw() { return a_selectStackWithApplicationId; } @@ -322,7 +324,20 @@ public: */ FixMode::_v getFixMode() const throw() { return a_fixMode; } + /** + * Sets single FailedAVP. True by default. If false, and more than one wrong avp are found during message + * decoding and or validation, a new Failed-AVP will be added to the dynamic answer provided. The standard + * talks about only one but it is open to do this. + * + * \param single Single Failed-AVP boolean. + */ + void setSingleFailedAVP(bool single = true) throw() { a_singleFailedAVP = single; } + /** + * Returns single Failed-AVP boolean. + * \return Failed-AVP could be one (true) or more (false) in answer message. + */ + bool getSingleFailedAVP() const throw() { return a_singleFailedAVP; } /** DTD document for xml message parsing