apply RDR in server command line tool and some format updates
Change-Id: Id59de3e8892e962062151911eb7fadf828ad69c5
diff --git a/src/ca-module.cpp b/src/ca-module.cpp
index 7b806b7..3560568 100644
--- a/src/ca-module.cpp
+++ b/src/ca-module.cpp
@@ -51,8 +51,8 @@
m_config.load(configPath);
m_storage = CaStorage::createCaStorage(storageType, m_config.m_caItem.m_caPrefix, "");
random::generateSecureBytes(m_requestIdGenKey, 32);
- if (m_config.m_heuristic.size() == 0) {
- m_config.m_heuristic.push_back(NameAssignmentFuncFactory::createNameAssignmentFuncFactory("random"));
+ if (m_config.m_nameAssignmentFuncs.size() == 0) {
+ m_config.m_nameAssignmentFuncs.push_back(NameAssignmentFunc::createNameAssignmentFunc("random"));
}
registerPrefix();
}
@@ -103,12 +103,6 @@
}
void
-CaModule::setNameAssignmentFunction(const NameAssignmentFunc& handler)
-{
- m_config.m_nameAssignmentFunc = handler;
-}
-
-void
CaModule::setStatusUpdateCallback(const StatusUpdateCallback& onUpdateCallback)
{
m_config.m_statusUpdateCallback = onUpdateCallback;
@@ -163,7 +157,7 @@
// process PROBE requests: collect probe parameters
auto parameters = PROBE::decodeApplicationParameters(request.getApplicationParameters());
std::vector<PartialName> availableComponents;
- for (auto& item : m_config.m_heuristic) {
+ for (auto& item : m_config.m_nameAssignmentFuncs) {
auto names = item->assignName(parameters);
availableComponents.insert(availableComponents.end(), names.begin(), names.end());
}