Remove genChallengeInfo and add genSelectParamsJson and genValidateParamsJson
Change-Id: Ic389fcaf52a713ff5b0fefe7025a5630d7b0f7cc
diff --git a/src/challenge-module/challenge-pin.cpp b/src/challenge-module/challenge-pin.cpp
index c5825f9..1aa96ce 100644
--- a/src/challenge-module/challenge-pin.cpp
+++ b/src/challenge-module/challenge-pin.cpp
@@ -115,17 +115,21 @@
}
JsonSection
-ChallengePin::genChallengeInfo(const std::string& interestType, const std::string& status,
- const std::list<std::string>& paramList)
+ChallengePin::doGenSelectParamsJson(const std::string& status,
+ const std::list<std::string>& paramList)
{
JsonSection result;
- if (interestType == "_SELECT") {
- BOOST_ASSERT(paramList.size() == 0);
- }
- else if (interestType == "_VALIDATE") {
- BOOST_ASSERT(paramList.size() == 1);
- result.put(JSON_PIN_CODE, paramList.front());
- }
+ BOOST_ASSERT(paramList.size() == 0);
+ return result;
+}
+
+JsonSection
+ChallengePin::doGenValidateParamsJson(const std::string& status,
+ const std::list<std::string>& paramList)
+{
+ JsonSection result;
+ BOOST_ASSERT(paramList.size() == 1);
+ result.put(JSON_PIN_CODE, paramList.front());
return result;
}