blob: 11611923c28ff4dd8b155d35b77853aa8faf53c4 [file] [log] [blame]
Jeff Thompson25b4e612013-10-10 16:03:24 -07001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
Jeff Thompsonaa4e6db2013-07-15 17:25:23 -07002/**
Jeff Thompson7687dc02013-09-13 11:54:07 -07003 * Copyright (C) 2013 Regents of the University of California.
4 * @author: Jeff Thompson <jefft0@remap.ucla.edu>
Jeff Thompsonaa4e6db2013-07-15 17:25:23 -07005 * See COPYING for copyright and distribution information.
6 */
7
Yingdi Yu61ec2722014-01-20 14:22:32 -08008#include <ndn-cpp-dev/face.hpp>
Jeff Thompsonaa4e6db2013-07-15 17:25:23 -07009
Jeff Thompsonb982b6d2013-07-15 18:15:45 -070010using namespace std;
11
Jeff Thompsonaa4e6db2013-07-15 17:25:23 -070012namespace ndn {
Jeff Thompson9657bda2013-07-16 16:23:41 -070013
Jeff Thompson62992e42013-10-07 18:50:51 -070014uint64_t
Jeff Thompson978c1522013-11-12 23:03:10 -080015Face::expressInterest
Alexander Afanasyeve2e0d752014-01-03 13:30:30 -080016 (const Name& name, const Interest *interestTemplate, const OnData& onData, const OnTimeout& onTimeout)
Jeff Thompsonfb29cda2013-08-24 10:26:54 -070017{
18 if (interestTemplate)
Jeff Thompson11095142013-10-01 16:20:28 -070019 return node_.expressInterest(Interest
Alexander Afanasyeve2e0d752014-01-03 13:30:30 -080020 (name,
21 interestTemplate->getMinSuffixComponents(), interestTemplate->getMaxSuffixComponents(),
22 interestTemplate->getExclude(),
23 interestTemplate->getChildSelector(),
24 interestTemplate->getMustBeFresh(),
25 interestTemplate->getScope(),
26 interestTemplate->getInterestLifetime()),
27 onData, onTimeout);
Jeff Thompsonfb29cda2013-08-24 10:26:54 -070028 else
Alexander Afanasyeve2e0d752014-01-03 13:30:30 -080029 return node_.expressInterest(Interest(name, 4000.0), onData, onTimeout);
Jeff Thompsonfb29cda2013-08-24 10:26:54 -070030}
31
Jeff Thompson0050abe2013-09-17 12:50:25 -070032void
33Face::shutdown()
Jeff Thompson517ffa82013-08-05 16:04:34 -070034{
Jeff Thompsonbf50a1a2013-08-20 18:01:01 -070035 node_.shutdown();
Jeff Thompsonaa4e6db2013-07-15 17:25:23 -070036}
37
38}