| /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */ |
| * Copyright (c) 2013, Regents of the University of California |
| * BSD license, See the LICENSE file for more information |
| * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu> |
| * Alexander Afanasyev <alexander.afanasyev@ucla.edu> |
| #include "ndn.cxx/common.h" |
| #include "ndn.cxx/fields/name.h" |
| #include "ndn.cxx/interest.h" |
| class ParsedContentObject; |
| typedef boost::shared_ptr<ParsedContentObject> PcoPtr; |
| typedef boost::function<void (Name, PcoPtr pco)> DataCallback; |
| typedef boost::function<void (Name, const Closure &, InterestPtr)> TimeoutCallback; |
| Closure(const DataCallback &dataCallback, const TimeoutCallback &timeoutCallback = TimeoutCallback()); |
| runDataCallback(Name name, ndn::PcoPtr pco); |
| runTimeoutCallback(Name interest, const Closure &closure, InterestPtr originalInterest); |
| dup () const { return new Closure (*this); } |
| TimeoutCallback m_timeoutCallback; |
| DataCallback m_dataCallback; |