management: FacePersistency field in ControlParameters
Change-Id: I3a93bd658d40f3d77f7790b72e8873646ecc7990
Refs: #2991
diff --git a/src/management/nfd-control-parameters.hpp b/src/management/nfd-control-parameters.hpp
index 3a099cc..ab287a5 100644
--- a/src/management/nfd-control-parameters.hpp
+++ b/src/management/nfd-control-parameters.hpp
@@ -43,6 +43,7 @@
CONTROL_PARAMETER_FLAGS,
CONTROL_PARAMETER_STRATEGY,
CONTROL_PARAMETER_EXPIRATION_PERIOD,
+ CONTROL_PARAMETER_FACE_PERSISTENCY,
CONTROL_PARAMETER_UBOUND
};
@@ -56,6 +57,7 @@
"Flags",
"Strategy",
"ExpirationPeriod",
+ "FacePersistency",
};
/**
@@ -372,6 +374,36 @@
return *this;
}
+ bool
+ hasFacePersistency() const
+ {
+ return m_hasFields[CONTROL_PARAMETER_FACE_PERSISTENCY];
+ }
+
+ FacePersistency
+ getFacePersistency() const
+ {
+ BOOST_ASSERT(this->hasFacePersistency());
+ return m_facePersistency;
+ }
+
+ ControlParameters&
+ setFacePersistency(FacePersistency persistency)
+ {
+ m_wire.reset();
+ m_facePersistency = persistency;
+ m_hasFields[CONTROL_PARAMETER_FACE_PERSISTENCY] = true;
+ return *this;
+ }
+
+ ControlParameters&
+ unsetFacePersistency()
+ {
+ m_wire.reset();
+ m_hasFields[CONTROL_PARAMETER_FACE_PERSISTENCY] = false;
+ return *this;
+ }
+
const std::vector<bool>&
getPresentFields() const
{
@@ -390,6 +422,7 @@
uint64_t m_flags;
Name m_strategy;
time::milliseconds m_expirationPeriod;
+ FacePersistency m_facePersistency;
private:
mutable Block m_wire;