Remove some long-deprecated functions and enums

Change-Id: Iae88534ce7d58a35217dfdb7d97b011b7905be19
diff --git a/ndn-cxx/data.cpp b/ndn-cxx/data.cpp
index 306a09e..a4331a8 100644
--- a/ndn-cxx/data.cpp
+++ b/ndn-cxx/data.cpp
@@ -194,7 +194,7 @@
     NDN_THROW(Error("SignatureInfo element is missing"));
   }
 
-  if (m_signatureValue.empty()) {
+  if (!m_signatureValue.isValid()) {
     NDN_THROW(Error("SignatureValue element is missing"));
   }
 }
diff --git a/ndn-cxx/encoding/block.hpp b/ndn-cxx/encoding/block.hpp
index 51f9f4d..b91e90a 100644
--- a/ndn-cxx/encoding/block.hpp
+++ b/ndn-cxx/encoding/block.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2013-2019 Regents of the University of California.
+ * Copyright (c) 2013-2020 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -182,7 +182,7 @@
   /** @brief Check if the Block is valid
    *
    *  A Block is valid unless it has an invalid TLV-TYPE or is default-constructed.
-   *  In particular, a Block with zero-length TLV-VALUE *is* valid.
+   *  In particular, a Block with zero-length TLV-VALUE *is valid*.
    */
   bool
   isValid() const noexcept
@@ -190,19 +190,6 @@
     return m_type != tlv::Invalid;
   }
 
-  /** @brief Check if the Block is empty
-   *
-   *  A Block is considered empty *iff* it is not valid, i.e., isValid() returns false.
-   *
-   *  @warning Note that an empty Block is *not* the same as a valid but zero-length Block.
-   *  @deprecated Use Block::isValid()
-   */
-  NDN_CXX_NODISCARD bool
-  empty() const noexcept
-  {
-    return !isValid();
-  }
-
   /** @brief Reset the Block to a default-constructed state
    *
    *  Equivalent to `*this = Block()`.
diff --git a/ndn-cxx/encoding/tlv.hpp b/ndn-cxx/encoding/tlv.hpp
index b435d14..63fb172 100644
--- a/ndn-cxx/encoding/tlv.hpp
+++ b/ndn-cxx/encoding/tlv.hpp
@@ -112,9 +112,6 @@
   Any                       = 19,
 };
 
-[[deprecated("use GenericNameComponent")]]
-constexpr int NameComponent = GenericNameComponent;
-
 /** @brief TLV-TYPE numbers for typed name components.
  *  @sa https://redmine.named-data.net/projects/ndn-tlv/wiki/NameComponentType
  */
diff --git a/ndn-cxx/key-locator.hpp b/ndn-cxx/key-locator.hpp
index df12134..a6759b2 100644
--- a/ndn-cxx/key-locator.hpp
+++ b/ndn-cxx/key-locator.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2013-2019 Regents of the University of California.
+ * Copyright (c) 2013-2020 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -35,19 +35,6 @@
     using tlv::Error::Error;
   };
 
