blob: f8c2f122eee143e6ea1794ddf84674be37dd8466 [file] [log] [blame]
Junxiao Shid3c792f2014-01-30 00:46:13 -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#include "strategy.hpp"
Junxiao Shi8c8d2182014-01-30 22:33:00 -07008#include "forwarder.hpp"
Junxiao Shid3c792f2014-01-30 00:46:13 -07009
10namespace nfd {
Junxiao Shi8c8d2182014-01-30 22:33:00 -070011namespace fw {
Junxiao Shid3c792f2014-01-30 00:46:13 -070012
Junxiao Shi8c8d2182014-01-30 22:33:00 -070013Strategy::Strategy(Forwarder& forwarder)
14 : m_forwarder(forwarder)
Junxiao Shid3c792f2014-01-30 00:46:13 -070015{
16}
17
18Strategy::~Strategy()
19{
20}
21
22
23void
24Strategy::sendInterest(shared_ptr<pit::Entry> pitEntry,
25 shared_ptr<Face> outFace)
26{
Junxiao Shi8c8d2182014-01-30 22:33:00 -070027 m_forwarder.onOutgoingInterest(pitEntry, *outFace);
Junxiao Shid3c792f2014-01-30 00:46:13 -070028}
29
30void
31Strategy::rebuffPendingInterest(shared_ptr<pit::Entry> pitEntry)
32{
Junxiao Shi8c8d2182014-01-30 22:33:00 -070033 m_forwarder.onInterestRebuff(pitEntry);
Junxiao Shid3c792f2014-01-30 00:46:13 -070034}
35
Junxiao Shi8c8d2182014-01-30 22:33:00 -070036} // namespace fw
Junxiao Shid3c792f2014-01-30 00:46:13 -070037} // namespace nfd