Steve DiBenedetto | 5b43398 | 2014-01-29 17:14:27 -0700 | [diff] [blame] | 1 | /* -*- 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 | #include "internal-face.hpp" |
Steve DiBenedetto | 042bfe9 | 2014-01-30 15:05:08 -0700 | [diff] [blame^] | 8 | #include "fib-manager.hpp" |
Steve DiBenedetto | 5b43398 | 2014-01-29 17:14:27 -0700 | [diff] [blame] | 9 | |
| 10 | namespace nfd { |
| 11 | |
Steve DiBenedetto | 042bfe9 | 2014-01-30 15:05:08 -0700 | [diff] [blame^] | 12 | InternalFace::InternalFace(FibManager& manager) |
| 13 | : m_fibManager(manager) |
Steve DiBenedetto | 5b43398 | 2014-01-29 17:14:27 -0700 | [diff] [blame] | 14 | { |
| 15 | |
| 16 | } |
| 17 | |
| 18 | void |
| 19 | InternalFace::sendInterest(const Interest& interest) |
| 20 | { |
Steve DiBenedetto | 5b43398 | 2014-01-29 17:14:27 -0700 | [diff] [blame] | 21 | const Name& interestName = interest.getName(); |
| 22 | |
Steve DiBenedetto | 042bfe9 | 2014-01-30 15:05:08 -0700 | [diff] [blame^] | 23 | if (m_fibManager.getRequestPrefix().isPrefixOf(interestName)) |
Steve DiBenedetto | 5b43398 | 2014-01-29 17:14:27 -0700 | [diff] [blame] | 24 | { |
Steve DiBenedetto | 042bfe9 | 2014-01-30 15:05:08 -0700 | [diff] [blame^] | 25 | m_fibManager.onFibRequest(interest); |
Steve DiBenedetto | 5b43398 | 2014-01-29 17:14:27 -0700 | [diff] [blame] | 26 | } |
| 27 | //Drop Interest |
| 28 | } |
| 29 | |
| 30 | void |
| 31 | InternalFace::sendData(const Data& data) |
| 32 | { |
| 33 | |
| 34 | } |
| 35 | |
| 36 | void |
| 37 | InternalFace::setInterestFilter(const Name& filter, |
| 38 | OnInterest onInterest) |
| 39 | { |
| 40 | |
| 41 | } |
| 42 | |
| 43 | void |
| 44 | InternalFace::put(const Data& data) |
| 45 | { |
| 46 | onReceiveData(data); |
| 47 | } |
| 48 | |
| 49 | InternalFace::~InternalFace() |
| 50 | { |
| 51 | |
| 52 | } |
| 53 | |
| 54 | } // namespace nfd |