Multistack launcher
[anna.git] / include / anna / diameter / codec / EngineImpl.hpp
index bb7c6f5..1884083 100644 (file)
@@ -178,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)
@@ -322,7 +323,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