Commit ecb22c0c authored by chenzhengzhang's avatar chenzhengzhang

[trac749] update namespace names

parent f5bcf535
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#include <exceptions/exceptions.h> #include <exceptions/exceptions.h>
#include <util/io/buffer.h> #include <util/buffer.h>
#include <dns/edns.h> #include <dns/edns.h>
#include <dns/exceptions.h> #include <dns/exceptions.h>
...@@ -64,7 +64,7 @@ using namespace isc; ...@@ -64,7 +64,7 @@ using namespace isc;
using namespace isc::cc; using namespace isc::cc;
using namespace isc::datasrc; using namespace isc::datasrc;
using namespace isc::dns; using namespace isc::dns;
using namespace isc::util::io; using namespace isc::util;
using namespace isc::auth; using namespace isc::auth;
using namespace isc::dns::rdata; using namespace isc::dns::rdata;
using namespace isc::data; using namespace isc::data;
......
...@@ -109,7 +109,7 @@ public: ...@@ -109,7 +109,7 @@ public:
/// \throw isc::Unexpected Protocol type of \a message is unexpected /// \throw isc::Unexpected Protocol type of \a message is unexpected
void processMessage(const asiolink::IOMessage& io_message, void processMessage(const asiolink::IOMessage& io_message,
isc::dns::MessagePtr message, isc::dns::MessagePtr message,
isc::util::io::OutputBufferPtr buffer, isc::util::OutputBufferPtr buffer,
asiolink::DNSServer* server); asiolink::DNSServer* server);
/// \brief Set verbose flag /// \brief Set verbose flag
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#include <bench/benchmark.h> #include <bench/benchmark.h>
#include <bench/benchmark_util.h> #include <bench/benchmark_util.h>
#include <util/io/buffer.h> #include <util/buffer.h>
#include <dns/message.h> #include <dns/message.h>
#include <dns/name.h> #include <dns/name.h>
#include <dns/question.h> #include <dns/question.h>
...@@ -41,7 +41,7 @@ using namespace isc; ...@@ -41,7 +41,7 @@ using namespace isc;
using namespace isc::data; using namespace isc::data;
using namespace isc::auth; using namespace isc::auth;
using namespace isc::dns; using namespace isc::dns;
using namespace isc::util::io; using namespace isc::util;
using namespace isc::xfr; using namespace isc::xfr;
using namespace isc::bench; using namespace isc::bench;
using namespace asiolink; using namespace asiolink;
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#include <exceptions/exceptions.h> #include <exceptions/exceptions.h>
#include <util/io/buffer.h> #include <util/buffer.h>
#include <dns/message.h> #include <dns/message.h>
#include <dns/messagerenderer.h> #include <dns/messagerenderer.h>
...@@ -50,7 +50,7 @@ using namespace isc::data; ...@@ -50,7 +50,7 @@ using namespace isc::data;
using namespace isc::cc; using namespace isc::cc;
using namespace isc::config; using namespace isc::config;
using namespace isc::dns; using namespace isc::dns;
using namespace isc::util::io; using namespace isc::util;
using namespace isc::xfr; using namespace isc::xfr;
using namespace asiolink; using namespace asiolink;
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
using namespace std; using namespace std;
using namespace isc::cc; using namespace isc::cc;
using namespace isc::dns; using namespace isc::dns;
using namespace isc::util::io; using namespace isc::util;
using namespace isc::dns::rdata; using namespace isc::dns::rdata;
using namespace isc::data; using namespace isc::data;
using namespace isc::xfr; using namespace isc::xfr;
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
#include <string> #include <string>
#include <iostream> #include <iostream>
#include <util/io/buffer.h> #include <util/buffer.h>
#include <dns/name.h> #include <dns/name.h>
#include <dns/message.h> #include <dns/message.h>
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
using namespace std; using namespace std;
using namespace isc::dns; using namespace isc::dns;
using namespace isc::util::io; using namespace isc::util;
namespace { namespace {
char* dns_type = NULL; // not set, so A, AAAA, MX char* dns_type = NULL; // not set, so A, AAAA, MX
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#include <exceptions/exceptions.h> #include <exceptions/exceptions.h>
#include <util/io/buffer.h> #include <util/buffer.h>
#include <dns/rcode.h> #include <dns/rcode.h>
#include <dns/message.h> #include <dns/message.h>
#include <dns/messagerenderer.h> #include <dns/messagerenderer.h>
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#include <exceptions/exceptions.h> #include <exceptions/exceptions.h>
#include <util/io/buffer.h> #include <util/buffer.h>
#include <dns/opcode.h> #include <dns/opcode.h>
#include <dns/rcode.h> #include <dns/rcode.h>
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
using namespace std; using namespace std;
using namespace isc; using namespace isc;
using namespace isc::util::io; using namespace isc::util;
using namespace isc::dns; using namespace isc::dns;
using namespace isc::data; using namespace isc::data;
using namespace isc::config; using namespace isc::config;
......
...@@ -77,7 +77,7 @@ public: ...@@ -77,7 +77,7 @@ public:
void processMessage(const asiolink::IOMessage& io_message, void processMessage(const asiolink::IOMessage& io_message,
isc::dns::MessagePtr query_message, isc::dns::MessagePtr query_message,
isc::dns::MessagePtr answer_message, isc::dns::MessagePtr answer_message,
isc::util::io::OutputBufferPtr buffer, isc::util::OutputBufferPtr buffer,
asiolink::DNSServer* server); asiolink::DNSServer* server);
/// \brief Set and get the config session /// \brief Set and get the config session
......
...@@ -66,7 +66,7 @@ public: ...@@ -66,7 +66,7 @@ public:
virtual void operator()(const IOMessage& io_message, virtual void operator()(const IOMessage& io_message,
isc::dns::MessagePtr query_message, isc::dns::MessagePtr query_message,
isc::dns::MessagePtr answer_message, isc::dns::MessagePtr answer_message,
isc::util::io::OutputBufferPtr buffer) const = 0; isc::util::OutputBufferPtr buffer) const = 0;
}; };
} // namespace asiolink } // namespace asiolink
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
#include <asiolink/io_message.h> #include <asiolink/io_message.h>
#include <asiolink/dns_server.h> #include <asiolink/dns_server.h>
#include <util/io/buffer.h> #include <util/buffer.h>
#include <dns/message.h> #include <dns/message.h>
namespace asiolink { namespace asiolink {
...@@ -70,7 +70,7 @@ public: ...@@ -70,7 +70,7 @@ public:
virtual void operator()(const IOMessage& io_message, virtual void operator()(const IOMessage& io_message,
isc::dns::MessagePtr message, isc::dns::MessagePtr message,
isc::dns::MessagePtr answer_message, isc::dns::MessagePtr answer_message,
isc::util::io::OutputBufferPtr buffer, isc::util::OutputBufferPtr buffer,
DNSServer* server) const DNSServer* server) const
{ {
(*self_)(io_message, message, answer_message, buffer, server); (*self_)(io_message, message, answer_message, buffer, server);
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#include <exceptions/exceptions.h> #include <exceptions/exceptions.h>
#include <coroutine.h> #include <coroutine.h>
#include <util/io/buffer.h> #include <util/buffer.h>
#include <asiolink/io_error.h> #include <asiolink/io_error.h>
#include <asiolink/io_socket.h> #include <asiolink/io_socket.h>
...@@ -270,7 +270,7 @@ public: ...@@ -270,7 +270,7 @@ public:
virtual bool processReceivedData(const void* staging, size_t length, virtual bool processReceivedData(const void* staging, size_t length,
size_t& cumulative, size_t& offset, size_t& cumulative, size_t& offset,
size_t& expected, size_t& expected,
isc::util::io::OutputBufferPtr& outbuff) = 0; isc::util::OutputBufferPtr& outbuff) = 0;
/// \brief Cancel I/O On AsioSocket /// \brief Cancel I/O On AsioSocket
virtual void cancel() = 0; virtual void cancel() = 0;
...@@ -372,7 +372,7 @@ public: ...@@ -372,7 +372,7 @@ public:
virtual bool receiveComplete(const void* staging, size_t length, virtual bool receiveComplete(const void* staging, size_t length,
size_t& cumulative, size_t& offset, size_t& cumulative, size_t& offset,
size_t& expected, size_t& expected,
isc::util::io::OutputBufferPtr& outbuff) isc::util::OutputBufferPtr& outbuff)
{ {
return (true); return (true);
} }
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#include <dns/rcode.h> #include <dns/rcode.h>
#include <log/logger.h> #include <log/logger.h>
#include <util/io/buffer.h> #include <util/buffer.h>
#include <util/random/qid_gen.h> #include <util/random/qid_gen.h>
#include <asio.hpp> #include <asio.hpp>
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
using namespace asio; using namespace asio;
using namespace isc::dns; using namespace isc::dns;
using namespace isc::util::io; using namespace isc::util;
using namespace isc::util::random; using namespace isc::util::random;
using namespace isc::log; using namespace isc::log;
using namespace std; using namespace std;
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#include <asio/error_code.hpp> #include <asio/error_code.hpp>
#include <util/io/buffer.h> #include <util/buffer.h>
#include <dns/question.h> #include <dns/question.h>
namespace asiolink { namespace asiolink {
...@@ -134,7 +134,7 @@ public: ...@@ -134,7 +134,7 @@ public:
/// -1 indicates no timeout. /// -1 indicates no timeout.
IOFetch(Protocol protocol, IOService& service, IOFetch(Protocol protocol, IOService& service,
const isc::dns::Question& question, const IOAddress& address, const isc::dns::Question& question, const IOAddress& address,
uint16_t port, isc::util::io::OutputBufferPtr& buff, Callback* cb, uint16_t port, isc::util::OutputBufferPtr& buff, Callback* cb,
int wait = -1); int wait = -1);
/// \brief Return Current Protocol /// \brief Return Current Protocol
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include <log/dummylog.h> #include <log/dummylog.h>
#include <util/io/buffer.h> #include <util/buffer.h>
#include <asio.hpp> #include <asio.hpp>
#include <asiolink/dummy_io_cb.h> #include <asiolink/dummy_io_cb.h>
...@@ -38,7 +38,7 @@ using asio::ip::tcp; ...@@ -38,7 +38,7 @@ using asio::ip::tcp;
using namespace std; using namespace std;
using namespace isc::dns; using namespace isc::dns;
using namespace isc::util::io; using namespace isc::util;
namespace asiolink { namespace asiolink {
......
...@@ -91,7 +91,7 @@ private: ...@@ -91,7 +91,7 @@ private:
boost::shared_ptr<asio::ip::tcp::socket> socket_; boost::shared_ptr<asio::ip::tcp::socket> socket_;
// The buffer into which the response is written // The buffer into which the response is written
boost::shared_ptr<isc::util::io::OutputBuffer> respbuf_; boost::shared_ptr<isc::util::OutputBuffer> respbuf_;
// \c IOMessage and \c Message objects to be passed to the // \c IOMessage and \c Message objects to be passed to the
// DNS lookup and answer providers // DNS lookup and answer providers
......
...@@ -33,8 +33,8 @@ ...@@ -33,8 +33,8 @@
#include <config.h> #include <config.h>
#include <util/io/buffer.h> #include <util/buffer.h>
#include <util/io/io_utilities.h> #include <util/io_utilities.h>
#include <asiolink/io_asio_socket.h> #include <asiolink/io_asio_socket.h>
#include <asiolink/io_endpoint.h> #include <asiolink/io_endpoint.h>
...@@ -155,7 +155,7 @@ public: ...@@ -155,7 +155,7 @@ public:
virtual bool processReceivedData(const void* staging, size_t length, virtual bool processReceivedData(const void* staging, size_t length,
size_t& cumulative, size_t& offset, size_t& cumulative, size_t& offset,
size_t& expected, size_t& expected,
isc::util::io::OutputBufferPtr& outbuff); isc::util::OutputBufferPtr& outbuff);
/// \brief Cancel I/O On Socket /// \brief Cancel I/O On Socket
virtual void cancel(); virtual void cancel();
...@@ -185,7 +185,7 @@ private: ...@@ -185,7 +185,7 @@ private:
// The option of sending the data in two operations, the count followed by // The option of sending the data in two operations, the count followed by
// the data was discounted as that would lead to two callbacks which would // the data was discounted as that would lead to two callbacks which would
// cause problems with the stackless coroutine code. // cause problems with the stackless coroutine code.
isc::util::io::OutputBufferPtr send_buffer_; ///< Send buffer isc::util::OutputBufferPtr send_buffer_; ///< Send buffer
}; };
// Constructor - caller manages socket // Constructor - caller manages socket
...@@ -268,7 +268,7 @@ TCPSocket<C>::asyncSend(const void* data, size_t length, ...@@ -268,7 +268,7 @@ TCPSocket<C>::asyncSend(const void* data, size_t length,
uint16_t count = boost::numeric_cast<uint16_t>(length); uint16_t count = boost::numeric_cast<uint16_t>(length);
// Copy data into a buffer preceded by the count field. // Copy data into a buffer preceded by the count field.
send_buffer_.reset(new isc::util::io::OutputBuffer(length + 2)); send_buffer_.reset(new isc::util::OutputBuffer(length + 2));
send_buffer_->writeUint16(count); send_buffer_->writeUint16(count);
send_buffer_->writeData(data, length); send_buffer_->writeData(data, length);
...@@ -333,7 +333,7 @@ template <typename C> bool ...@@ -333,7 +333,7 @@ template <typename C> bool
TCPSocket<C>::processReceivedData(const void* staging, size_t length, TCPSocket<C>::processReceivedData(const void* staging, size_t length,
size_t& cumulative, size_t& offset, size_t& cumulative, size_t& offset,
size_t& expected, size_t& expected,
isc::util::io::OutputBufferPtr& outbuff) isc::util::OutputBufferPtr& outbuff)
{ {
// Point to the data in the staging buffer and note how much there is. // Point to the data in the staging buffer and note how much there is.
const uint8_t* data = static_cast<const uint8_t*>(staging); const uint8_t* data = static_cast<const uint8_t*>(staging);
...@@ -358,7 +358,7 @@ TCPSocket<C>::processReceivedData(const void* staging, size_t length, ...@@ -358,7 +358,7 @@ TCPSocket<C>::processReceivedData(const void* staging, size_t length,
} }
// Have enough data to interpret the packet count, so do so now. // Have enough data to interpret the packet count, so do so now.
expected = isc::util::io::readUint16(data); expected = isc::util::readUint16(data);
// We have two bytes less of data to process. Point to the start of the // We have two bytes less of data to process. Point to the start of the
// data and adjust the packet size. Note that at this point, // data and adjust the packet size. Note that at this point,
......
...@@ -110,7 +110,7 @@ class DummyLookup : public DNSLookup, public ServerStopper { ...@@ -110,7 +110,7 @@ class DummyLookup : public DNSLookup, public ServerStopper {
void operator()(const IOMessage& io_message, void operator()(const IOMessage& io_message,
isc::dns::MessagePtr message, isc::dns::MessagePtr message,
isc::dns::MessagePtr answer_message, isc::dns::MessagePtr answer_message,
isc::util::io::OutputBufferPtr buffer, isc::util::OutputBufferPtr buffer,
DNSServer* server) const { DNSServer* server) const {
stopServer(); stopServer();
server->resume(true); server->resume(true);
...@@ -124,7 +124,7 @@ class SimpleAnswer : public DNSAnswer, public ServerStopper { ...@@ -124,7 +124,7 @@ class SimpleAnswer : public DNSAnswer, public ServerStopper {
void operator()(const IOMessage& message, void operator()(const IOMessage& message,
isc::dns::MessagePtr query_message, isc::dns::MessagePtr query_message,
isc::dns::MessagePtr answer_message, isc::dns::MessagePtr answer_message,
isc::util::io::OutputBufferPtr buffer) const isc::util::OutputBufferPtr buffer) const
{ {
//copy what we get from user //copy what we get from user
buffer->writeData(message.getData(), message.getDataSize()); buffer->writeData(message.getData(), message.getDataSize());
......
...@@ -26,8 +26,8 @@ ...@@ -26,8 +26,8 @@
#include <asio.hpp> #include <asio.hpp>
#include <util/io/buffer.h> #include <util/buffer.h>
#include <util/io/io_utilities.h> #include <util/io_utilities.h>
#include <dns/question.h> #include <dns/question.h>
#include <dns/message.h> #include <dns/message.h>
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
using namespace asio; using namespace asio;
using namespace isc::dns; using namespace isc::dns;
using namespace isc::util::io; using namespace isc::util;
using namespace asio::ip; using namespace asio::ip;
using namespace std; using namespace std;
......
...@@ -35,8 +35,8 @@ ...@@ -35,8 +35,8 @@
#include <boost/bind.hpp> #include <boost/bind.hpp>
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
#include <util/io/buffer.h> #include <util/buffer.h>
#include <util/io/io_utilities.h> #include <util/io_utilities.h>
#include <asio.hpp> #include <asio.hpp>
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
using namespace asio; using namespace asio;
using namespace asio::ip; using namespace asio::ip;
using namespace asiolink; using namespace asiolink;
using namespace isc::util::io; using namespace isc::util;
using namespace std; using namespace std;
namespace { namespace {
......
...@@ -35,8 +35,8 @@ ...@@ -35,8 +35,8 @@
#include <boost/bind.hpp> #include <boost/bind.hpp>
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
#include <util/io/buffer.h> #include <util/buffer.h>
#include <util/io/io_utilities.h> #include <util/io_utilities.h>
#include <asio.hpp> #include <asio.hpp>
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
using namespace asio; using namespace asio;
using namespace asiolink; using namespace asiolink;
using namespace isc::util::io; using namespace isc::util;
using namespace std; using namespace std;
namespace { namespace {
......
...@@ -38,7 +38,7 @@ using isc::log::dlog; ...@@ -38,7 +38,7 @@ using isc::log::dlog;
using namespace std; using namespace std;
using namespace isc::dns; using namespace isc::dns;
using namespace isc::util::io; using namespace isc::util;
namespace asiolink { namespace asiolink {
...@@ -135,7 +135,7 @@ struct UDPServer::Data { ...@@ -135,7 +135,7 @@ struct UDPServer::Data {
isc::dns::MessagePtr answer_message_;