src: Refactoring common.hpp and minimizing exposed includes
Face class has relatively large rewrite to hide internals using
Implementor pattern. As of this commit, <boost/asio.hpp> is not
automatically included whenever ndn-cxx/face.hpp is included. If it is
needed to directly work with io_service, asio.hpp should be specifically
included.
Change-Id: Ie742b851025b4e3da634eb981319df0f42937855
diff --git a/src/security/certificate.cpp b/src/security/certificate.cpp
index 690ec31..69597fc 100644
--- a/src/security/certificate.cpp
+++ b/src/security/certificate.cpp
@@ -20,6 +20,7 @@
#include "../util/time.hpp"
#include "cryptopp.hpp"
#include "../encoding/cryptopp/asn_ext.hpp"
+#include "../encoding/buffer-stream.hpp"
using namespace std;
diff --git a/src/security/certificate.hpp b/src/security/certificate.hpp
index 695faf1..4663ea9 100644
--- a/src/security/certificate.hpp
+++ b/src/security/certificate.hpp
@@ -165,9 +165,6 @@
return m_key;
}
- // virtual Name
- // getPublicKeyName() const = 0;
-
/**
* Check if the certificate is valid.
* @return True if the current time is earlier than notBefore.
diff --git a/src/security/conf/checker.hpp b/src/security/conf/checker.hpp
index 1ebcf0d..67ab3b1 100644
--- a/src/security/conf/checker.hpp
+++ b/src/security/conf/checker.hpp
@@ -15,11 +15,14 @@
#ifndef NDN_SECURITY_CONF_CHECKER_HPP
#define NDN_SECURITY_CONF_CHECKER_HPP
+#include "common.hpp"
+
#include "key-locator-checker.hpp"
#include "../../util/io.hpp"
-#include <boost/algorithm/string.hpp>
-#include "common.hpp"
+#include <boost/algorithm/string.hpp>
+#include <boost/filesystem.hpp>
+#include <boost/lexical_cast.hpp>
namespace ndn {
namespace security {
diff --git a/src/security/public-key.cpp b/src/security/public-key.cpp
index 17f204b..9977950 100644
--- a/src/security/public-key.cpp
+++ b/src/security/public-key.cpp
@@ -13,8 +13,9 @@
* @author Alexander Afanasyev <http://lasr.cs.ucla.edu/afanasyev/index.html>
*/
-#include "common.hpp"
#include "public-key.hpp"
+
+#include "../encoding/oid.hpp"
#include "cryptopp.hpp"
using namespace std;
diff --git a/src/security/public-key.hpp b/src/security/public-key.hpp
index e939978..b8222c2 100644
--- a/src/security/public-key.hpp
+++ b/src/security/public-key.hpp
@@ -18,10 +18,14 @@
#define NDN_SECURITY_PUBLIC_KEY_HPP
#include "../common.hpp"
-#include "../encoding/oid.hpp"
+
#include "../encoding/buffer.hpp"
#include "security-common.hpp"
+namespace CryptoPP {
+class BufferedTransformation;
+}
+
namespace ndn {
class PublicKey
diff --git a/src/security/sec-public-info-memory.hpp b/src/security/sec-public-info-memory.hpp
index 0c6b70f..20ccde6 100644
--- a/src/security/sec-public-info-memory.hpp
+++ b/src/security/sec-public-info-memory.hpp
@@ -18,6 +18,8 @@
#include "../common.hpp"
#include "sec-public-info.hpp"
+#include <map>
+
namespace ndn {
/**
diff --git a/src/security/sec-tpm-file.cpp b/src/security/sec-tpm-file.cpp
index c49fcd7..096fe9d 100644
--- a/src/security/sec-tpm-file.cpp
+++ b/src/security/sec-tpm-file.cpp
@@ -17,6 +17,7 @@
#include "common.hpp"
#include "sec-tpm-file.hpp"
+#include "../encoding/buffer-stream.hpp"
#include <boost/filesystem.hpp>
#include <boost/algorithm/string.hpp>
diff --git a/src/security/sec-tpm-memory.hpp b/src/security/sec-tpm-memory.hpp
index e0dd34c..45e3bd3 100644
--- a/src/security/sec-tpm-memory.hpp
+++ b/src/security/sec-tpm-memory.hpp
@@ -18,6 +18,8 @@
#include "../common.hpp"
#include "sec-tpm.hpp"
+#include <map>
+
struct rsa_st;
namespace ndn {
diff --git a/src/security/sec-tpm-osx.cpp b/src/security/sec-tpm-osx.cpp
index 69c3deb..cda3633 100644
--- a/src/security/sec-tpm-osx.cpp
+++ b/src/security/sec-tpm-osx.cpp
@@ -16,6 +16,8 @@
#include "sec-tpm-osx.hpp"
#include "public-key.hpp"
+#include "../encoding/oid.hpp"
+#include "../encoding/buffer-stream.hpp"
#include "cryptopp.hpp"
#include <pwd.h>
diff --git a/src/security/sec-tpm.cpp b/src/security/sec-tpm.cpp
index e4e1315..b038688 100644
--- a/src/security/sec-tpm.cpp
+++ b/src/security/sec-tpm.cpp
@@ -14,6 +14,8 @@
#include "sec-tpm.hpp"
+#include "../encoding/oid.hpp"
+#include "../encoding/buffer-stream.hpp"
#include "cryptopp.hpp"
using namespace std;