diff --git a/core/ANSLicensingSystem/ANSLicense.cpp b/core/ANSLicensingSystem/ANSLicense.cpp index 960d7d0..2b29128 100644 --- a/core/ANSLicensingSystem/ANSLicense.cpp +++ b/core/ANSLicensingSystem/ANSLicense.cpp @@ -1777,10 +1777,19 @@ namespace ANSCENTER registrationName = "ANSTS"; productId = 1008; } - else { - registrationName = productName; + else if (productName == "ANSMIND") {//1009 + registrationName = "ANSMIND"; productId = 1009; } + else if (productName == "ANSGW") {//1010 + registrationName = "ANSGW"; + productId = 1010; + } + else { + // Unknown product: refuse rather than mint a trial under some real product's id. + std::cout << "ActivateTrialLicense: unknown product name '" << productName << "'" << std::endl; + return 0; + } std::string trialLicenseKey = GetTrialLicenseKey(registrationName); if (trialLicenseKey.empty()) { @@ -1849,6 +1858,12 @@ namespace ANSCENTER case ANSCENTER::ANSPRODUCTS::ANS_TS://1008 _productName = "ANSTS"; break; + case ANSCENTER::ANSPRODUCTS::ANSMIND://1009 + _productName = "ANSMIND"; + break; + case ANSCENTER::ANSPRODUCTS::ANSGW://1010 + _productName = "ANSGW"; + break; } if (_productName == productName) { // Delete the license file @@ -1896,6 +1911,12 @@ namespace ANSCENTER else if (productName == "ANSTS") {//1008 registrationName = "ANSTS"; } + else if (productName == "ANSMIND") {//1009 + registrationName = "ANSMIND"; + } + else if (productName == "ANSGW") {//1010 + registrationName = "ANSGW"; + } else { registrationName = productName; } @@ -1936,6 +1957,12 @@ namespace ANSCENTER else if (productName == "ANSTS") {//1008 registrationName = "ANSTS"; } + else if (productName == "ANSMIND") {//1009 + registrationName = "ANSMIND"; + } + else if (productName == "ANSGW") {//1010 + registrationName = "ANSGW"; + } else { registrationName = productName; } @@ -2002,6 +2029,8 @@ namespace ANSCENTER ansLicenseCollection.push_back("ANSALPR");//1006 ansLicenseCollection.push_back("ANSCV");//1007 ansLicenseCollection.push_back("ANSTS");//1008 + ansLicenseCollection.push_back("ANSMIND");//1009 + ansLicenseCollection.push_back("ANSGW");//1010 for (auto& element : ansLicenseCollection) { boost::property_tree::ptree dataNode; @@ -2064,6 +2093,12 @@ namespace ANSCENTER case ANSCENTER::ANSPRODUCTS::ANS_TS: _productName = "ANSTS"; break; + case ANSCENTER::ANSPRODUCTS::ANSMIND: + _productName = "ANSMIND"; + break; + case ANSCENTER::ANSPRODUCTS::ANSGW: + _productName = "ANSGW"; + break; } if (_productName == element) { _registrationName = ANSUtility::DecodeBase64Utility(_validationData.c_str());// Decode @@ -2141,10 +2176,18 @@ namespace ANSCENTER registrationName = "ANSTS"; productId = 1008; } - else { - registrationName = ansLicenseInfo.productName; + else if (ansLicenseInfo.productName == "ANSMIND") { + registrationName = "ANSMIND"; productId = 1009; } + else if (ansLicenseInfo.productName == "ANSGW") { + registrationName = "ANSGW"; + productId = 1010; + } + else { + // Unknown product: skip the row rather than report it under some real product's id. + continue; + } dataNode.put("product_name", ansLicenseInfo.productName); std::string trialLicenseKey = GetTrialLicenseKey(registrationName); if (trialLicenseKey.empty()) { diff --git a/core/ANSLicensingSystem/ANSLicense.h b/core/ANSLicensingSystem/ANSLicense.h index 2d48b5f..d0fe8c7 100644 --- a/core/ANSLicensingSystem/ANSLicense.h +++ b/core/ANSLicensingSystem/ANSLicense.h @@ -259,7 +259,9 @@ namespace ANSCENTER ANS_OCR = 1005, ANS_ALPR =1006, ANS_CV = 1007, - ANS_TS = 1008 + ANS_TS = 1008, + ANSMIND = 1009, + ANSGW = 1010 }; enum ANSLICENSESTATUS { ACTIVE = 0, diff --git a/modules/ANSLLM/ANSLLM.cpp b/modules/ANSLLM/ANSLLM.cpp index bb4f50f..178d6ef 100644 --- a/modules/ANSLLM/ANSLLM.cpp +++ b/modules/ANSLLM/ANSLLM.cpp @@ -22,7 +22,7 @@ namespace ANSCENTER {1005, "ANSOCR"}, {1006, "ANSALPR"}, {1007, "ANSCV"}, - {1008, "ANSSRT"} + {1008, "ANSTS"} }; ansllmLicenceValid = false; for (const auto& [productId, productName] : licenseChecks) { diff --git a/modules/ANSUtilities/ANSAWSS3.cpp b/modules/ANSUtilities/ANSAWSS3.cpp index 3aa756e..98eeb07 100644 --- a/modules/ANSUtilities/ANSAWSS3.cpp +++ b/modules/ANSUtilities/ANSAWSS3.cpp @@ -33,7 +33,7 @@ namespace ANSCENTER {1005, "ANSOCR"}, {1006, "ANSALPR"}, {1007, "ANSCV"}, - {1008, "ANSSRT"} + {1008, "ANSTS"} }; ansawss3LicenceValid = false; for (const auto& [productId, productName] : licenseChecks) { diff --git a/modules/ANSUtilities/ANSUtilities.cpp b/modules/ANSUtilities/ANSUtilities.cpp index c884ef7..fc5f51d 100644 --- a/modules/ANSUtilities/ANSUtilities.cpp +++ b/modules/ANSUtilities/ANSUtilities.cpp @@ -40,7 +40,7 @@ namespace ANSCENTER {1005, "ANSOCR"}, {1006, "ANSALPR"}, {1007, "ANSCV"}, - {1008, "ANSSRT"} + {1008, "ANSTS"} }; ansutilityLicenceValid = false; for (const auto& [productId, productName] : licenseChecks) {