mgmt, main: add support for authorized commands
refs: #1227
Change-Id: I907d1fa6e78775470c5376fcdfe898be4c311001
diff --git a/daemon/mgmt/internal-face.hpp b/daemon/mgmt/internal-face.hpp
index 8d5805c..3ce32e3 100644
--- a/daemon/mgmt/internal-face.hpp
+++ b/daemon/mgmt/internal-face.hpp
@@ -10,6 +10,8 @@
#include "face/face.hpp"
#include "app-face.hpp"
+#include "command-validator.hpp"
+
namespace nfd {
class InternalFace : public Face, public AppFace
@@ -25,6 +27,12 @@
InternalFace();
+ CommandValidator&
+ getValidator();
+
+ virtual
+ ~InternalFace();
+
// Overridden Face methods for forwarder
virtual void
@@ -45,17 +53,19 @@
virtual void
put(const Data& data);
- virtual
- ~InternalFace();
-
private:
- // void
- // onConfig(ConfigFile::Node section, bool isDryRun);
-
std::map<Name, OnInterest> m_interestFilters;
+ CommandValidator m_validator;
};
+inline CommandValidator&
+InternalFace::getValidator()
+{
+ return m_validator;
+}
+
+
} // namespace nfd
#endif //NFD_MGMT_INTERNAL_FACE_HPP