encoding: delete deprecated Block::fromBuffer and block helpers

These deprecated APIs are deleted:
Block::fromBuffer overloads with output parameter
ndn::encoding::prependBlock
ndn::encoding::prependByteArrayBlock
ndn::encoding::nonNegativeIntegerBlock
ndn::encoding::prependBooleanBlock
ndn::encoding::booleanBlock
ndn::encoding::dataBlock
ndn::encoding::nestedBlock

refs #2950, #2636

Change-Id: Ic7a129f340b75b4d97620bbf8f63d3ff2e9ddb03
diff --git a/src/encoding/block-helpers.hpp b/src/encoding/block-helpers.hpp
index fcc8458..d207938 100644
--- a/src/encoding/block-helpers.hpp
+++ b/src/encoding/block-helpers.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2013-2015 Regents of the University of California.
+ * Copyright (c) 2013-2016 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -220,98 +220,6 @@
   return encoder.block();
 }
 
-#define NDN_CXX_ENABLE_DEPRECATED_BLOCK_HELPERS
-#ifdef NDN_CXX_ENABLE_DEPRECATED_BLOCK_HELPERS
-
-/**
- * @deprecated Use Encoder::prependBlock and Estimator::prependBlock instead
- */
-template<Tag TAG>
-inline size_t
-prependBlock(EncodingImpl<TAG>& encoder, const Block& block)
-{
-  return encoder.prependBlock(block);
-}
-
-/**
- * @deprecated Use Encoder::prependByteArrayBlock and Estimator::prependByteArrayBlock instead
- */
-template<Tag TAG>
-inline size_t
-prependByteArrayBlock(EncodingImpl<TAG>& encoder,
-                      uint32_t type, const uint8_t* array, size_t arraySize)
-{
-  return encoder.prependByteArrayBlock(type, array, arraySize);
-}
-
-/**
- * @deprecated Use makeNonNegativeIntegerBlock instead
- */
-inline Block
-nonNegativeIntegerBlock(uint32_t type, uint64_t value)
-{
-  return makeNonNegativeIntegerBlock(type, value);
-}
-
-/**
- * @deprecated Use prependEmptyBlock instead
- */
-template<Tag TAG>
-size_t
-prependBooleanBlock(EncodingImpl<TAG>& encoder, uint32_t type)
-{
-  return prependEmptyBlock(encoder, type);
-}
-
-/**
- * @deprecated Use makeEmptyBlock instead
- */
-inline Block
-booleanBlock(uint32_t type)
-{
-  return makeEmptyBlock(type);
-}
-
-/**
- * @deprecated Use makeBinaryBlock instead
- */
-inline Block
-dataBlock(uint32_t type, const uint8_t* data, size_t dataSize)
-{
-  return makeBinaryBlock(type, data, dataSize);
-}
-
-/**
- * @deprecated Use makeBinaryBlock instead
- */
-inline Block
-dataBlock(uint32_t type, const char* data, size_t dataSize)
-{
-  return makeBinaryBlock(type, data, dataSize);
-}
-
-/**
- * @deprecated Use makeBinaryBlock instead
- */
-template<class Iterator>
-inline Block
-dataBlock(uint32_t type, Iterator first, Iterator last)
-{
-  return makeBinaryBlock(type, first, last);
-}
-
-/**
- * @deprecated Use makeNestedBlock instead
- */
-template<class U>
-inline Block
-nestedBlock(uint32_t type, const U& value)
-{
-  return makeNestedBlock(type, value);
-}
-
-#endif // NDN_CXX_ENABLE_DEPRECATED_BLOCK_HELPERS
-
 } // namespace encoding
 
 using encoding::makeNonNegativeIntegerBlock;
@@ -322,14 +230,6 @@
 using encoding::makeBinaryBlock;
 using encoding::makeNestedBlock;
 
-#ifdef NDN_CXX_ENABLE_DEPRECATED_BLOCK_HELPERS
-
-using encoding::nonNegativeIntegerBlock;
-using encoding::booleanBlock;
-using encoding::dataBlock;
-
-#endif // NDN_CXX_ENABLE_DEPRECATED_BLOCK_HELPERS
-
 } // namespace ndn
 
 #endif // NDN_ENCODING_BLOCK_HELPERS_HPP
diff --git a/src/encoding/block.hpp b/src/encoding/block.hpp
index 0c83149..7ade6e3 100644
--- a/src/encoding/block.hpp
+++ b/src/encoding/block.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2013-2015 Regents of the University of California.
+ * Copyright (c) 2013-2016 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -147,17 +147,6 @@
   static std::tuple<bool, Block>
   fromBuffer(ConstBufferPtr buffer, size_t offset);
 
-  /** @deprecated use fromBuffer(ConstBufferPtr, size_t)
-   */
-  DEPRECATED(
-  static bool
-  fromBuffer(const ConstBufferPtr& buffer, size_t offset, Block& block))
-  {
-    bool isOk = false;
-    std::tie(isOk, block) = Block::fromBuffer(buffer, offset);
-    return isOk;
-  }
-
   /** @brief Try to construct block from raw buffer
    *  @param buffer the raw buffer to copy bytes from
    *  @param maxSize the maximum size of constructed block;
@@ -171,17 +160,6 @@
   static std::tuple<bool, Block>
   fromBuffer(const uint8_t* buffer, size_t maxSize);
 
-  /** @deprecated use fromBuffer(const uint8_t*, size_t)
-   */
-  DEPRECATED(
-  static bool
-  fromBuffer(const uint8_t* buffer, size_t maxSize, Block& block))
-  {
-    bool isOk = false;
-    std::tie(isOk, block) = Block::fromBuffer(buffer, maxSize);
-    return isOk;
-  }
-
 public: // wire format
   /** @brief Check if the Block is empty
    */
diff --git a/src/mgmt/control-response.cpp b/src/mgmt/control-response.cpp
index b85b2d4..a0c74c2 100644
--- a/src/mgmt/control-response.cpp
+++ b/src/mgmt/control-response.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2013-2015 Regents of the University of California.
+ * Copyright (c) 2013-2016 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -55,9 +55,9 @@
     return m_wire;
 
   m_wire = Block(tlv::nfd::ControlResponse);
-  m_wire.push_back(nonNegativeIntegerBlock(tlv::nfd::StatusCode, m_code));
+  m_wire.push_back(makeNonNegativeIntegerBlock(tlv::nfd::StatusCode, m_code));
 
-  m_wire.push_back(dataBlock(tlv::nfd::StatusText, m_text.c_str(), m_text.size()));
+  m_wire.push_back(makeBinaryBlock(tlv::nfd::StatusText, m_text.c_str(), m_text.size()));
 
   if (m_body.hasWire()) {
     m_wire.push_back(m_body);