blob: 8d5805c564d4c5c6bbb33a10f16d35b8736faf1f [file] [log] [blame]
Steve DiBenedetto5b433982014-01-29 17:14:27 -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_MGMT_INTERNAL_FACE_HPP
8#define NFD_MGMT_INTERNAL_FACE_HPP
9
10#include "face/face.hpp"
11#include "app-face.hpp"
12
13namespace nfd {
14
15class InternalFace : public Face, public AppFace
16{
17public:
Alexander Afanasyeva0a10fb2014-02-13 19:56:15 -080018 /**
19 * \brief InternalFace-related error
20 */
21 struct Error : public Face::Error
22 {
23 Error(const std::string& what) : Face::Error(what) {}
24 };
Steve DiBenedetto5b433982014-01-29 17:14:27 -070025
Steve DiBenedetto3970c892014-01-31 23:31:13 -070026 InternalFace();
Steve DiBenedetto5b433982014-01-29 17:14:27 -070027
28 // Overridden Face methods for forwarder
29
30 virtual void
31 sendInterest(const Interest& interest);
32
33 virtual void
34 sendData(const Data& data);
35
Alexander Afanasyeva0a10fb2014-02-13 19:56:15 -080036 virtual void
37 close();
38
Steve DiBenedetto5b433982014-01-29 17:14:27 -070039 // Methods implementing AppFace interface. Do not invoke from forwarder.
40
41 virtual void
42 setInterestFilter(const Name& filter,
43 OnInterest onInterest);
44
45 virtual void
46 put(const Data& data);
47
48 virtual
49 ~InternalFace();
50
51private:
52
53 // void
54 // onConfig(ConfigFile::Node section, bool isDryRun);
55
56 std::map<Name, OnInterest> m_interestFilters;
Steve DiBenedetto5b433982014-01-29 17:14:27 -070057};
58
59} // namespace nfd
60
61#endif //NFD_MGMT_INTERNAL_FACE_HPP