blob: d70023b70d4b2b46f11bbf5c3951a992c0ed6bb1 [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 Thompson62992e42013-10-07 18:50:51 -070013uint64_t
Jeff Thompson0050abe2013-09-17 12:50:25 -070014Face::expressInterest(const Name& name, const Interest *interestTemplate, const OnData& onData, const OnTimeout& onTimeout)
Jeff Thompsonfb29cda2013-08-24 10:26:54 -070015{
16 if (interestTemplate)
Jeff Thompson11095142013-10-01 16:20:28 -070017 return node_.expressInterest(Interest
Jeff Thompsonfb29cda2013-08-24 10:26:54 -070018 (name, interestTemplate->getMinSuffixComponents(), interestTemplate->getMaxSuffixComponents(),
19 interestTemplate->getPublisherPublicKeyDigest(), interestTemplate->getExclude(),
20 interestTemplate->getChildSelector(), interestTemplate->getAnswerOriginKind(),
21 interestTemplate->getScope(), interestTemplate->getInterestLifetimeMilliseconds()), onData, onTimeout);
22 else
Jeff Thompson11095142013-10-01 16:20:28 -070023 return node_.expressInterest(Interest(name, 4000.0), onData, onTimeout);
Jeff Thompsonfb29cda2013-08-24 10:26:54 -070024}
25
Jeff Thompson0050abe2013-09-17 12:50:25 -070026void
27Face::shutdown()
Jeff Thompson517ffa82013-08-05 16:04:34 -070028{
Jeff Thompsonbf50a1a2013-08-20 18:01:01 -070029 node_.shutdown();
Jeff Thompsonaa4e6db2013-07-15 17:25:23 -070030}
31
32}