Remove hints
Change-Id: I537619fefad6ffb6b46c5dc618f0fdcc15884d6e
diff --git a/src/clients/query.cpp b/src/clients/query.cpp
index f890ad1..4e7621b 100644
--- a/src/clients/query.cpp
+++ b/src/clients/query.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014, Regents of the University of California.
+ * Copyright (c) 2014-2016, Regents of the University of California.
*
* This file is part of NDNS (Named Data Networking Domain Name Service).
* See AUTHORS.md for complete list of NDNS authors and contributors.
@@ -27,9 +27,8 @@
{
}
-Query::Query(const Name& hint, const Name& zone, const name::Component& queryType)
- : m_hint(hint)
- , m_zone(zone)
+Query::Query(const Name& zone, const name::Component& queryType)
+ : m_zone(zone)
, m_queryType(queryType)
, m_interestLifetime(ndn::DEFAULT_INTEREST_LIFETIME)
{
@@ -37,21 +36,18 @@
bool
-Query::fromInterest(const Name& hint, const Name& zone, const Interest& interest)
+Query::fromInterest(const Name& zone, const Interest& interest)
{
label::MatchResult re;
- if (!matchName(interest, hint, zone, re))
+ if (!matchName(interest, zone, re))
return false;
m_rrLabel = re.rrLabel;
m_rrType = re.rrType;
- m_hint = hint;
m_zone = zone;
size_t len = zone.size();
- if (!hint.empty())
- len += hint.size() + 1;
m_queryType = interest.getName().get(len);
return true;
@@ -60,12 +56,8 @@
Interest
Query::toInterest() const
{
- // <hint> /xF0. <zone> [<KEY>|<NDNS>|<NDNS-R>] <rrLabel> <rrType>
+ // <zone> [<KEY>|<NDNS>|<NDNS-R>] <rrLabel> <rrType>
Name name;
- if (!m_hint.empty()) {
- name.append(m_hint)
- .append(ndn::ndns::label::FORWARDING_HINT_LABEL);
- }
name.append(this->m_zone)
.append(this->m_queryType)
@@ -79,7 +71,6 @@
operator<<(std::ostream& os, const Query& query)
{
os << "Query: zone=" << query.getZone()
- << " hint=" << query.getHint()
<< " queryType=" << query.getQueryType()
<< " rrLabel=" << query.getRrLabel()
<< " rrType=" << query.getRrType()