Slim down `common.hpp`
Change-Id: Ic9843a1b9ffc5b5b1fa6062c8250ba28c6aaa898
diff --git a/tools/peek/ndnpoke/main.cpp b/tools/peek/ndnpoke/main.cpp
index a3e5ec2..4939d51 100644
--- a/tools/peek/ndnpoke/main.cpp
+++ b/tools/peek/ndnpoke/main.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -33,6 +33,8 @@
#include <boost/program_options/parsers.hpp>
#include <boost/program_options/variables_map.hpp>
+#include <iostream>
+
namespace ndn::peek {
namespace po = boost::program_options;
diff --git a/tools/peek/ndnpoke/ndnpoke.cpp b/tools/peek/ndnpoke/ndnpoke.cpp
index 62a6c4a..ff8f937 100644
--- a/tools/peek/ndnpoke/ndnpoke.cpp
+++ b/tools/peek/ndnpoke/ndnpoke.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -30,6 +30,8 @@
#include <ndn-cxx/encoding/buffer-stream.hpp>
+#include <iostream>
+
namespace ndn::peek {
NdnPoke::NdnPoke(Face& face, KeyChain& keyChain, std::istream& input, const PokeOptions& options)
@@ -56,10 +58,10 @@
[this] (auto&&, const auto& reason) { this->onRegFailure(reason); });
}
-shared_ptr<Data>
+std::shared_ptr<Data>
NdnPoke::createData() const
{
- auto data = make_shared<Data>(m_options.name);
+ auto data = std::make_shared<Data>(m_options.name);
data->setFreshnessPeriod(m_options.freshnessPeriod);
if (m_options.wantFinalBlockId) {
data->setFinalBlock(m_options.name.at(-1));
diff --git a/tools/peek/ndnpoke/ndnpoke.hpp b/tools/peek/ndnpoke/ndnpoke.hpp
index a3cd393..79b7591 100644
--- a/tools/peek/ndnpoke/ndnpoke.hpp
+++ b/tools/peek/ndnpoke/ndnpoke.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -31,8 +31,12 @@
#include "core/common.hpp"
+#include <ndn-cxx/face.hpp>
+#include <ndn-cxx/security/key-chain.hpp>
#include <ndn-cxx/util/scheduler.hpp>
+#include <optional>
+
namespace ndn::peek {
/**
@@ -79,7 +83,7 @@
start();
private:
- shared_ptr<Data>
+ std::shared_ptr<Data>
createData() const;
void