26 #ifndef NFD_DAEMON_FW_STRATEGY_HPP 27 #define NFD_DAEMON_FW_STRATEGY_HPP 38 class Strategy :
public enable_shared_from_this<Strategy>, noncopyable
81 shared_ptr<fib::Entry> fibEntry,
82 shared_ptr<pit::Entry> pitEntry) = 0;
96 const Face& inFace,
const Data& data);
117 shared_ptr<Face> outFace,
118 bool wantNewNonce =
false);
162 shared_ptr<Face> outFace,
165 m_forwarder.onOutgoingInterest(pitEntry, *outFace, wantNewNonce);
171 m_forwarder.onInterestReject(pitEntry);
177 return m_measurements;
180 inline shared_ptr<Face>
183 return m_forwarder.
getFace(
id);
195 #endif // NFD_DAEMON_FW_STRATEGY_HPP FaceTable & getFaceTable()
const Name & getName() const
a Name that represent the Strategy program
signal::Signal< FaceTable, shared_ptr< Face > > & afterAddFace
virtual void beforeSatisfyInterest(shared_ptr< pit::Entry > pitEntry, const Face &inFace, const Data &data)
trigger before PIT entry is satisfied
represents an Interest packet
provides a lightweight signal / event system
shared_ptr< Face > getFace(FaceId id)
virtual void beforeExpirePendingInterest(shared_ptr< pit::Entry > pitEntry)
trigger before PIT entry expires
MeasurementsAccessor & getMeasurements()
allows Strategy to access portion of Measurements table under its namespace
Copyright (c) 2011-2015 Regents of the University of California.
#define VIRTUAL_WITH_TESTS
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents...
const FaceTable & getFaceTable()
Strategy(Forwarder &forwarder, const Name &name)
construct a strategy instance
Name abstraction to represent an absolute name.
shared_ptr< Face > getFace(FaceId id) const
get existing Face
void rejectPendingInterest(shared_ptr< pit::Entry > pitEntry)
decide that a pending Interest cannot be forwarded
represents a forwarding strategy
signal::Signal< FaceTable, shared_ptr< Face > > & beforeRemoveFace
void sendInterest(shared_ptr< pit::Entry > pitEntry, shared_ptr< Face > outFace, bool wantNewNonce=false)
send Interest to outFace
virtual void afterReceiveInterest(const Face &inFace, const Interest &interest, shared_ptr< fib::Entry > fibEntry, shared_ptr< pit::Entry > pitEntry)=0
trigger after Interest is received