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