blob: f5ce755bb242cac241b841ce96fa69deb8602e41 [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
Jeff Thompson25b4e612013-10-10 16:03:24 -07008#include <ndn-cpp/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
16 (const Name& name, const Interest *interestTemplate, const OnData& onData, const OnTimeout& onTimeout,
17 WireFormat& wireFormat)
Jeff Thompsonfb29cda2013-08-24 10:26:54 -070018{
19 if (interestTemplate)
Jeff Thompson11095142013-10-01 16:20:28 -070020 return node_.expressInterest(Interest
Jeff Thompsonfb29cda2013-08-24 10:26:54 -070021 (name, interestTemplate->getMinSuffixComponents(), interestTemplate->getMaxSuffixComponents(),
22 interestTemplate->getPublisherPublicKeyDigest(), interestTemplate->getExclude(),
23 interestTemplate->getChildSelector(), interestTemplate->getAnswerOriginKind(),
Jeff Thompson978c1522013-11-12 23:03:10 -080024 interestTemplate->getScope(), interestTemplate->getInterestLifetimeMilliseconds()), onData, onTimeout, wireFormat);
Jeff Thompsonfb29cda2013-08-24 10:26:54 -070025 else
Jeff Thompson978c1522013-11-12 23:03:10 -080026 return node_.expressInterest(Interest(name, 4000.0), onData, onTimeout, wireFormat);
Jeff Thompsonfb29cda2013-08-24 10:26:54 -070027}
28
Jeff Thompson0050abe2013-09-17 12:50:25 -070029void
30Face::shutdown()
Jeff Thompson517ffa82013-08-05 16:04:34 -070031{
Jeff Thompsonbf50a1a2013-08-20 18:01:01 -070032 node_.shutdown();
Jeff Thompsonaa4e6db2013-07-15 17:25:23 -070033}
34
35}