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/face/dummy-face.hpp b/tests/face/dummy-face.hpp
index 7de128d..92100b6 100644
--- a/tests/face/dummy-face.hpp
+++ b/tests/face/dummy-face.hpp
@@ -8,6 +8,7 @@
#define NFD_TEST_FACE_DUMMY_FACE_HPP
#include "face/face.hpp"
+#include "face/local-face.hpp"
namespace nfd {
@@ -15,15 +16,10 @@
* \brief provides a Face that cannot communicate
* for unit testing only
*/
-class DummyFace : public Face
+template<class FaceBase>
+class DummyFaceImpl : public FaceBase
{
public:
- explicit
- DummyFace(bool isLocal = false)
- : m_isLocal(isLocal)
- {
- }
-
virtual void
sendInterest(const Interest& interest)
{
@@ -39,16 +35,12 @@
{
}
- virtual bool
- isLocal() const
- {
- return m_isLocal;
- }
-
private:
- bool m_isLocal;
};
+typedef DummyFaceImpl<Face> DummyFace;
+typedef DummyFaceImpl<LocalFace> DummyLocalFace;
+
} // namespace nfd
#endif // TEST_FACE_DUMMY_FACE_HPP