blob: 7de128d3a6ff6892850e2c621eb9b18ec8b7a2a1 [file] [log] [blame]
Junxiao Shicbba04c2014-01-26 14:21:22 -07001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2/**
3 * Copyright (C) 2014 Named Data Networking Project
4 * See COPYING for copyright and distribution information.
5 */
6
7#ifndef NFD_TEST_FACE_DUMMY_FACE_HPP
8#define NFD_TEST_FACE_DUMMY_FACE_HPP
9
10#include "face/face.hpp"
11
Alexander Afanasyev18bbf812014-01-29 01:40:23 -080012namespace nfd {
Junxiao Shicbba04c2014-01-26 14:21:22 -070013
14/** \class DummyFace
15 * \brief provides a Face that cannot communicate
16 * for unit testing only
17 */
18class DummyFace : public Face
19{
20public:
Alexander Afanasyev93ce75e2014-02-18 19:45:34 -080021 explicit
22 DummyFace(bool isLocal = false)
23 : m_isLocal(isLocal)
Junxiao Shicbba04c2014-01-26 14:21:22 -070024 {
25 }
26
27 virtual void
Junxiao Shi8c8d2182014-01-30 22:33:00 -070028 sendInterest(const Interest& interest)
Junxiao Shicbba04c2014-01-26 14:21:22 -070029 {
30 }
31
32 virtual void
Junxiao Shi8c8d2182014-01-30 22:33:00 -070033 sendData(const Data& data)
Junxiao Shicbba04c2014-01-26 14:21:22 -070034 {
35 }
Alexander Afanasyeva0a10fb2014-02-13 19:56:15 -080036
37 virtual void
38 close()
39 {
40 }
Alexander Afanasyev93ce75e2014-02-18 19:45:34 -080041
42 virtual bool
43 isLocal() const
44 {
45 return m_isLocal;
46 }
47
48private:
49 bool m_isLocal;
Junxiao Shicbba04c2014-01-26 14:21:22 -070050};
51
Alexander Afanasyev18bbf812014-01-29 01:40:23 -080052} // namespace nfd
Junxiao Shicbba04c2014-01-26 14:21:22 -070053
54#endif // TEST_FACE_DUMMY_FACE_HPP