face: Implementation of encode/decode of LocalControlHeader
LocalControlHeader can only be used on faces that are derived from
LocalFace. UnixStreamFace is directly inherited from LocalFace,
TCP face has two specializations: generic TcpFace (strictly not local),
and LocalTcpFace.
refs #1213
Change-Id: I8a158c3bc4bb929eedd15757cfddecc0d1049f9f
diff --git a/tests/fw/forwarder.cpp b/tests/fw/forwarder.cpp
index ed8f6a7..e066f52 100644
--- a/tests/fw/forwarder.cpp
+++ b/tests/fw/forwarder.cpp
@@ -38,12 +38,6 @@
{
}
- virtual bool
- isLocal() const
- {
- return false;
- }
-
void
receiveInterest(const Interest& interest)
{
@@ -129,25 +123,6 @@
BOOST_CHECK_EQUAL(face1->m_sentDatas[0].getIncomingFaceId(), face2->getId());
}
-
-class ForwarderTestLocalFace : public DummyFace {
-public:
- explicit
- ForwarderTestLocalFace(bool isLocal)
- : m_isLocal(isLocal)
- {
- }
-
- virtual bool
- isLocal() const
- {
- return m_isLocal;
- }
-
-private:
- bool m_isLocal;
-};
-
class ScopeLocalhostTestForwarder : public Forwarder
{
public:
@@ -182,8 +157,8 @@
{
boost::asio::io_service io;
ScopeLocalhostTestForwarder forwarder(io);
- shared_ptr<ForwarderTestLocalFace> face1 = make_shared<ForwarderTestLocalFace>(true);
- shared_ptr<ForwarderTestLocalFace> face2 = make_shared<ForwarderTestLocalFace>(false);
+ shared_ptr<DummyLocalFace> face1 = make_shared<DummyLocalFace>();
+ shared_ptr<DummyFace> face2 = make_shared<DummyFace>();
forwarder.addFace(face1);
forwarder.addFace(face2);