From 079123b5c4c25a453ba4d3c6ffa1b5f9f39c5dad Mon Sep 17 00:00:00 2001 From: Gabriele Contini <contini.mailing@gmail.com> Date: 周六, 21 3月 2020 20:57:47 +0800 Subject: [PATCH] update docs --- src/library/hw_identifier/hw_identifier_facade.cpp | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/library/hw_identifier/hw_identifier_facade.cpp b/src/library/hw_identifier/hw_identifier_facade.cpp index 07808f6..0b834db 100644 --- a/src/library/hw_identifier/hw_identifier_facade.cpp +++ b/src/library/hw_identifier/hw_identifier_facade.cpp @@ -24,7 +24,7 @@ LCC_EVENT_TYPE HwIdentifierFacade::validate_pc_signature(const std::string& str_code) { HwIdentifier pc_id(str_code); - LCC_API_IDENTIFICATION_STRATEGY id_strategy = pc_id.get_identification_strategy(); + LCC_API_HW_IDENTIFICATION_STRATEGY id_strategy = pc_id.get_identification_strategy(); LCC_EVENT_TYPE result = IDENTIFIERS_MISMATCH; try { unique_ptr<IdentificationStrategy> strategy = IdentificationStrategy::get_strategy(id_strategy); @@ -35,9 +35,9 @@ return result; } -std::string HwIdentifierFacade::generate_user_pc_signature(LCC_API_IDENTIFICATION_STRATEGY strategy) { +std::string HwIdentifierFacade::generate_user_pc_signature(LCC_API_HW_IDENTIFICATION_STRATEGY strategy) { bool use_env_var = false; - vector<LCC_API_IDENTIFICATION_STRATEGY> strategies_to_try; + vector<LCC_API_HW_IDENTIFICATION_STRATEGY> strategies_to_try; if (strategy == STRATEGY_DEFAULT) { char* env_var_value = getenv(LCC_IDENTIFICATION_STRATEGY_ENV_VAR); if (env_var_value != nullptr && env_var_value[0] != '\0') { @@ -45,7 +45,7 @@ if (strategy_int < 0 || strategy_int > 3) { LOG_WARN("unknown " LCC_IDENTIFICATION_STRATEGY_ENV_VAR " %s", env_var_value); } else { - strategy = (LCC_API_IDENTIFICATION_STRATEGY)strategy_int; + strategy = (LCC_API_HW_IDENTIFICATION_STRATEGY)strategy_int; use_env_var = true; } } @@ -53,7 +53,7 @@ unique_ptr<IdentificationStrategy> strategy_ptr = IdentificationStrategy::get_strategy(strategy); HwIdentifier pc_id; - FUNCTION_RETURN result = strategy_ptr->identify_pc(pc_id); + FUNCTION_RETURN result = strategy_ptr->generate_pc_id(pc_id); if (result != FUNC_RET_OK) { throw logic_error("strategy " + to_string(strategy_ptr->identification_strategy()) + " failed"); } -- Gitblit v1.9.1