blob: 9b24dda5d06126e0d6b069a3d8f70b8735f15732 [file] [log] [blame]
Jeff Thompsonaa4e6db2013-07-15 17:25:23 -07001/**
2 * @author: Jeff Thompson
3 * See COPYING for copyright and distribution information.
4 */
5
Jeff Thompsonb9e3c8e2013-08-02 11:42:51 -07006#include "face.hpp"
Jeff Thompsonaa4e6db2013-07-15 17:25:23 -07007
Jeff Thompsonb982b6d2013-07-15 18:15:45 -07008using namespace std;
9
Jeff Thompsonaa4e6db2013-07-15 17:25:23 -070010namespace ndn {
Jeff Thompson9657bda2013-07-16 16:23:41 -070011
Jeff Thompson1656e6a2013-08-29 18:01:48 -070012void Face::expressInterest(const Name& name, const Interest *interestTemplate, const OnData& onData, const OnTimeout& onTimeout)
Jeff Thompsonfb29cda2013-08-24 10:26:54 -070013{
14 if (interestTemplate)
15 node_.expressInterest(Interest
16 (name, interestTemplate->getMinSuffixComponents(), interestTemplate->getMaxSuffixComponents(),
17 interestTemplate->getPublisherPublicKeyDigest(), interestTemplate->getExclude(),
18 interestTemplate->getChildSelector(), interestTemplate->getAnswerOriginKind(),
19 interestTemplate->getScope(), interestTemplate->getInterestLifetimeMilliseconds()), onData, onTimeout);
20 else
21 node_.expressInterest(Interest(name, 4000.0), onData, onTimeout);
22}
23
Jeff Thompson517ffa82013-08-05 16:04:34 -070024void Face::shutdown()
25{
Jeff Thompsonbf50a1a2013-08-20 18:01:01 -070026 node_.shutdown();
Jeff Thompsonaa4e6db2013-07-15 17:25:23 -070027}
28
29}