transport: move Impl templates into 'detail'
refs #4782
Change-Id: I011ed5b75430d4235eccdbd5e1b9270ed413cc31
diff --git a/ndn-cxx/transport/stream-transport-impl.hpp b/ndn-cxx/transport/detail/stream-transport-impl.hpp
similarity index 97%
rename from ndn-cxx/transport/stream-transport-impl.hpp
rename to ndn-cxx/transport/detail/stream-transport-impl.hpp
index a36e6da..dda33e9 100644
--- a/ndn-cxx/transport/stream-transport-impl.hpp
+++ b/ndn-cxx/transport/detail/stream-transport-impl.hpp
@@ -19,8 +19,8 @@
* See AUTHORS.md for complete list of ndn-cxx authors and contributors.
*/
-#ifndef NDN_TRANSPORT_STREAM_TRANSPORT_IMPL_HPP
-#define NDN_TRANSPORT_STREAM_TRANSPORT_IMPL_HPP
+#ifndef NDN_TRANSPORT_DETAIL_STREAM_TRANSPORT_IMPL_HPP
+#define NDN_TRANSPORT_DETAIL_STREAM_TRANSPORT_IMPL_HPP
#include "ndn-cxx/transport/transport.hpp"
@@ -30,6 +30,7 @@
#include <list>
namespace ndn {
+namespace detail {
/** \brief Implementation detail of a Boost.Asio-based stream-oriented transport.
* \tparam BaseTransport a subclass of Transport
@@ -278,6 +279,7 @@
boost::asio::deadline_timer m_connectTimer;
};
+} // namespace detail
} // namespace ndn
-#endif // NDN_TRANSPORT_STREAM_TRANSPORT_IMPL_HPP
+#endif // NDN_TRANSPORT_DETAIL_STREAM_TRANSPORT_IMPL_HPP
diff --git a/ndn-cxx/transport/stream-transport-with-resolver-impl.hpp b/ndn-cxx/transport/detail/stream-transport-with-resolver-impl.hpp
similarity index 90%
rename from ndn-cxx/transport/stream-transport-with-resolver-impl.hpp
rename to ndn-cxx/transport/detail/stream-transport-with-resolver-impl.hpp
index ec17ddb..6ca3b1e 100644
--- a/ndn-cxx/transport/stream-transport-with-resolver-impl.hpp
+++ b/ndn-cxx/transport/detail/stream-transport-with-resolver-impl.hpp
@@ -19,12 +19,13 @@
* See AUTHORS.md for complete list of ndn-cxx authors and contributors.
*/
-#ifndef NDN_TRANSPORT_STREAM_TRANSPORT_WITH_RESOLVER_IMPL_HPP
-#define NDN_TRANSPORT_STREAM_TRANSPORT_WITH_RESOLVER_IMPL_HPP
+#ifndef NDN_TRANSPORT_DETAIL_STREAM_TRANSPORT_WITH_RESOLVER_IMPL_HPP
+#define NDN_TRANSPORT_DETAIL_STREAM_TRANSPORT_WITH_RESOLVER_IMPL_HPP
-#include "ndn-cxx/transport/stream-transport-impl.hpp"
+#include "ndn-cxx/transport/detail/stream-transport-impl.hpp"
namespace ndn {
+namespace detail {
/** \brief implementation detail of a Boost.Asio-based stream-oriented transport
* with resolver support
@@ -88,7 +89,7 @@
}
};
-
+} // namespace detail
} // namespace ndn
-#endif // NDN_TRANSPORT_STREAM_TRANSPORT_WITH_RESOLVER_IMPL_HPP
+#endif // NDN_TRANSPORT_DETAIL_STREAM_TRANSPORT_WITH_RESOLVER_IMPL_HPP
diff --git a/ndn-cxx/transport/tcp-transport.cpp b/ndn-cxx/transport/tcp-transport.cpp
index 34bcf28..30a5087 100644
--- a/ndn-cxx/transport/tcp-transport.cpp
+++ b/ndn-cxx/transport/tcp-transport.cpp
@@ -20,7 +20,7 @@
*/
#include "ndn-cxx/transport/tcp-transport.hpp"
-#include "ndn-cxx/transport/stream-transport-with-resolver-impl.hpp"
+#include "ndn-cxx/transport/detail/stream-transport-with-resolver-impl.hpp"
#include "ndn-cxx/net/face-uri.hpp"
#include "ndn-cxx/util/logger.hpp"
diff --git a/ndn-cxx/transport/tcp-transport.hpp b/ndn-cxx/transport/tcp-transport.hpp
index 01d369c..e3bb5a3 100644
--- a/ndn-cxx/transport/tcp-transport.hpp
+++ b/ndn-cxx/transport/tcp-transport.hpp
@@ -29,12 +29,16 @@
namespace ndn {
+namespace detail {
+
template<typename BaseTransport, typename Protocol>
class StreamTransportImpl;
template<typename BaseTransport, typename Protocol>
class StreamTransportWithResolverImpl;
+} // namespace detail
+
/** \brief a transport using TCP socket
*/
class TcpTransport : public Transport
@@ -77,8 +81,8 @@
std::string m_host;
std::string m_port;
- using Impl = StreamTransportWithResolverImpl<TcpTransport, boost::asio::ip::tcp>;
- friend class StreamTransportImpl<TcpTransport, boost::asio::ip::tcp>;
+ using Impl = detail::StreamTransportWithResolverImpl<TcpTransport, boost::asio::ip::tcp>;
+ friend class detail::StreamTransportImpl<TcpTransport, boost::asio::ip::tcp>;
friend Impl;
shared_ptr<Impl> m_impl;
};
diff --git a/ndn-cxx/transport/unix-transport.cpp b/ndn-cxx/transport/unix-transport.cpp
index a107997..d444e35 100644
--- a/ndn-cxx/transport/unix-transport.cpp
+++ b/ndn-cxx/transport/unix-transport.cpp
@@ -20,7 +20,7 @@
*/
#include "ndn-cxx/transport/unix-transport.hpp"
-#include "ndn-cxx/transport/stream-transport-impl.hpp"
+#include "ndn-cxx/transport/detail/stream-transport-impl.hpp"
#include "ndn-cxx/face.hpp"
#include "ndn-cxx/net/face-uri.hpp"
diff --git a/ndn-cxx/transport/unix-transport.hpp b/ndn-cxx/transport/unix-transport.hpp
index c78b015..424ed53 100644
--- a/ndn-cxx/transport/unix-transport.hpp
+++ b/ndn-cxx/transport/unix-transport.hpp
@@ -29,9 +29,13 @@
namespace ndn {
+namespace detail {
+
template<typename BaseTransport, typename Protocol>
class StreamTransportImpl;
+} // namespace detail
+
/** \brief a transport using Unix stream socket
*/
class UnixTransport : public Transport
@@ -74,7 +78,7 @@
private:
std::string m_unixSocket;
- using Impl = StreamTransportImpl<UnixTransport, boost::asio::local::stream_protocol>;
+ using Impl = detail::StreamTransportImpl<UnixTransport, boost::asio::local::stream_protocol>;
friend Impl;
shared_ptr<Impl> m_impl;
};