face: refactor handling of LinkType face trait
This commit also includes some cleanups, fixes EthernetFace to report
the correct LinkType, and makes (get|set)Description non-virtual.
Change-Id: I53909d7bfa02a92641b523a766359413c966aae6
Refs: #2563
diff --git a/daemon/face/face.cpp b/daemon/face/face.cpp
index 06bae23..0974cf2 100644
--- a/daemon/face/face.cpp
+++ b/daemon/face/face.cpp
@@ -29,12 +29,13 @@
namespace nfd {
-Face::Face(const FaceUri& remoteUri, const FaceUri& localUri, bool isLocal)
+Face::Face(const FaceUri& remoteUri, const FaceUri& localUri, bool isLocal, bool isMultiAccess)
: m_id(INVALID_FACEID)
- , m_isLocal(isLocal)
, m_remoteUri(remoteUri)
, m_localUri(localUri)
+ , m_isLocal(isLocal)
, m_isOnDemand(false)
+ , m_isMultiAccess(isMultiAccess)
, m_isFailed(false)
{
onReceiveInterest.connect([this] (const ndn::Interest&) { ++m_counters.getNInInterests(); });
@@ -47,37 +48,6 @@
{
}
-FaceId
-Face::getId() const
-{
- return m_id;
-}
-
-// this method is private and should be used only by the FaceTable
-void
-Face::setId(FaceId faceId)
-{
- m_id = faceId;
-}
-
-void
-Face::setDescription(const std::string& description)
-{
- m_description = description;
-}
-
-const std::string&
-Face::getDescription() const
-{
- return m_description;
-}
-
-bool
-Face::isMultiAccess() const
-{
- return false;
-}
-
bool
Face::isUp() const
{