src: Changing namespace ndn to namespace nfd
Also, this commit imports used classes from ::ndn namespace (from
NDN-CPP library) directly to ::nfd namespace.
refs: #1163
Change-Id: I9cc9d72e00af495b4ed0c84e6d418a7c9ba986cb
diff --git a/daemon/face/channel-factory.hpp b/daemon/face/channel-factory.hpp
index a2d7ff9..184703a 100644
--- a/daemon/face/channel-factory.hpp
+++ b/daemon/face/channel-factory.hpp
@@ -9,7 +9,7 @@
#include "common.hpp"
-namespace ndn {
+namespace nfd {
/**
* \brief Base class for all channel factories
@@ -34,6 +34,6 @@
ChannelMap m_channels;
};
-} // namespace ndn
+} // namespace nfd
#endif // NFD_FACE_CHANNEL_FACTORY_HPP
diff --git a/daemon/face/face.cpp b/daemon/face/face.cpp
index 1aa5184..6518117 100644
--- a/daemon/face/face.cpp
+++ b/daemon/face/face.cpp
@@ -6,7 +6,7 @@
#include "face.hpp"
-namespace ndn {
+namespace nfd {
Face::Face(FaceId id)
: m_id(id)
@@ -49,4 +49,4 @@
}
-} //namespace ndn
+} //namespace nfd
diff --git a/daemon/face/face.hpp b/daemon/face/face.hpp
index f014545..d6da710 100644
--- a/daemon/face/face.hpp
+++ b/daemon/face/face.hpp
@@ -10,7 +10,7 @@
#include "common.hpp"
#include "util/event-emitter.hpp"
-namespace ndn {
+namespace nfd {
/** \class FaceId
* \brief identifies a face
@@ -85,6 +85,6 @@
std::string m_description;
};
-} // namespace ndn
+} // namespace nfd
#endif // NFD_FACE_FACE_H
diff --git a/daemon/face/stream-face.hpp b/daemon/face/stream-face.hpp
index 8fd39a1..e0ea05b 100644
--- a/daemon/face/stream-face.hpp
+++ b/daemon/face/stream-face.hpp
@@ -9,7 +9,7 @@
#include "face.hpp"
-namespace ndn {
+namespace nfd {
template <class T>
class StreamFace : public Face
@@ -90,20 +90,20 @@
offset += element.size();
/// @todo Ensure lazy field decoding process
- if (element.type() == Tlv::Interest)
+ if (element.type() == tlv::Interest)
{
shared_ptr<Interest> i = make_shared<Interest>();
i->wireDecode(element);
onReceiveInterest(*i);
}
- else if (element.type() == Tlv::Data)
+ else if (element.type() == tlv::Data)
{
shared_ptr<Data> d = make_shared<Data>();
d->wireDecode(element);
onReceiveData(*d);
}
// @todo Add local header support
- // else if (element.type() == Tlv::LocalHeader)
+ // else if (element.type() == tlv::LocalHeader)
// {
// shared_ptr<Interest> i = make_shared<Interest>();
// i->wireDecode(element);
@@ -115,7 +115,7 @@
// ignore unknown packet and proceed
}
}
- catch(const Tlv::Error&) {
+ catch(const tlv::Error&) {
if (m_inputBufferSize == MAX_NDN_PACKET_SIZE && offset == 0)
{
onFail("Received input is invalid or too large to process, closing down the face");
@@ -144,6 +144,6 @@
}
-} // namespace ndn
+} // namespace nfd
#endif // NFD_FACE_STREAM_FACE_HPP
diff --git a/daemon/face/tcp-channel-factory.cpp b/daemon/face/tcp-channel-factory.cpp
index 4c6df87..be3a9d4 100644
--- a/daemon/face/tcp-channel-factory.cpp
+++ b/daemon/face/tcp-channel-factory.cpp
@@ -6,7 +6,7 @@
#include "tcp-channel-factory.hpp"
-namespace ndn {
+namespace nfd {
TcpChannelFactory::TcpChannelFactory(boost::asio::io_service& ioService)
: m_ioService(ioService)
@@ -38,7 +38,7 @@
tcp::resolver::iterator end;
tcp::resolver::iterator i = resolver.resolve(query);
if (i == end)
- return shared_ptr<ndn::TcpChannel>();
+ return shared_ptr<TcpChannel>();
return create(*i);
}
@@ -50,7 +50,7 @@
if (i != m_channels.end())
return i->second;
else
- return shared_ptr<ndn::TcpChannel>();
+ return shared_ptr<TcpChannel>();
}
-} // namespace ndn
+} // namespace nfd
diff --git a/daemon/face/tcp-channel-factory.hpp b/daemon/face/tcp-channel-factory.hpp
index 1baeb58..5027d41 100644
--- a/daemon/face/tcp-channel-factory.hpp
+++ b/daemon/face/tcp-channel-factory.hpp
@@ -10,7 +10,7 @@
#include "channel-factory.hpp"
#include "tcp-channel.hpp"
-namespace ndn {
+namespace nfd {
class TcpChannelFactory : public ChannelFactory<tcp::Endpoint, TcpChannel>
{
@@ -73,6 +73,6 @@
boost::asio::io_service& m_ioService;
};
-} // namespace ndn
+} // namespace nfd
#endif // NFD_FACE_TCP_CHANNEL_FACTORY_HPP
diff --git a/daemon/face/tcp-channel.cpp b/daemon/face/tcp-channel.cpp
index 9da453e..25244f8 100644
--- a/daemon/face/tcp-channel.cpp
+++ b/daemon/face/tcp-channel.cpp
@@ -6,7 +6,7 @@
#include "tcp-channel.hpp"
-namespace ndn {
+namespace nfd {
using namespace boost::asio;
@@ -193,4 +193,4 @@
}
-} // namespace ndn
+} // namespace nfd
diff --git a/daemon/face/tcp-channel.hpp b/daemon/face/tcp-channel.hpp
index 8536203..bd0388a 100644
--- a/daemon/face/tcp-channel.hpp
+++ b/daemon/face/tcp-channel.hpp
@@ -15,7 +15,7 @@
typedef boost::asio::ip::tcp::endpoint Endpoint;
} // namespace tcp
-namespace ndn {
+namespace nfd {
/**
* \brief Class implementing TCP-based channel to create faces
@@ -125,6 +125,6 @@
shared_ptr<boost::asio::ip::tcp::acceptor> m_acceptor;
};
-} // namespace ndn
+} // namespace nfd
#endif // NFD_FACE_TCP_CHANNEL_HPP
diff --git a/daemon/face/tcp-face.cpp b/daemon/face/tcp-face.cpp
index eb3ac94..79f9b8c 100644
--- a/daemon/face/tcp-face.cpp
+++ b/daemon/face/tcp-face.cpp
@@ -6,7 +6,7 @@
#include "tcp-face.hpp"
-namespace ndn {
+namespace nfd {
TcpFace::TcpFace(FaceId id,
const shared_ptr<TcpFace::protocol::socket>& socket)
@@ -34,4 +34,4 @@
// anything else should be done here?
}
-} // namespace ndn
+} // namespace nfd
diff --git a/daemon/face/tcp-face.hpp b/daemon/face/tcp-face.hpp
index 3d2bb53..c76cbc8 100644
--- a/daemon/face/tcp-face.hpp
+++ b/daemon/face/tcp-face.hpp
@@ -9,7 +9,7 @@
#include "stream-face.hpp"
-namespace ndn
+namespace nfd
{
/**
@@ -32,6 +32,6 @@
sendData(const Data& data);
};
-} // namespace ndn
+} // namespace nfd
#endif // NFD_FACE_TCP_FACE_HPP