#5657 Removed serial key code from syntool

This commit is contained in:
Jerry (Xinyu Hou) 2016-10-13 11:20:43 +01:00
parent 4be9fc1800
commit 82e55702ef
4 changed files with 1 additions and 53 deletions

View File

@ -201,22 +201,6 @@ ArgParser::parseToolArgs(ToolArgs& args, int argc, const char* const* argv)
args.m_getArch = true;
return true;
}
else if (isArg(i, argc, argv, NULL, "--subscription-serial", 1)) {
args.m_subscriptionSerial = argv[++i];
if (args.m_subscriptionSerial.empty()) {
LOG((CLOG_CRIT "subscription error: serial was not provided"));
return false;
}
return true;
}
else if (isArg(i, argc, argv, NULL, "--get-subscription-filename", 0)) {
args.m_getSubscriptionFilename = true;
return true;
}
else if (isArg(i, argc, argv, NULL, "--check-subscription", 0)) {
args.m_checkSubscription = true;
return true;
}
else if (isArg(i, argc, argv, NULL, "--notify-activation", 0)) {
args.m_notifyActivation = true;
return true;

View File

@ -81,36 +81,6 @@ ToolApp::run(int argc, char** argv)
else if (m_args.m_getArch) {
std::cout << ARCH->getPlatformName() << std::endl;
}
else if (!m_args.m_subscriptionSerial.empty()) {
try {
SubscriptionManager subscriptionManager;
subscriptionManager.activate(m_args.m_subscriptionSerial);
}
catch (XSubscription& e) {
LOG((CLOG_CRIT "subscription error: %s", e.what()));
return kExitSubscription;
}
}
else if (m_args.m_getSubscriptionFilename) {
try {
SubscriptionManager subscriptionManager;
subscriptionManager.printFilename();
}
catch (XSubscription& e) {
LOG((CLOG_CRIT "subscription error: %s", e.what()));
return kExitSubscription;
}
}
else if (m_args.m_checkSubscription) {
try {
SubscriptionManager subscriptionManager;
subscriptionManager.checkFile("");
}
catch (XSubscription& e) {
LOG((CLOG_CRIT "subscription error: %s", e.what()));
return kExitSubscription;
}
}
else if (m_args.m_notifyActivation) {
notifyActivation();
}

View File

@ -23,9 +23,6 @@ ToolArgs::ToolArgs() :
m_getInstalledDir(false),
m_getProfileDir(false),
m_getArch(false),
m_getSubscriptionFilename(false),
m_checkSubscription(false),
m_notifyActivation(false),
m_subscriptionSerial()
m_notifyActivation(false)
{
}

View File

@ -29,8 +29,5 @@ public:
bool m_getInstalledDir;
bool m_getProfileDir;
bool m_getArch;
bool m_getSubscriptionFilename;
bool m_checkSubscription;
bool m_notifyActivation;
String m_subscriptionSerial;
};