Alexander Afanasyev | 33b7277 | 2014-01-26 23:22:58 -0800 | [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 | #ifndef NFD_FW_FORWARDER_HPP |
| 8 | #define NFD_FW_FORWARDER_HPP |
| 9 | |
| 10 | #include "common.hpp" |
| 11 | #include "face/face.hpp" |
| 12 | |
Alexander Afanasyev | 18bbf81 | 2014-01-29 01:40:23 -0800 | [diff] [blame] | 13 | namespace nfd { |
Alexander Afanasyev | 33b7277 | 2014-01-26 23:22:58 -0800 | [diff] [blame] | 14 | |
| 15 | /** |
| 16 | * Forwarder is the main class of NFD. |
| 17 | * |
| 18 | * It creates and owns a set of Face listeners |
| 19 | */ |
| 20 | class Forwarder |
| 21 | { |
| 22 | public: |
| 23 | Forwarder(boost::asio::io_service& ioService); |
| 24 | |
| 25 | uint64_t |
| 26 | addFace(const shared_ptr<Face>& face); |
| 27 | |
| 28 | void |
| 29 | removeFace(const shared_ptr<Face>& face); |
| 30 | |
| 31 | void |
| 32 | onInterest(const Face& face, const Interest& interest); |
| 33 | |
| 34 | void |
| 35 | onData(const Face& face, const Data& data); |
| 36 | |
| 37 | private: |
| 38 | // container< shared_ptr<Face> > m_faces; |
| 39 | }; |
| 40 | |
| 41 | } |
| 42 | |
| 43 | #endif // NFD_FW_FORWARDER_HPP |