blob: 5780875608a90649991dcc8ff4d67e75c68186a3 [file] [log] [blame]
Jeff Thompsonaa4e6db2013-07-15 17:25:23 -07001/**
Jeff Thompson7687dc02013-09-13 11:54:07 -07002 * Copyright (C) 2013 Regents of the University of California.
3 * @author: Jeff Thompson <jefft0@remap.ucla.edu>
Jeff Thompsonaa4e6db2013-07-15 17:25:23 -07004 * See COPYING for copyright and distribution information.
5 */
6
Jeff Thompsonb9e3c8e2013-08-02 11:42:51 -07007#include "face.hpp"
Jeff Thompsonaa4e6db2013-07-15 17:25:23 -07008
Jeff Thompsonb982b6d2013-07-15 18:15:45 -07009using namespace std;
10
Jeff Thompsonaa4e6db2013-07-15 17:25:23 -070011namespace ndn {
Jeff Thompson9657bda2013-07-16 16:23:41 -070012
Jeff Thompson1656e6a2013-08-29 18:01:48 -070013void Face::expressInterest(const Name& name, const Interest *interestTemplate, const OnData& onData, const OnTimeout& onTimeout)
Jeff Thompsonfb29cda2013-08-24 10:26:54 -070014{
15 if (interestTemplate)
16 node_.expressInterest(Interest
17 (name, interestTemplate->getMinSuffixComponents(), interestTemplate->getMaxSuffixComponents(),
18 interestTemplate->getPublisherPublicKeyDigest(), interestTemplate->getExclude(),
19 interestTemplate->getChildSelector(), interestTemplate->getAnswerOriginKind(),
20 interestTemplate->getScope(), interestTemplate->getInterestLifetimeMilliseconds()), onData, onTimeout);
21 else
22 node_.expressInterest(Interest(name, 4000.0), onData, onTimeout);
23}
24
Jeff Thompson517ffa82013-08-05 16:04:34 -070025void Face::shutdown()
26{
Jeff Thompsonbf50a1a2013-08-20 18:01:01 -070027 node_.shutdown();
Jeff Thompsonaa4e6db2013-07-15 17:25:23 -070028}
29
30}