*
* class MyEngine : public EngineImpl {
* public:
- * Engine (getClassName()) {;}
- * static const char* getClassName() throw() { return "<full-naming path>::MyEngine"; }
+ * MyEngine (const char *className = "MyEngine") : Engine(className) {;}
*
* private:
* anna::Recycler<MyAvp> a_avps;
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)
* 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; }
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; }
*/
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