communication: sync protocol adapater to add psync

refs: #4082

Change-Id: Ibe4649e709dfbc3cdc1f2afbfc4ff03f75a3f136
diff --git a/src/conf-parameter.hpp b/src/conf-parameter.hpp
index 8c0e1a9..df90cda 100644
--- a/src/conf-parameter.hpp
+++ b/src/conf-parameter.hpp
@@ -40,6 +40,11 @@
 };
 
 enum {
+  SYNC_PROTOCOL_CHRONOSYNC = 0,
+  SYNC_PROTOCOL_PSYNC = 1
+};
+
+enum {
   LSA_INTEREST_LIFETIME_MIN = 1,
   LSA_INTEREST_LIFETIME_DEFAULT = 4,
   LSA_INTEREST_LIFETIME_MAX = 60
@@ -136,7 +141,6 @@
     , m_faceDatasetFetchInterval(ndn::time::seconds(static_cast<int>(FACE_DATASET_FETCH_INTERVAL_DEFAULT)))
     , m_lsaInterestLifetime(ndn::time::seconds(static_cast<int>(LSA_INTEREST_LIFETIME_DEFAULT)))
     , m_routerDeadInterval(2 * LSA_REFRESH_TIME_DEFAULT)
-    , m_logLevel("INFO")
     , m_interestRetryNumber(HELLO_RETRIES_DEFAULT)
     , m_interestResendTime(HELLO_TIMEOUT_DEFAULT)
     , m_infoInterestInterval(HELLO_INTERVAL_DEFAULT)
@@ -144,6 +148,7 @@
     , m_corR(0)
     , m_maxFacesPerPrefix(MAX_FACES_PER_PREFIX_MIN)
     , m_syncInterestLifetime(ndn::time::milliseconds(SYNC_INTEREST_LIFETIME_DEFAULT))
+    , m_syncProtocol(SYNC_PROTOCOL_CHRONOSYNC)
   {
   }
 
@@ -214,6 +219,20 @@
   }
 
   uint32_t
+  getSyncProtocol() const
+  {
+    return m_syncProtocol;
+  }
+
+  void
+  setSyncProtocol(int32_t syncProtocol)
+  {
+    if (syncProtocol == SYNC_PROTOCOL_CHRONOSYNC || syncProtocol == SYNC_PROTOCOL_PSYNC) {
+      m_syncProtocol = syncProtocol;
+    }
+  }
+
+  uint32_t
   getLsaRefreshTime() const
   {
     return m_lsaRefreshTime;
@@ -440,7 +459,6 @@
 
   ndn::time::seconds m_lsaInterestLifetime;
   uint32_t  m_routerDeadInterval;
-  std::string m_logLevel;
 
   uint32_t m_interestRetryNumber;
   uint32_t m_interestResendTime;
@@ -456,6 +474,8 @@
   std::string m_seqFileDir;
   ndn::time::milliseconds m_syncInterestLifetime;
 
+  int32_t m_syncProtocol;
+
 PUBLIC_WITH_TESTS_ELSE_PRIVATE:
   static const uint64_t SYNC_VERSION;
 };