-  enum
-#ifndef DOXYGEN
-  [[deprecated]] // apparently doxygen can't handle this attribute on enums
-#endif
-  Type {
-    /// KeyLocator is empty
-    KeyLocator_None = tlv::Invalid,
-    /// KeyLocator contains a Name
-    KeyLocator_Name = tlv::Name,
-    /// KeyLocator contains a KeyDigest
-    KeyLocator_KeyDigest = tlv::KeyDigest,
-  };
-
 public: // constructors
   /** \brief Construct an empty KeyLocator.
    *  \post `empty() == true`
diff --git a/ndn-cxx/name-component.hpp b/ndn-cxx/name-component.hpp
index da8cdda..1022727 100644
--- a/ndn-cxx/name-component.hpp
+++ b/ndn-cxx/name-component.hpp
@@ -317,13 +317,6 @@
   bool
   isByteOffset() const;
 
-  /// @deprecated use isByteOffset
-  bool
-  isSegmentOffset() const
-  {
-    return isByteOffset();
-  }
-
   /**
    * @brief Check if the component is a timestamp per NDN naming conventions
    * @sa https://named-data.net/publications/techreports/ndn-tr-22-2-ndn-memo-naming-conventions/
@@ -392,13 +385,6 @@
   uint64_t
   toByteOffset() const;
 
-  /// @deprecated use toByteOffset
-  uint64_t
-  toSegmentOffset() const
-  {
-    return toByteOffset();
-  }
-
   /**
    * @brief Interpret as timestamp component using NDN naming conventions
    *
@@ -474,13 +460,6 @@
   static Component
   fromByteOffset(uint64_t offset);
 
-  /// @deprecated use fromByteOffset
-  static Component
-  fromSegmentOffset(uint64_t offset)
-  {
-    return fromByteOffset(offset);
-  }
-
   /**
    * @brief Create sequence number component using NDN naming conventions
    *
diff --git a/ndn-cxx/name.hpp b/ndn-cxx/name.hpp
index d1c9c8d..5b9268a 100644
--- a/ndn-cxx/name.hpp
+++ b/ndn-cxx/name.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2013-2019 Regents of the University of California.
+ * Copyright (c) 2013-2020 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -428,13 +428,6 @@
     return append(Component::fromByteOffset(offset));
   }
 
-  /// @deprecated use appendByteOffset
-  Name&
-  appendSegmentOffset(uint64_t offset)
-  {
-    return appendByteOffset(offset);
-  }
-
   /** @brief Append a timestamp component
    *  @param timestamp the timestamp to append; if nullopt, the current system time is used
    *  @return a reference to this name, to allow chaining
diff --git a/tests/unit/encoding/block.t.cpp b/tests/unit/encoding/block.t.cpp
index f6b245e..fea4714 100644
--- a/tests/unit/encoding/block.t.cpp
+++ b/tests/unit/encoding/block.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2013-2019 Regents of the University of California.
+ * Copyright (c) 2013-2020 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -49,7 +49,6 @@
   Block b;
 
   BOOST_CHECK_EQUAL(b.isValid(), false);
-  BOOST_CHECK_EQUAL(b.empty(), true);
   BOOST_CHECK_EQUAL(b.type(), tlv::Invalid);
   BOOST_CHECK_EQUAL(b.hasValue(), false);
   BOOST_CHECK_EQUAL(b.value_size(), 0);
diff --git a/tests/unit/name-component.t.cpp b/tests/unit/name-component.t.cpp
index 7abec36..10663bf 100644
--- a/tests/unit/name-component.t.cpp
+++ b/tests/unit/name-component.t.cpp
@@ -402,23 +402,6 @@
   }
 };
 
-class SegmentOffsetMarker
-{
-public:
-  using ConventionRev = ConventionMarker;
-
-  ConventionTest<uint64_t>
-  operator()() const
-  {
-    return {&Component::fromSegmentOffset,
-            bind(&Component::toSegmentOffset, _1),
-            bind(&Name::appendSegmentOffset, _1, _2),
-            Name("/%FB%00%01%86%A0"),
-            100000,
-            bind(&Component::isSegmentOffset, _1)};
-  }
-};
-
 class ByteOffsetTyped
 {
 public:
@@ -542,7 +525,6 @@
   NumberWithMarker,
   SegmentMarker,
   SegmentTyped,
-  SegmentOffsetMarker,
   ByteOffsetTyped,
   VersionMarker,
   VersionTyped,
diff --git a/tests/unit/name.t.cpp b/tests/unit/name.t.cpp
index 21ecc00..165668b 100644
--- a/tests/unit/name.t.cpp
+++ b/tests/unit/name.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2013-2019 Regents of the University of California.
+ * Copyright (c) 2013-2020 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -320,15 +320,12 @@
   BOOST_REQUIRE_NO_THROW(number = name.appendSegment(30923).at(-1).toSegment());
   BOOST_CHECK_EQUAL(number, 30923);
 
-  BOOST_REQUIRE_NO_THROW(number = name.appendSegmentOffset(589).at(-1).toSegmentOffset());
-  BOOST_CHECK_EQUAL(number, 589);
-
   BOOST_REQUIRE_NO_THROW(number = name.appendVersion().at(-1).toVersion());
 
   BOOST_REQUIRE_NO_THROW(number = name.appendVersion(25912).at(-1).toVersion());
   BOOST_CHECK_EQUAL(number, 25912);
 
-  const time::system_clock::TimePoint tp = time::system_clock::now();
+  const auto tp = time::system_clock::now();
   time::system_clock::TimePoint tp2;
   BOOST_REQUIRE_NO_THROW(tp2 = name.appendTimestamp(tp).at(-1).toTimestamp());
   BOOST_CHECK_LE(time::abs(tp2 - tp), 1_us);