bug+codestyle: Fix compile bugs and adjust code style

Change-Id: I008bb538441c099fa25b8b967fbf23ffce13a220
diff --git a/src/invitation.cpp b/src/invitation.cpp
index ae39761..97b3855 100644
--- a/src/invitation.cpp
+++ b/src/invitation.cpp
@@ -8,20 +8,18 @@
  * Author: Yingdi Yu <yingdi@cs.ucla.edu>
  */
 
-#include "invitation.h"
+#include "invitation.hpp"
 
-#include <ndn-cxx/security/identity-certificate.hpp>
 #include <ndn-cxx/security/signature-sha256-with-rsa.hpp>
 
 #include "logging.h"
 
-using namespace ndn;
-
-INIT_LOGGER("Invitation");
-
-
 namespace chronos{
 
+using std::string;
+
+using ndn::IdentityCertificate;
+
 const size_t  Invitation::NAME_SIZE_MIN         = 7;
 const ssize_t Invitation::SIGNATURE             = -1;
 const ssize_t Invitation::KEY_LOCATOR           = -2;
@@ -36,22 +34,22 @@
 {
   size_t nameSize = interestName.size();
 
-  if(nameSize < NAME_SIZE_MIN)
+  if (nameSize < NAME_SIZE_MIN)
     throw Error("Wrong Invitation Name: Wrong length");
 
-  if(interestName.get(CHRONOCHAT_INVITATION).toEscapedString() != "CHRONOCHAT-INVITATION")
+  if (interestName.get(CHRONOCHAT_INVITATION).toUri() != "CHRONOCHAT-INVITATION")
     throw Error("Wrong Invitation Name: Wrong application tags");
 
   m_interestName = interestName.getPrefix(KEY_LOCATOR);
   m_timestamp = interestName.get(TIMESTAMP).toNumber();
   m_inviterCertificate.wireDecode(interestName.get(INVITER_CERT).blockFromValue());
   m_inviterRoutingPrefix.wireDecode(interestName.get(INVITER_PREFIX).blockFromValue());
-  m_chatroom = interestName.get(CHATROOM).toEscapedString();
+  m_chatroom = interestName.get(CHATROOM).toUri();
   m_inviteeNameSpace = interestName.getPrefix(CHRONOCHAT_INVITATION);
 }
 
 Invitation::Invitation(const Name& inviteeNameSpace,
-                       const std::string& chatroom,
+                       const string& chatroom,
                        const Name& inviterRoutingPrefix,
                        const IdentityCertificate& inviterCertificate)
   : m_inviteeNameSpace(inviteeNameSpace)
@@ -78,4 +76,4 @@
 {
 }
 
-}//chronos
+} // namespace chronos