use namespace for ca and rename CaState to ca::RequestState

Change-Id: I2250bf7fb68503465dae18e16dc3c512fe809037
diff --git a/tools/ndncert-ca-server.cpp b/tools/ndncert-ca-server.cpp
index 17bf0f0..3776183 100644
--- a/tools/ndncert-ca-server.cpp
+++ b/tools/ndncert-ca-server.cpp
@@ -31,6 +31,7 @@
 
 namespace ndn {
 namespace ndncert {
+namespace ca {
 
 Face face;
 security::KeyChain keyChain;
@@ -122,14 +123,14 @@
 
   if (wantRepoOut) {
     writeDataToRepo(profileData);
-    ca.setStatusUpdateCallback([&](const CaState& request) {
+    ca.setStatusUpdateCallback([&](const RequestState& request) {
       if (request.m_status == Status::SUCCESS && request.m_requestType == RequestType::NEW) {
         writeDataToRepo(request.m_cert);
       }
     });
   }
   else {
-    ca.setStatusUpdateCallback([&](const CaState& request) {
+    ca.setStatusUpdateCallback([&](const RequestState& request) {
       if (request.m_status == Status::SUCCESS && request.m_requestType == RequestType::NEW) {
         cachedCertificates[request.m_cert.getName()] = request.m_cert;
       }
@@ -152,11 +153,12 @@
   return 0;
 }
 
+} // namespace ca
 } // namespace ndncert
 } // namespace ndn
 
 int
 main(int argc, char* argv[])
 {
-  return ndn::ndncert::main(argc, argv);
+  return ndn::ndncert::ca::main(argc, argv);
 }