face: declare face counters
refs #1280
Change-Id: Ia1c50ab2b31d6131728489b3b038dc6f7608266f
diff --git a/daemon/face/face.hpp b/daemon/face/face.hpp
index f3c5d40..45cde49 100644
--- a/daemon/face/face.hpp
+++ b/daemon/face/face.hpp
@@ -9,6 +9,7 @@
#include "common.hpp"
#include "core/event-emitter.hpp"
+#include "face-counter.hpp"
namespace nfd {
@@ -82,7 +83,7 @@
*/
bool
isLocal() const;
-
+
/** \brief Set the description
*
* This is typically invoked by mgmt on set description command
@@ -101,6 +102,9 @@
virtual bool
isMultiAccess() const;
+ const FaceCounters&
+ getCounters() const;
+
protected:
void
setLocal(bool isLocal);
@@ -109,6 +113,9 @@
bool
decodeAndDispatchInput(const Block& element);
+ FaceCounters&
+ getMutableCounters();
+
private:
void
setId(FaceId faceId);
@@ -117,11 +124,25 @@
FaceId m_id;
std::string m_description;
bool m_isLocal; // for scoping purposes
-
+ FaceCounters m_counters;
+
// allow setting FaceId
friend class Forwarder;
};
+
+inline const FaceCounters&
+Face::getCounters() const
+{
+ return m_counters;
+}
+
+inline FaceCounters&
+Face::getMutableCounters()
+{
+ return m_counters;
+}
+
} // namespace nfd
#endif // NFD_FACE_FACE_HPP