From 7a083719747e5fc0eb8e906799e0f51e302990b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=8F=8B=E6=9D=BE?= Date: Mon, 14 Apr 2025 14:58:48 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=91=BD=E5=90=8D?= =?UTF-8?q?=E7=A9=BA=E9=97=B4=E5=92=8C=E6=8F=8F=E8=BF=B0=E7=AC=A6=20Signed?= =?UTF-8?q?-off-by:=20=E9=82=B9=E5=8F=8B=E6=9D=BE=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ability/define/include/update_define.h | 4 +-- foundations/ability/log/include/update_log.h | 4 +-- .../src/test/unittest/src/update_log_test.cpp | 4 +-- foundations/ability/log/src/update_log.cpp | 4 +-- .../include/base_service_kits_impl.h | 2 +- .../include/common_death_recipient.h | 4 +-- .../sa_loader/include/load_sa_service.h | 4 +-- .../ability/sa_loader/src/load_sa_service.cpp | 4 +-- .../sys_event/include/update_system_event.h | 4 +-- .../ability/utils/include/anonymous_utils.h | 4 +-- .../utils/include/dupdate_json_utils.h | 4 +-- .../ability/utils/include/json_builder.h | 4 +-- .../ability/utils/include/string_utils.h | 4 +-- foundations/model/include/business_error.h | 4 +-- foundations/model/include/call_result.h | 4 +-- foundations/model/include/error_message.h | 4 +-- foundations/model/include/network_type.h | 4 +-- .../model/include/update_device_type.h | 4 +-- .../napi/session/include/base_async_session.h | 4 +-- .../js/napi/session/include/base_client.h | 4 +-- .../session/include/base_promise_session.h | 4 +-- .../js/napi/session/include/base_session.h | 4 +-- .../napi/session/include/napi_common_define.h | 4 +-- .../napi/session/include/napi_common_utils.h | 4 +-- .../js/napi/session/include/napi_session.h | 4 +-- .../napi/session/include/napi_structs_base.h | 4 +-- .../js/napi/session/src/napi_common_utils.cpp | 4 +-- .../js/napi/session/src/napi_session.cpp | 4 +-- .../update/common/include/client_helper.h | 4 +-- .../js/napi/update/common/include/iupdater.h | 4 +-- .../napi/update/common/include/upgrade_file.h | 4 +-- .../napi/update/common/src/client_helper.cpp | 4 +-- .../js/napi/update/common/src/iupdater.cpp | 4 +-- .../js/napi/update/include/define_property.h | 4 +-- .../js/napi/update/include/local_updater.h | 4 +-- frameworks/js/napi/update/include/restorer.h | 4 +-- .../js/napi/update/include/session_manager.h | 4 +-- .../js/napi/update/include/session_type.h | 4 +-- .../js/napi/update/include/update_client.h | 4 +-- .../js/napi/update/include/update_result.h | 4 +-- .../js/napi/update/include/update_session.h | 4 +-- .../js/napi/update/src/define_property.cpp | 4 +-- .../js/napi/update/src/local_updater.cpp | 4 +-- frameworks/js/napi/update/src/restorer.cpp | 4 +-- .../js/napi/update/src/session_manager.cpp | 4 +-- .../js/napi/update/src/update_client.cpp | 4 +-- .../js/napi/update/src/update_module.cpp | 4 +-- .../js/napi/update/src/update_session.cpp | 4 +-- .../inner_api/engine/IUpdateService.idl | 34 +++++++++---------- .../engine/callback/IUpdateCallback.idl | 4 +-- .../engine/include/update_callback.h | 4 +-- .../engine/include/update_service_kits_impl.h | 4 +-- .../inner_api/engine/src/update_callback.cpp | 4 +-- .../engine/src/update_service_kits_impl.cpp | 4 +-- .../local_updater/iservice_local_updater.h | 4 +-- .../online_updater/iservice_online_updater.h | 4 +-- .../update/api/restorer/iservice_restorer.h | 4 +-- .../feature/update/model/check/check_result.h | 4 +-- .../update/model/check/search_status.h | 4 +-- .../update/model/check/src/check_result.cpp | 4 +-- .../update/model/check/src/error_message.cpp | 4 +-- .../update/model/clear/clear_options.h | 4 +-- .../update/model/common/base_json_struct.h | 4 +-- .../feature/update/model/common/order.h | 4 +-- .../update/model/common/parcel_common.h | 4 +-- .../feature/update/model/common/progress.h | 4 +-- .../update/model/common/upgrade_status.h | 4 +-- .../update/model/download/download_options.h | 4 +-- .../model/download/pause_download_options.h | 4 +-- .../model/download/resume_download_options.h | 4 +-- .../update/model/event/event_classify.h | 4 +-- .../feature/update/model/event/event_id.h | 4 +-- .../feature/update/model/event/event_info.h | 4 +-- .../model/event/on_off/event_classify_info.h | 4 +-- .../update/model/event/src/event_info.cpp | 4 +-- .../update/model/event/update_callback_info.h | 4 +-- .../update/model/install/install_mode.h | 4 +-- .../model/policy/src/upgrade_policy.cpp | 4 +-- .../update/model/policy/upgrade_period.h | 4 +-- .../update/model/policy/upgrade_policy.h | 4 +-- .../model/subscribe/src/subscribe_info.cpp | 4 +-- .../update/model/subscribe/subscribe_info.h | 4 +-- .../update/model/task/src/task_body.cpp | 4 +-- .../update/model/task/src/task_info.cpp | 4 +-- .../feature/update/model/task/task_body.h | 4 +-- .../update/model/task/task_body_member_mask.h | 4 +-- .../feature/update/model/task/task_info.h | 4 +-- .../update/model/upgrade/upgrade_interval.h | 4 +-- .../update/model/upgrade/upgrade_options.h | 4 +-- .../model/upgrade_info/business_sub_type.h | 4 +-- .../update/model/upgrade_info/business_type.h | 4 +-- .../model/upgrade_info/business_vendor.h | 4 +-- .../model/upgrade_info/src/business_error.cpp | 4 +-- .../model/upgrade_info/src/business_type.cpp | 4 +-- .../model/upgrade_info/src/clear_options.cpp | 4 +-- .../upgrade_info/src/download_options.cpp | 4 +-- .../src/pause_download_options.cpp | 4 +-- .../src/resume_download_options.cpp | 4 +-- .../model/upgrade_info/src/upgrade_info.cpp | 4 +-- .../upgrade_info/src/upgrade_options.cpp | 4 +-- .../update/model/upgrade_info/upgrade_info.h | 4 +-- .../model/version_info/component_type.h | 4 +-- .../current_version/current_version_info.h | 4 +-- .../src/current_version_info.cpp | 4 +-- .../description/component_description.h | 4 +-- .../description/description_format.h | 4 +-- .../description/description_info.h | 4 +-- .../description/description_options.h | 4 +-- .../description/description_type.h | 4 +-- .../description/src/component_description.cpp | 4 +-- .../description/src/description_info.cpp | 4 +-- .../description/src/description_options.cpp | 4 +-- .../src/version_description_info.cpp | 4 +-- .../description/version_description_info.h | 4 +-- .../model/version_info/effective_mode.h | 4 +-- .../new_version/new_version_info.h | 4 +-- .../new_version/src/new_version_info.cpp | 4 +-- .../update/model/version_info/ota_mode.h | 4 +-- .../update/model/version_info/ota_type.h | 4 +-- .../version_info/src/version_component.cpp | 4 +-- .../version_info/src/version_digest_info.cpp | 4 +-- .../model/version_info/upgrade_action.h | 4 +-- .../model/version_info/version_component.h | 4 +-- .../model/version_info/version_digest_info.h | 4 +-- .../inner_api/include/update_service_kits.h | 4 +-- .../include/updater_sa_ipc_interface_code.h | 4 +-- .../inner_api/modulemgr/include/module_log.h | 6 ++-- .../modulemgr/include/module_manager.h | 4 +-- .../modulemgr/include/update_service_module.h | 4 +-- .../modulemgr/src/module_manager.cpp | 4 +-- .../modulemgr/src/update_service_module.cpp | 12 +++---- .../ability/adapter/include/config_info.h | 4 +-- .../ability/adapter/include/config_parse.h | 4 +-- .../ability/adapter/include/device_adapter.h | 4 +-- .../core/ability/adapter/src/config_parse.cpp | 4 +-- .../ability/adapter/src/device_adapter.cpp | 4 +-- .../ability/alarm/include/alarm_timer_utils.h | 4 +-- .../ability/alarm/include/timer_manager.h | 4 +-- .../ability/alarm/src/alarm_timer_utils.cpp | 4 +-- .../core/ability/alarm/src/timer_manager.cpp | 4 +-- .../callback/include/base_callback_utils.h | 4 +-- .../callback/src/base_callback_utils.cpp | 4 +-- .../src/base_callback_utils_empty.cpp | 4 +-- .../core/ability/common/include/constant.h | 4 +-- .../download/data/include/download_info.h | 4 +-- .../core/ability/model/include/device_info.h | 4 +-- .../core/ability/model/include/ota_mode.h | 4 +-- .../core/ability/model/include/ota_type.h | 4 +-- .../core/ability/model/include/package_type.h | 4 +-- .../ability/net/include/network_response.h | 4 +-- .../preference/include/preferences_utils.h | 4 +-- .../preference/src/preference_utils.cpp | 4 +-- .../preference/src/preference_utils_empty.cpp | 4 +-- .../ability/sqlite/core/include/idatabase.h | 4 +-- .../core/ability/sqlite/core/include/itable.h | 4 +-- .../sqlite/core/include/itable_operator.h | 4 +-- .../ability/sqlite/core/include/sqlite_db.h | 4 +-- .../sqlite/core/include/table_base_operator.h | 4 +-- .../ability/sqlite/core/src/sqlite_db.cpp | 4 +-- .../status_cache/include/status_cache.h | 4 +-- .../ability/status_cache/src/status_cache.cpp | 4 +-- .../core/ability/utils/include/file_utils.h | 4 +-- .../core/ability/utils/include/sha256_utils.h | 4 +-- .../core/ability/utils/include/time_utils.h | 4 +-- .../ability/utils/include/time_utils_proxy.h | 4 +-- .../core/ability/utils/src/file_utils.cpp | 4 +-- .../core/ability/utils/src/sha256_utils.cpp | 4 +-- .../ability/utils/src/time_utils_proxy.cpp | 4 +-- services/engine/IUpdateService.idl | 34 +++++++++---------- services/engine/callback/IUpdateCallback.idl | 4 +-- services/engine/include/i_update_notify.h | 4 +-- services/engine/include/progress_thread.h | 4 +-- .../engine/include/update_no_constructor.h | 4 +-- services/engine/include/update_notify.h | 4 +-- services/engine/include/update_service.h | 4 +-- .../engine/include/update_service_cache.h | 4 +-- .../include/update_service_impl_firmware.h | 4 +-- .../include/update_service_impl_manager.h | 4 +-- .../include/update_service_local_updater.h | 4 +-- .../engine/include/update_service_restorer.h | 4 +-- services/engine/include/update_service_util.h | 4 +-- services/engine/src/progress_thread.cpp | 4 +-- .../engine/src/stream_progress_thread.cpp | 4 +-- services/engine/src/update_notify.cpp | 4 +-- services/engine/src/update_service.cpp | 4 +-- services/engine/src/update_service_cache.cpp | 4 +-- .../src/update_service_impl_firmware.cpp | 4 +-- .../src/update_service_impl_manager.cpp | 4 +-- .../src/update_service_local_updater.cpp | 4 +-- .../engine/src/update_service_restorer.cpp | 4 +-- .../engine/src/update_service_util_hmos.cpp | 4 +-- .../include/firmware_callback_utils.h | 4 +-- .../callback/src/firmware_callback_utils.cpp | 4 +-- .../firmware/check/include/firmware_icheck.h | 4 +-- .../firmware/common/include/firmware_common.h | 4 +-- .../common/include/firmware_constant.h | 4 +-- .../common/include/firmware_update_adapter.h | 4 +-- .../common/include/firmware_update_helper.h | 4 +-- .../common/src/firmware_update_adapter.cpp | 4 +-- .../common/src/firmware_update_helper.cpp | 4 +-- .../data/db/include/firmware_component.h | 4 +-- .../db/include/firmware_component_operator.h | 4 +-- .../db/include/firmware_component_table.h | 4 +-- .../data/db/include/firmware_database.h | 4 +-- .../db/include/firmware_database_callback.h | 4 +-- .../firmware/data/db/include/firmware_task.h | 4 +-- .../data/db/include/firmware_task_operator.h | 4 +-- .../data/db/include/firmware_task_table.h | 4 +-- .../db/src/firmware_component_operator.cpp | 4 +-- .../src/firmware_component_operator_empty.cpp | 4 +-- .../data/db/src/firmware_component_table.cpp | 4 +-- .../db/src/firmware_component_table_empty.cpp | 4 +-- .../data/db/src/firmware_database.cpp | 4 +-- .../db/src/firmware_database_callback.cpp | 4 +-- .../data/db/src/firmware_database_empty.cpp | 4 +-- .../data/db/src/firmware_task_operator.cpp | 4 +-- .../db/src/firmware_task_operator_empty.cpp | 4 +-- .../data/db/src/firmware_task_table.cpp | 4 +-- .../data/db/src/firmware_task_table_empty.cpp | 4 +-- .../include/firmware_preferences_utils.h | 4 +-- .../src/firmware_preferences_utils.cpp | 4 +-- .../event/include/firmware_event_listener.h | 4 +-- .../event/src/firmware_event_listener.cpp | 4 +-- .../src/firmware_event_listener_empty.cpp | 4 +-- .../include/firmware_check_data_processor.h | 4 +-- .../firmware_download_data_processor.h | 4 +-- .../include/firmware_install_data_processor.h | 4 +-- .../src/firmware_check_data_processor.cpp | 4 +-- .../firmware_check_data_processor_empty.cpp | 4 +-- .../src/firmware_download_data_processor.cpp | 4 +-- .../src/firmware_install_data_processor.cpp | 4 +-- .../include/firmware_apply_executor.h | 4 +-- .../include/firmware_check_executor.h | 4 +-- .../include/firmware_download_executor.h | 4 +-- .../executor/include/firmware_iexecutor.h | 4 +-- .../include/firmware_install_executor.h | 4 +-- .../executor/src/firmware_apply_executor.cpp | 4 +-- .../executor/src/firmware_check_executor.cpp | 4 +-- .../src/firmware_download_executor.cpp | 4 +-- .../src/firmware_install_executor.cpp | 4 +-- .../flow/include/firmware_flow_manager.h | 4 +-- .../upgrade/flow/include/firmware_manager.h | 4 +-- .../flow/src/firmware_flow_manager.cpp | 4 +-- .../upgrade/flow/src/firmware_manager.cpp | 4 +-- .../install/include/firmware_install.h | 4 +-- .../include/firmware_install_factory.h | 4 +-- .../firmware_stream_installer_install.h | 4 +-- .../include/firmware_sys_installer_callback.h | 4 +-- .../include/firmware_sys_installer_install.h | 4 +-- .../include/firmware_updater_install.h | 4 +-- .../upgrade/install/src/firmware_install.cpp | 4 +-- .../install/src/firmware_install_factory.cpp | 4 +-- .../src/firmware_stream_installer_install.cpp | 4 +-- .../src/firmware_sys_installer_callback.cpp | 4 +-- .../src/firmware_sys_installer_install.cpp | 4 +-- .../firmware_sys_installer_install_empty.cpp | 4 +-- .../install/src/firmware_updater_install.cpp | 4 +-- .../mode/include/firmware_download_mode.h | 4 +-- .../mode/include/firmware_iexecute_mode.h | 4 +-- .../include/firmware_install_apply_mode.h | 4 +-- .../mode/include/firmware_manual_check_mode.h | 4 +-- .../firmware_stream_install_apply_mode.h | 4 +-- .../mode/src/firmware_download_mode.cpp | 4 +-- .../mode/src/firmware_download_mode_empty.cpp | 4 +-- .../mode/src/firmware_install_apply_mode.cpp | 4 +-- .../src/firmware_install_apply_mode_empty.cpp | 4 +-- .../mode/src/firmware_manual_check_mode.cpp | 4 +-- .../src/firmware_manual_check_mode_empty.cpp | 4 +-- .../firmware_stream_install_apply_mode.cpp | 4 +-- .../status/include/firmware_result_process.h | 4 +-- .../status/include/firmware_status_cache.h | 4 +-- .../status/src/firmware_result_process.cpp | 4 +-- .../status/src/firmware_status_cache.cpp | 4 +-- .../utils/include/firmware_changelog_utils.h | 4 +-- .../include/firmware_check_analyze_utils.h | 4 +-- .../include/firmware_combine_version_utils.h | 4 +-- .../utils/include/firmware_file_utils.h | 4 +-- .../firmware/utils/include/firmware_log.h | 4 +-- .../utils/src/firmware_changelog_utils.cpp | 4 +-- .../src/firmware_check_analyze_utils.cpp | 4 +-- .../src/firmware_combine_version_utils.cpp | 4 +-- .../service/include/dupdate_upgrade_helper.h | 4 +-- .../startup/access/include/access_factory.h | 4 +-- .../startup/access/include/access_manager.h | 4 +-- .../startup/access/include/default_access.h | 4 +-- .../startup/access/include/firmware_access.h | 4 +-- services/startup/access/include/i_access.h | 4 +-- .../startup/access/src/access_factory.cpp | 4 +-- .../startup/access/src/access_manager.cpp | 4 +-- .../startup/access/src/default_access.cpp | 4 +-- .../startup/access/src/firmware_access.cpp | 4 +-- .../startup/manage/include/schedule_config.h | 4 +-- .../startup/manage/include/schedule_manager.h | 4 +-- .../startup/manage/include/startup_manager.h | 4 +-- .../startup/manage/include/startup_schedule.h | 4 +-- .../manage/include/system_ability_operator.h | 4 +-- .../startup/manage/src/schedule_config.cpp | 4 +-- .../startup/manage/src/schedule_manager.cpp | 4 +-- .../startup/manage/src/startup_manager.cpp | 4 +-- .../startup/manage/src/startup_schedule.cpp | 4 +-- .../manage/src/startup_schedule_empty.cpp | 4 +-- .../manage/src/system_ability_operator.cpp | 4 +-- .../startup/model/include/schedule_task.h | 4 +-- .../startup/model/include/startup_constant.h | 4 +-- .../utils/include/dupdate_inet_observer.h | 4 +-- services/utils/include/dupdate_net_manager.h | 4 +-- services/utils/include/dupdate_net_observer.h | 4 +-- services/utils/src/dupdate_net_manager.cpp | 4 +-- .../utils/src/dupdate_net_manager_empty.cpp | 4 +-- services/utils/src/dupdate_net_observer.cpp | 4 +-- test/fuzztest/common/fuzztest_helper.cpp | 4 +-- test/fuzztest/common/fuzztest_helper.h | 4 +-- .../updateservicecancel_fuzzer.cpp | 2 +- .../updateservicechecknewversion_fuzzer.cpp | 2 +- .../updateservicedownload_fuzzer.cpp | 2 +- .../updateservicegetnewversion_fuzzer.cpp | 2 +- .../updateservicegetupgradepolicy_fuzzer.cpp | 2 +- ...teserviceregisterupdatecallback_fuzzer.cpp | 2 +- .../updateservicesetupgradepolicy_fuzzer.cpp | 2 +- ...serviceunregisterupdatecallback_fuzzer.cpp | 2 +- ...firmware_stream_installer_install_test.cpp | 4 +-- .../stream_progress_thread_test.cpp | 4 +-- 322 files changed, 670 insertions(+), 670 deletions(-) diff --git a/foundations/ability/define/include/update_define.h b/foundations/ability/define/include/update_define.h index 2bee240b..feb6f4b5 100644 --- a/foundations/ability/define/include/update_define.h +++ b/foundations/ability/define/include/update_define.h @@ -18,7 +18,7 @@ #include "update_log.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { #define COUNT_OF(array) (sizeof(array) / sizeof((array)[0])) #define CAST_INT(enumClass) (static_cast(enumClass)) #define CAST_UINT(enumClass) (static_cast(enumClass)) @@ -32,5 +32,5 @@ namespace OHOS::UpdateEngine { exper; \ } \ } while (0) -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // UPDATE_DEFINE_H \ No newline at end of file diff --git a/foundations/ability/log/include/update_log.h b/foundations/ability/log/include/update_log.h index 3ca7e14b..05a815c4 100644 --- a/foundations/ability/log/include/update_log.h +++ b/foundations/ability/log/include/update_log.h @@ -22,7 +22,7 @@ #include "hilog/log.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { const std::string DEFAULT_LABEL = "%"; const std::string DEFAULT_FMT_LABEL = "%s"; const std::string PRIVATE_FMT_LABEL = "%{private}s"; @@ -129,6 +129,6 @@ private: #define ENGINE_LONG_LOGD(fmt, args) PRINT_LONG_LOGD(UPDATE_LOG_TAG_ID, UPDATE_LABEL[UPDATE_LOG_TAG_ID], fmt, args) #define ENGINE_LONG_LOGI(fmt, args) PRINT_LONG_LOGI(UPDATE_LOG_TAG_ID, UPDATE_LABEL[UPDATE_LOG_TAG_ID], fmt, args) #define ENGINE_LONG_LOGE(fmt, args) PRINT_LONG_LOGE(UPDATE_LOG_TAG_ID, UPDATE_LABEL[UPDATE_LOG_TAG_ID], fmt, args) -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // UPDATE_LOG_H \ No newline at end of file diff --git a/foundations/ability/log/src/test/unittest/src/update_log_test.cpp b/foundations/ability/log/src/test/unittest/src/update_log_test.cpp index 7d7f6e03..9ec830f1 100644 --- a/foundations/ability/log/src/test/unittest/src/update_log_test.cpp +++ b/foundations/ability/log/src/test/unittest/src/update_log_test.cpp @@ -20,7 +20,7 @@ using namespace testing::ext; using namespace testing; -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { class UpdateLogTest : public testing::Test { public: static void SetupTestCase(void) {}; @@ -116,4 +116,4 @@ HWTEST_F(UpdateLogTest, TestPrintLongLog, TestSize.Level1) ENGINE_LONG_LOGI("log test %{public}s", longLogBuffer); ASSERT_TRUE(true); } -} // namespace OHOS::UpdateEngine \ No newline at end of file +} // namespace OHOS::UpdateService \ No newline at end of file diff --git a/foundations/ability/log/src/update_log.cpp b/foundations/ability/log/src/update_log.cpp index 1da0bca7..74b20aa7 100644 --- a/foundations/ability/log/src/update_log.cpp +++ b/foundations/ability/log/src/update_log.cpp @@ -16,7 +16,7 @@ #include "update_log.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { UpdateLogLevel UpdateLog::level_ = UpdateLogLevel::UPDATE_INFO; constexpr int32_t COUNT_ONE = 1; constexpr int32_t LONG_LOG_LEN = 900; @@ -132,5 +132,5 @@ int32_t UpdateLog::FindSubStrCount(const std::string &str, const std::string &su } return count; } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS diff --git a/foundations/ability/sa_loader/include/base_service_kits_impl.h b/foundations/ability/sa_loader/include/base_service_kits_impl.h index 5fc14df1..cff8e094 100644 --- a/foundations/ability/sa_loader/include/base_service_kits_impl.h +++ b/foundations/ability/sa_loader/include/base_service_kits_impl.h @@ -24,7 +24,7 @@ #include "load_sa_service.h" #include "update_define.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { #define RETURN_FAIL_WHEN_SERVICE_NULL(service) \ if ((service) == nullptr) { \ ENGINE_LOGE("Service is null"); \ diff --git a/foundations/ability/sa_loader/include/common_death_recipient.h b/foundations/ability/sa_loader/include/common_death_recipient.h index ac1d3880..b6c0f82d 100644 --- a/foundations/ability/sa_loader/include/common_death_recipient.h +++ b/foundations/ability/sa_loader/include/common_death_recipient.h @@ -20,7 +20,7 @@ #include "iremote_object.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { class CommonDeathRecipient : public IRemoteObject::DeathRecipient { public: using ResetServiceFunc = std::function &object)>; @@ -39,5 +39,5 @@ public: private: ResetServiceFunc resetServiceFunc_; }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // COMMON_DEATH_RECIPIENT_H diff --git a/foundations/ability/sa_loader/include/load_sa_service.h b/foundations/ability/sa_loader/include/load_sa_service.h index d0b3b339..5070b020 100644 --- a/foundations/ability/sa_loader/include/load_sa_service.h +++ b/foundations/ability/sa_loader/include/load_sa_service.h @@ -23,7 +23,7 @@ #include "system_ability_definition.h" #include "system_ability_load_callback_stub.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { enum class LoadSaStatus { WAIT_RESULT = 0, SUCCESS, @@ -49,5 +49,5 @@ private: static std::mutex instanceLock_; static sptr instance_; }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // LOAD_SA_SERVICE_H \ No newline at end of file diff --git a/foundations/ability/sa_loader/src/load_sa_service.cpp b/foundations/ability/sa_loader/src/load_sa_service.cpp index 8e81ad36..2bfa0e44 100644 --- a/foundations/ability/sa_loader/src/load_sa_service.cpp +++ b/foundations/ability/sa_loader/src/load_sa_service.cpp @@ -19,7 +19,7 @@ #include "update_log.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { LoadSaService::LoadSaService() = default; LoadSaService::~LoadSaService() = default; @@ -99,4 +99,4 @@ bool LoadSaService::LoadSa(int systemAbilityId) ENGINE_LOGI("systemAbilityId: %{public}d, load succeed", systemAbilityId); return true; } -} // namespace OHOS::UpdateEngine \ No newline at end of file +} // namespace OHOS::UpdateService \ No newline at end of file diff --git a/foundations/ability/sys_event/include/update_system_event.h b/foundations/ability/sys_event/include/update_system_event.h index 9ff587cd..ab12a888 100644 --- a/foundations/ability/sys_event/include/update_system_event.h +++ b/foundations/ability/sys_event/include/update_system_event.h @@ -20,7 +20,7 @@ #include "hisysevent.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { #define EVENT_WRITE(eventName, type, ...) \ HiSysEventWrite(OHOS::HiviewDFX::HiSysEvent::Domain::UPDATE, eventName, type, ##__VA_ARGS__) @@ -70,5 +70,5 @@ public: static constexpr const char *EVENT_PERMISSION_VERIFY_FAILED = "permission verify failed"; static constexpr const char *EVENT_PKG_VERIFY_FAILED = "upgrade package verify failed"; }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // UPDATE_SYSTEM_EVENT_H \ No newline at end of file diff --git a/foundations/ability/utils/include/anonymous_utils.h b/foundations/ability/utils/include/anonymous_utils.h index 61d77029..3d3f8f10 100644 --- a/foundations/ability/utils/include/anonymous_utils.h +++ b/foundations/ability/utils/include/anonymous_utils.h @@ -22,7 +22,7 @@ #include namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { static const int32_t ENCRYPT_LENGTH = 4; // 需要替换*的长度 static const int32_t ENCRYPT_TOTAL_LENGTH = 8; // 敏感数据匿名化后最长长度 static const std::string ENCRYPT_STR = "****"; @@ -66,6 +66,6 @@ public: return result; } }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // ANONYMOUS_UTILS_H \ No newline at end of file diff --git a/foundations/ability/utils/include/dupdate_json_utils.h b/foundations/ability/utils/include/dupdate_json_utils.h index 3c1375f2..6dfc6f57 100644 --- a/foundations/ability/utils/include/dupdate_json_utils.h +++ b/foundations/ability/utils/include/dupdate_json_utils.h @@ -24,7 +24,7 @@ #include "update_define.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { enum class JsonParseError { ERR_OK = 0, COMMOM_ERROR, @@ -194,5 +194,5 @@ private: } } }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // JSON_UTILS_H \ No newline at end of file diff --git a/foundations/ability/utils/include/json_builder.h b/foundations/ability/utils/include/json_builder.h index 8e0161fe..ede82f58 100644 --- a/foundations/ability/utils/include/json_builder.h +++ b/foundations/ability/utils/include/json_builder.h @@ -19,7 +19,7 @@ #include #include -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { class JsonBuilder { public: JsonBuilder &Append(const std::string &qualifier) @@ -112,5 +112,5 @@ private: std::string builder_; bool isFirstItem_ = true; }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // JSON_BUILDER_H \ No newline at end of file diff --git a/foundations/ability/utils/include/string_utils.h b/foundations/ability/utils/include/string_utils.h index 5c22f79c..cf73cbba 100644 --- a/foundations/ability/utils/include/string_utils.h +++ b/foundations/ability/utils/include/string_utils.h @@ -25,7 +25,7 @@ #define GET_ENUM_VALUE_STRING(item) StringUtils::GetEnumValueString(#item) namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { enum class StrCnvResult { SUCCESS, @@ -172,6 +172,6 @@ private: return StrCnvResult::SUCCESS; } }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // STRING_UTILS_H \ No newline at end of file diff --git a/foundations/model/include/business_error.h b/foundations/model/include/business_error.h index 25e7382f..05a2d988 100644 --- a/foundations/model/include/business_error.h +++ b/foundations/model/include/business_error.h @@ -28,7 +28,7 @@ #include "json_builder.h" #include "parcel.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { struct BusinessError : public Parcelable { std::string message; CallResult errorNum = CallResult::SUCCESS; @@ -70,5 +70,5 @@ struct BusinessError : public Parcelable { bool Marshalling(Parcel &parcel) const override; static BusinessError *Unmarshalling(Parcel &parcel); }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // UPDATE_SERVICE_BUSINESS_ERROR_H diff --git a/foundations/model/include/call_result.h b/foundations/model/include/call_result.h index 5832b888..3f08f214 100644 --- a/foundations/model/include/call_result.h +++ b/foundations/model/include/call_result.h @@ -18,7 +18,7 @@ #include "update_define.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { constexpr int CALL_RESULT_OFFSET = 2000; enum class CallResult { @@ -56,5 +56,5 @@ constexpr int32_t INT_IO_ERROR = CAST_INT(CallResult::IO_ERROR); constexpr int32_t INT_NET_ERROR = CAST_INT(CallResult::NET_ERROR); constexpr std::string_view NOT_SYSTEM_APP_INFO = ": Permission verification failed. A non-system application calls a system API."; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // UPDATE_SERVICE_CALL_RESULT_H diff --git a/foundations/model/include/error_message.h b/foundations/model/include/error_message.h index 712284b5..5cf71286 100644 --- a/foundations/model/include/error_message.h +++ b/foundations/model/include/error_message.h @@ -26,7 +26,7 @@ #include "parcel.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { struct ErrorMessage : public Parcelable { int32_t errorCode = 0; std::string errorMessage; @@ -56,5 +56,5 @@ struct ErrorMessage : public Parcelable { bool Marshalling(Parcel &parcel) const override; static ErrorMessage *Unmarshalling(Parcel &parcel); }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // UPDATE_SERVICE_ERROR_MESSAGE_H diff --git a/foundations/model/include/network_type.h b/foundations/model/include/network_type.h index fc85b435..27afa572 100644 --- a/foundations/model/include/network_type.h +++ b/foundations/model/include/network_type.h @@ -16,7 +16,7 @@ #ifndef UPDATE_SERVICE_NETWORK_TYPE_H #define UPDATE_SERVICE_NETWORK_TYPE_H -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { enum class NetType { NO_NET = 0, CELLULAR = 1, @@ -27,5 +27,5 @@ enum class NetType { WIFI = METERED_WIFI | NOT_METERED_WIFI, CELLULAR_AND_WIFI = CELLULAR | WIFI }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // UPDATE_SERVICE_NETWORK_TYPE_H diff --git a/foundations/model/include/update_device_type.h b/foundations/model/include/update_device_type.h index 9783e199..415fb974 100644 --- a/foundations/model/include/update_device_type.h +++ b/foundations/model/include/update_device_type.h @@ -16,7 +16,7 @@ #ifndef UPDATE_SERVICE_DEVICE_TYPE_H #define UPDATE_SERVICE_DEVICE_TYPE_H -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { enum class DeviceType { UNKNOWN = 0, SMART_PHONE = 1, // 手机 @@ -26,5 +26,5 @@ enum class DeviceType { KEYBOARD = 7, // 键盘 PEN = 8 // 手写笔 }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // UPDATE_SERVICE_DEVICE_TYPE_H diff --git a/frameworks/js/napi/session/include/base_async_session.h b/frameworks/js/napi/session/include/base_async_session.h index ba8044f8..3ee6779f 100644 --- a/frameworks/js/napi/session/include/base_async_session.h +++ b/frameworks/js/napi/session/include/base_async_session.h @@ -21,7 +21,7 @@ #include "napi_session.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { constexpr int32_t RESULT_ARGC = 2; template class BaseAsyncSession : public NapiSession { @@ -115,5 +115,5 @@ protected: napi_async_work worker_ = nullptr; std::vector callbackRef_ = { 0 }; }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // BASE_ASYNC_SESSION_H \ No newline at end of file diff --git a/frameworks/js/napi/session/include/base_client.h b/frameworks/js/napi/session/include/base_client.h index 59cf9e32..c9da2608 100644 --- a/frameworks/js/napi/session/include/base_client.h +++ b/frameworks/js/napi/session/include/base_client.h @@ -16,12 +16,12 @@ #ifndef BASE_CLIENT_H #define BASE_CLIENT_H -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { class BaseClient { public: virtual ~BaseClient() {} virtual void RemoveSession(uint32_t sessionId) = 0; }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // BASE_CLIENT_H \ No newline at end of file diff --git a/frameworks/js/napi/session/include/base_promise_session.h b/frameworks/js/napi/session/include/base_promise_session.h index 956d624f..69f48ff2 100644 --- a/frameworks/js/napi/session/include/base_promise_session.h +++ b/frameworks/js/napi/session/include/base_promise_session.h @@ -21,7 +21,7 @@ #include "napi_session.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { template class BasePromiseSession : public NapiSession { public: BasePromiseSession(BaseClient *client, SessionParams &sessionParams, size_t argc, size_t callbackNumber = 0) @@ -77,5 +77,5 @@ protected: napi_async_work worker_ = nullptr; napi_deferred deferred_ = nullptr; }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // BASE_PROMISE_SESSION_H \ No newline at end of file diff --git a/frameworks/js/napi/session/include/base_session.h b/frameworks/js/napi/session/include/base_session.h index e24d05de..aecf5984 100644 --- a/frameworks/js/napi/session/include/base_session.h +++ b/frameworks/js/napi/session/include/base_session.h @@ -21,7 +21,7 @@ #include "js_native_api_types.h" #include "napi_structs_base.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { class BaseSession { public: using DoWorkFunction = std::function; @@ -32,5 +32,5 @@ public: virtual bool IsAsyncCompleteWork() = 0; virtual void OnAsyncComplete(const BusinessError &businessError) = 0; }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // BASE_SESSION_H \ No newline at end of file diff --git a/frameworks/js/napi/session/include/napi_common_define.h b/frameworks/js/napi/session/include/napi_common_define.h index 0db714dc..1506e65f 100644 --- a/frameworks/js/napi/session/include/napi_common_define.h +++ b/frameworks/js/napi/session/include/napi_common_define.h @@ -23,7 +23,7 @@ #include "node_api.h" #include "update_log.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { constexpr int32_t COMPONENT_ERR = 11500000; #define PARAM_CHECK(validCheck, exper, ...) \ if (!(validCheck)) { \ @@ -118,5 +118,5 @@ bool IsValidEnum(const std::list &enumList, int32_t number) { return std::any_of(enumList.begin(), enumList.end(), [=](T key) { return number == static_cast(key); }); } -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // NAPI_COMMON_DEFINE_H \ No newline at end of file diff --git a/frameworks/js/napi/session/include/napi_common_utils.h b/frameworks/js/napi/session/include/napi_common_utils.h index b47230f9..cf2d6db3 100644 --- a/frameworks/js/napi/session/include/napi_common_utils.h +++ b/frameworks/js/napi/session/include/napi_common_utils.h @@ -27,7 +27,7 @@ #include "error_message.h" #include "napi_common_define.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { class NapiCommonUtils { public: static int32_t GetBool(napi_env env, napi_value arg, const std::string &attrName, bool &value); @@ -73,5 +73,5 @@ private: static std::string ConvertVectorToStr(std::vector> &strVector, bool isFirst); static size_t GetValidDataCount(const std::vector &list); }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // NAPI_COMMON_UTILS_H \ No newline at end of file diff --git a/frameworks/js/napi/session/include/napi_session.h b/frameworks/js/napi/session/include/napi_session.h index cbdfd4fd..2698b905 100644 --- a/frameworks/js/napi/session/include/napi_session.h +++ b/frameworks/js/napi/session/include/napi_session.h @@ -31,7 +31,7 @@ #include "napi_common_utils.h" #include "napi_structs_base.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { class NapiSession : public BaseSession { public: NapiSession(BaseClient *client, SessionParams &sessionParams, size_t argc, size_t callbackNumber); @@ -171,5 +171,5 @@ protected: private: void GetSessionFuncParameter(std::string &funcName, std::string &permissionName); }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // NAPI_SESSION_H \ No newline at end of file diff --git a/frameworks/js/napi/session/include/napi_structs_base.h b/frameworks/js/napi/session/include/napi_structs_base.h index 7d720a48..c27127cb 100644 --- a/frameworks/js/napi/session/include/napi_structs_base.h +++ b/frameworks/js/napi/session/include/napi_structs_base.h @@ -21,7 +21,7 @@ #include "business_error.h" #include "napi_common_define.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { struct SessionParams { uint32_t type; size_t callbackStartIndex; @@ -60,5 +60,5 @@ struct NapiResult { obj = nullptr; } }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // NAPI_STRUCTS_BASE_H \ No newline at end of file diff --git a/frameworks/js/napi/session/src/napi_common_utils.cpp b/frameworks/js/napi/session/src/napi_common_utils.cpp index f8dceac7..3f48eb07 100644 --- a/frameworks/js/napi/session/src/napi_common_utils.cpp +++ b/frameworks/js/napi/session/src/napi_common_utils.cpp @@ -25,7 +25,7 @@ #include "tokenid_kit.h" #include "update_define.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { constexpr int32_t STRING_MAX_LENGTH = 81920; int32_t NapiCommonUtils::GetInt32(napi_env env, napi_value arg, const std::string &attrName, int32_t &intValue) @@ -399,4 +399,4 @@ ClientStatus NapiCommonUtils::CheckNapiObjectType(napi_env env, const napi_value static_cast(type)) return ClientStatus::CLIENT_SUCCESS; } -} // namespace OHOS::UpdateEngine \ No newline at end of file +} // namespace OHOS::UpdateService \ No newline at end of file diff --git a/frameworks/js/napi/session/src/napi_session.cpp b/frameworks/js/napi/session/src/napi_session.cpp index 03d36c8f..5580cc81 100644 --- a/frameworks/js/napi/session/src/napi_session.cpp +++ b/frameworks/js/napi/session/src/napi_session.cpp @@ -23,7 +23,7 @@ using namespace std; -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { uint32_t g_sessionId = 0; NapiSession::NapiSession(BaseClient *client, SessionParams &sessionParams, size_t argc, size_t callbackNumber) @@ -103,4 +103,4 @@ void NapiSession::GetSessionFuncParameter(std::string &funcName, std::string &pe funcName = GetFunctionName(); permissionName = GetFunctionPermissionName(); } -} // namespace OHOS::UpdateEngine \ No newline at end of file +} // namespace OHOS::UpdateService \ No newline at end of file diff --git a/frameworks/js/napi/update/common/include/client_helper.h b/frameworks/js/napi/update/common/include/client_helper.h index 066f23a2..871e69b9 100644 --- a/frameworks/js/napi/update/common/include/client_helper.h +++ b/frameworks/js/napi/update/common/include/client_helper.h @@ -37,7 +37,7 @@ #include "upgrade_options.h" #include "upgrade_policy.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { class ClientHelper { public: static int32_t BuildCheckResult(napi_env env, napi_value &obj, const UpdateResult &result); @@ -76,5 +76,5 @@ private: static ClientStatus GetNetType(napi_env env, const napi_value arg, NetType &netType); static ClientStatus GetOrder(napi_env env, const napi_value arg, Order &order); }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // UPDATE_CLIENT_HELPER_H \ No newline at end of file diff --git a/frameworks/js/napi/update/common/include/iupdater.h b/frameworks/js/napi/update/common/include/iupdater.h index 5314c6ed..ff5fc638 100644 --- a/frameworks/js/napi/update/common/include/iupdater.h +++ b/frameworks/js/napi/update/common/include/iupdater.h @@ -24,7 +24,7 @@ #include "session_manager.h" #include "update_result.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { class IUpdater : public BaseClient { public: virtual ~IUpdater() {} @@ -53,5 +53,5 @@ protected: protected: std::shared_ptr sessionsMgr_ = nullptr; }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // UPDATER_INTERFACE_H \ No newline at end of file diff --git a/frameworks/js/napi/update/common/include/upgrade_file.h b/frameworks/js/napi/update/common/include/upgrade_file.h index dd111442..74da3586 100644 --- a/frameworks/js/napi/update/common/include/upgrade_file.h +++ b/frameworks/js/napi/update/common/include/upgrade_file.h @@ -20,10 +20,10 @@ #include "component_type.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { struct UpgradeFile { ComponentType fileType = ComponentType::INVALID; std::string filePath; }; -} // OHOS::UpdateEngine +} // OHOS::UpdateService #endif // UPDATE_SERVICE_UPGRADE_FILE_H diff --git a/frameworks/js/napi/update/common/src/client_helper.cpp b/frameworks/js/napi/update/common/src/client_helper.cpp index cbbdca75..be00e7e0 100644 --- a/frameworks/js/napi/update/common/src/client_helper.cpp +++ b/frameworks/js/napi/update/common/src/client_helper.cpp @@ -29,7 +29,7 @@ #include "update_define.h" #include "version_description_info.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { void ClientHelper::TrimString(std::string &str) { str.erase(0, str.find_first_not_of(" ")); @@ -686,4 +686,4 @@ ClientStatus ClientHelper::BuildEventInfo(napi_env env, napi_value &obj, const E "BuildEventInfo error, build task info fail"); return ClientStatus::CLIENT_SUCCESS; } -} // namespace OHOS::UpdateEngine \ No newline at end of file +} // namespace OHOS::UpdateService \ No newline at end of file diff --git a/frameworks/js/napi/update/common/src/iupdater.cpp b/frameworks/js/napi/update/common/src/iupdater.cpp index 44b36cb3..9d9efaac 100644 --- a/frameworks/js/napi/update/common/src/iupdater.cpp +++ b/frameworks/js/napi/update/common/src/iupdater.cpp @@ -18,7 +18,7 @@ #include "napi_common_define.h" #include "update_session.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { napi_value IUpdater::On(napi_env env, napi_callback_info info) { size_t argc = MAX_ARGC; @@ -143,4 +143,4 @@ void IUpdater::NotifyEventInfo(const EventInfo &eventInfo) EventClassifyInfo eventClassifyInfo(classify); sessionsMgr_->Emit(eventClassifyInfo, eventInfo); } -} // namespace OHOS::UpdateEngine \ No newline at end of file +} // namespace OHOS::UpdateService \ No newline at end of file diff --git a/frameworks/js/napi/update/include/define_property.h b/frameworks/js/napi/update/include/define_property.h index 3bb22694..6310155b 100644 --- a/frameworks/js/napi/update/include/define_property.h +++ b/frameworks/js/napi/update/include/define_property.h @@ -22,7 +22,7 @@ #include "js_native_api.h" #include "js_native_api_types.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { class DefineProperty { public: static void DefineProperties(napi_env env, napi_value exports); @@ -43,5 +43,5 @@ private: static void DefineUpgradeAction(napi_env env, napi_value exports); static void DefineBusinessVendor(napi_env env, napi_value exports); }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // UPDATE_DEFINE_PROPERTY_H \ No newline at end of file diff --git a/frameworks/js/napi/update/include/local_updater.h b/frameworks/js/napi/update/include/local_updater.h index 3dce891b..dd1721ec 100644 --- a/frameworks/js/napi/update/include/local_updater.h +++ b/frameworks/js/napi/update/include/local_updater.h @@ -19,7 +19,7 @@ #include "iupdater.h" #include "node_api.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { class LocalUpdater : public IUpdater { public: class Napi { @@ -43,5 +43,5 @@ public: private: bool isInit_ = false; }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // LOCAL_UPDATER_H \ No newline at end of file diff --git a/frameworks/js/napi/update/include/restorer.h b/frameworks/js/napi/update/include/restorer.h index 8af79c01..4ea68720 100644 --- a/frameworks/js/napi/update/include/restorer.h +++ b/frameworks/js/napi/update/include/restorer.h @@ -20,7 +20,7 @@ #include "iupdater.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { class Restorer : public IUpdater { public: class Napi { @@ -33,5 +33,5 @@ public: Restorer(napi_env env, napi_value thisVar); napi_value FactoryReset(napi_env env, napi_callback_info info); }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // UPDATE_CLIENT_RESTORER_H \ No newline at end of file diff --git a/frameworks/js/napi/update/include/session_manager.h b/frameworks/js/napi/update/include/session_manager.h index 38bf5dc0..826412a8 100644 --- a/frameworks/js/napi/update/include/session_manager.h +++ b/frameworks/js/napi/update/include/session_manager.h @@ -27,7 +27,7 @@ #include "event_classify_info.h" #include "event_info.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { class SessionManager { public: SessionManager(napi_env env, napi_ref thisReference); @@ -55,5 +55,5 @@ private: std::map> sessions_; std::recursive_mutex sessionMutex_; }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // UPDATE_SESSION_MGR_H \ No newline at end of file diff --git a/frameworks/js/napi/update/include/session_type.h b/frameworks/js/napi/update/include/session_type.h index 560a2aa1..39c2a2c4 100644 --- a/frameworks/js/napi/update/include/session_type.h +++ b/frameworks/js/napi/update/include/session_type.h @@ -18,7 +18,7 @@ #include -namespace OHOS::UpdateEngine::SessionType { +namespace OHOS::UpdateService::SessionType { constexpr uint32_t SESSION_CHECK_VERSION = 0; constexpr uint32_t SESSION_DOWNLOAD = 1; constexpr uint32_t SESSION_PAUSE_DOWNLOAD = 2; @@ -42,5 +42,5 @@ constexpr uint32_t SESSION_GET_CUR_VERSION_DESCRIPTION = 19; constexpr uint32_t SESSION_GET_TASK_INFO = 20; constexpr uint32_t SESSION_REPLY_PARAM_ERROR = 21; constexpr uint32_t SESSION_MAX = UINT32_MAX; -} // namespace OHOS::UpdateEngine::SessionType +} // namespace OHOS::UpdateService::SessionType #endif // UPDATE_SESSION_TYPE_H diff --git a/frameworks/js/napi/update/include/update_client.h b/frameworks/js/napi/update/include/update_client.h index dfb93d9d..32fccc2c 100644 --- a/frameworks/js/napi/update/include/update_client.h +++ b/frameworks/js/napi/update/include/update_client.h @@ -24,7 +24,7 @@ #include "task_info.h" #include "version_description_info.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { class UpdateClient : public IUpdater { public: class Napi { @@ -117,5 +117,5 @@ private: #ifdef UPDATER_UT napi_value UpdateClientInit(napi_env env, napi_value exports); #endif -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // UPDATE_CLIENT_H \ No newline at end of file diff --git a/frameworks/js/napi/update/include/update_result.h b/frameworks/js/napi/update/include/update_result.h index 435f978a..dc70413e 100644 --- a/frameworks/js/napi/update/include/update_result.h +++ b/frameworks/js/napi/update/include/update_result.h @@ -26,7 +26,7 @@ #include "upgrade_policy.h" #include "version_description_info.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { struct UpdateResult : NapiResult { public: using BuildJSObject = std::function; @@ -98,5 +98,5 @@ public: return *this; } }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // UPDATE_RESULT_H \ No newline at end of file diff --git a/frameworks/js/napi/update/include/update_session.h b/frameworks/js/napi/update/include/update_session.h index dfe615f1..7a5cc7be 100644 --- a/frameworks/js/napi/update/include/update_session.h +++ b/frameworks/js/napi/update/include/update_session.h @@ -27,7 +27,7 @@ #include "iupdater.h" #include "napi_session.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { class BaseUpdateSession : public BaseAsyncSession { public: BaseUpdateSession(BaseClient *client, SessionParams &sessionParams, size_t argc, size_t callbackNumber) @@ -175,5 +175,5 @@ public: private: static std::map sessionFuncMap_; }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // UPDATE_SESSION_H \ No newline at end of file diff --git a/frameworks/js/napi/update/src/define_property.cpp b/frameworks/js/napi/update/src/define_property.cpp index aaa3449e..4943475a 100644 --- a/frameworks/js/napi/update/src/define_property.cpp +++ b/frameworks/js/napi/update/src/define_property.cpp @@ -43,7 +43,7 @@ {StringUtils::GetEnumValueString(#item), \ NapiCommonUtils::CreateUint32(env, CAST_UINT(NapiCommonUtils::ConvertToErrorCode(item)))} -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { void DefineProperty::DefineProperties(napi_env env, napi_value exports) { DefineCallResult(env, exports); @@ -253,4 +253,4 @@ void DefineProperty::DefineBusinessVendor(napi_env env, napi_value exports) }; NapiCommonUtils::CreateProperty(env, exports, "BusinessVendor", businessVendorList); } -} // namespace OHOS::UpdateEngine \ No newline at end of file +} // namespace OHOS::UpdateService \ No newline at end of file diff --git a/frameworks/js/napi/update/src/local_updater.cpp b/frameworks/js/napi/update/src/local_updater.cpp index b3982f8f..c0c17542 100644 --- a/frameworks/js/napi/update/src/local_updater.cpp +++ b/frameworks/js/napi/update/src/local_updater.cpp @@ -20,7 +20,7 @@ #include "update_callback_info.h" #include "update_service_kits.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { const std::string MISC_FILE = "/dev/block/by-name/misc"; napi_value LocalUpdater::Napi::NapiVerifyUpgradePackage(napi_env env, napi_callback_info info) @@ -150,4 +150,4 @@ napi_value LocalUpdater::ApplyNewVersion(napi_env env, napi_callback_info info) PARAM_CHECK(retValue != nullptr, return nullptr, "Failed to ApplyNewVersion"); return retValue; } -} // namespace OHOS::UpdateEngine \ No newline at end of file +} // namespace OHOS::UpdateService \ No newline at end of file diff --git a/frameworks/js/napi/update/src/restorer.cpp b/frameworks/js/napi/update/src/restorer.cpp index dbb376b3..50a2be44 100644 --- a/frameworks/js/napi/update/src/restorer.cpp +++ b/frameworks/js/napi/update/src/restorer.cpp @@ -17,7 +17,7 @@ #include "update_service_kits.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { napi_value Restorer::Napi::FactoryReset(napi_env env, napi_callback_info info) { ENGINE_LOGI("Restorer::Napi::FactoryReset"); @@ -46,4 +46,4 @@ napi_value Restorer::FactoryReset(napi_env env, napi_callback_info info) PARAM_CHECK(retValue != nullptr, return nullptr, "Failed to FactoryReset."); return retValue; } -} // namespace OHOS::UpdateEngine \ No newline at end of file +} // namespace OHOS::UpdateService \ No newline at end of file diff --git a/frameworks/js/napi/update/src/session_manager.cpp b/frameworks/js/napi/update/src/session_manager.cpp index b18693ee..1438c87a 100644 --- a/frameworks/js/napi/update/src/session_manager.cpp +++ b/frameworks/js/napi/update/src/session_manager.cpp @@ -26,7 +26,7 @@ using namespace std; -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { SessionManager::SessionManager(napi_env env, napi_ref thisReference) : env_(env), thisReference_(thisReference) { ENGINE_LOGI("SessionManager constructor"); @@ -241,4 +241,4 @@ void SessionManager::Emit(const EventClassifyInfo &eventClassifyInfo, const Even ENGINE_LOGE("PublishToJS: Failed to SendEvent"); } } -} // namespace OHOS::UpdateEngine \ No newline at end of file +} // namespace OHOS::UpdateService \ No newline at end of file diff --git a/frameworks/js/napi/update/src/update_client.cpp b/frameworks/js/napi/update/src/update_client.cpp index a8453d65..bef79a8e 100644 --- a/frameworks/js/napi/update/src/update_client.cpp +++ b/frameworks/js/napi/update/src/update_client.cpp @@ -26,7 +26,7 @@ using namespace std; -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { napi_value UpdateClient::Napi::NapiOn(napi_env env, napi_callback_info info) { ENGINE_LOGI("UpdateClient::Napi::NapiOn"); @@ -475,4 +475,4 @@ void UpdateClient::GetUpdateResult(uint32_t type, UpdateResult &result) break; } } -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService diff --git a/frameworks/js/napi/update/src/update_module.cpp b/frameworks/js/napi/update/src/update_module.cpp index 5690ba67..a7ba23d3 100644 --- a/frameworks/js/napi/update/src/update_module.cpp +++ b/frameworks/js/napi/update/src/update_module.cpp @@ -24,7 +24,7 @@ #include "update_client.h" #include "update_define.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { // class name const std::string CLASS_NAME_UPDATE_CLIENT = "UpdateClient"; const std::string CLASS_NAME_RESTORER = "Restorer"; @@ -405,4 +405,4 @@ extern "C" __attribute__((constructor)) void RegisterModule(void) ENGINE_LOGI("RegisterModule"); napi_module_register(&g_module); } -} // namespace OHOS::UpdateEngine \ No newline at end of file +} // namespace OHOS::UpdateService \ No newline at end of file diff --git a/frameworks/js/napi/update/src/update_session.cpp b/frameworks/js/napi/update/src/update_session.cpp index abc6f49d..4226b328 100644 --- a/frameworks/js/napi/update/src/update_session.cpp +++ b/frameworks/js/napi/update/src/update_session.cpp @@ -23,7 +23,7 @@ using namespace std; -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { void UpdateAsyncession::CompleteWork(napi_env env, napi_status status) { ENGINE_LOGI("UpdateAsyncession::CompleteWork callbackNumber_: %{public}d, %{public}d", @@ -183,4 +183,4 @@ std::string SessionFuncHelper::GetFuncName(uint32_t sessionType) } return funcIter->second; } -} // namespace OHOS::UpdateEngine \ No newline at end of file +} // namespace OHOS::UpdateService \ No newline at end of file diff --git a/interfaces/inner_api/engine/IUpdateService.idl b/interfaces/inner_api/engine/IUpdateService.idl index 19d30e2e..8f3f982e 100644 --- a/interfaces/inner_api/engine/IUpdateService.idl +++ b/interfaces/inner_api/engine/IUpdateService.idl @@ -13,30 +13,30 @@ * limitations under the License. */ -package OHOS.UpdateEngine; +package OHOS.UpdateService; import callback/IUpdateCallback; -sequenceable OHOS.UpdateEngine.BusinessError; -sequenceable OHOS.UpdateEngine.CheckResult; -sequenceable OHOS.UpdateEngine.ClearOptions; -sequenceable OHOS.UpdateEngine.CurrentVersionInfo; -sequenceable OHOS.UpdateEngine.DescriptionOptions; -sequenceable OHOS.UpdateEngine.DownloadOptions; -sequenceable OHOS.UpdateEngine.NewVersionInfo; -sequenceable OHOS.UpdateEngine.PauseDownloadOptions; -sequenceable OHOS.UpdateEngine.ResumeDownloadOptions; -sequenceable OHOS.UpdateEngine.TaskInfo; -sequenceable OHOS.UpdateEngine.UpgradeInfo; -sequenceable OHOS.UpdateEngine.UpgradeOptions; -sequenceable OHOS.UpdateEngine.UpgradePolicy; -sequenceable OHOS.UpdateEngine.VersionDescriptionInfo; -sequenceable OHOS.UpdateEngine.VersionDigestInfo; +sequenceable OHOS.UpdateService.BusinessError; +sequenceable OHOS.UpdateService.CheckResult; +sequenceable OHOS.UpdateService.ClearOptions; +sequenceable OHOS.UpdateService.CurrentVersionInfo; +sequenceable OHOS.UpdateService.DescriptionOptions; +sequenceable OHOS.UpdateService.DownloadOptions; +sequenceable OHOS.UpdateService.NewVersionInfo; +sequenceable OHOS.UpdateService.PauseDownloadOptions; +sequenceable OHOS.UpdateService.ResumeDownloadOptions; +sequenceable OHOS.UpdateService.TaskInfo; +sequenceable OHOS.UpdateService.UpgradeInfo; +sequenceable OHOS.UpdateService.UpgradeOptions; +sequenceable OHOS.UpdateService.UpgradePolicy; +sequenceable OHOS.UpdateService.VersionDescriptionInfo; +sequenceable OHOS.UpdateService.VersionDigestInfo; option_stub_hooks on; option_parcel_hooks on; -interface OHOS.UpdateEngine.IUpdateService { +interface OHOS.UpdateService.IUpdateService { [ipccode 1] int CheckNewVersion([in] UpgradeInfo info, [out] BusinessError businessError, [out] CheckResult checkResult); [ipccode 2] int Download([in] UpgradeInfo info, [in] VersionDigestInfo versionDigestInfo, [in] DownloadOptions downloadOptions, [out] BusinessError businessError); diff --git a/interfaces/inner_api/engine/callback/IUpdateCallback.idl b/interfaces/inner_api/engine/callback/IUpdateCallback.idl index 034e7b9d..024ddf58 100644 --- a/interfaces/inner_api/engine/callback/IUpdateCallback.idl +++ b/interfaces/inner_api/engine/callback/IUpdateCallback.idl @@ -13,8 +13,8 @@ * limitations under the License. */ -sequenceable OHOS.UpdateEngine.EventInfo; +sequenceable OHOS.UpdateService.EventInfo; -[callback] interface OHOS.UpdateEngine.IUpdateCallback { +[callback] interface OHOS.UpdateService.IUpdateCallback { void OnEvent([in] EventInfo eventInfo) ; } diff --git a/interfaces/inner_api/engine/include/update_callback.h b/interfaces/inner_api/engine/include/update_callback.h index 3b5a1b7c..3bf20486 100644 --- a/interfaces/inner_api/engine/include/update_callback.h +++ b/interfaces/inner_api/engine/include/update_callback.h @@ -19,7 +19,7 @@ #include "update_callback_info.h" #include "update_callback_stub.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { class UpdateCallback : public UpdateCallbackStub { public: explicit UpdateCallback() = default; @@ -33,5 +33,5 @@ public: private: UpdateCallbackInfo updateCallback_{}; }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // UPDATE_CALLBACK_H \ No newline at end of file diff --git a/interfaces/inner_api/engine/include/update_service_kits_impl.h b/interfaces/inner_api/engine/include/update_service_kits_impl.h index 1f1b1b58..374b4342 100644 --- a/interfaces/inner_api/engine/include/update_service_kits_impl.h +++ b/interfaces/inner_api/engine/include/update_service_kits_impl.h @@ -25,7 +25,7 @@ #include "update_callback.h" #include "update_service_proxy.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { class UpdateServiceKitsImpl final : public UpdateServiceKits, public DelayedRefSingleton, public BaseServiceKitsImpl { @@ -101,5 +101,5 @@ private: UpgradeInfo upgradeInfo_{}; int32_t retryTimes_ = 0; }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // UPDATE_SERVICE_KITS_IMPL_H diff --git a/interfaces/inner_api/engine/src/update_callback.cpp b/interfaces/inner_api/engine/src/update_callback.cpp index 11905571..4403adf9 100644 --- a/interfaces/inner_api/engine/src/update_callback.cpp +++ b/interfaces/inner_api/engine/src/update_callback.cpp @@ -17,7 +17,7 @@ #include "update_log.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { UpdateCallback::UpdateCallback(const UpdateCallbackInfo &updateCallback) : updateCallback_(updateCallback) {} ErrCode UpdateCallback::OnEvent(const EventInfo &eventInfo) @@ -28,4 +28,4 @@ ErrCode UpdateCallback::OnEvent(const EventInfo &eventInfo) } return 0; } -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService diff --git a/interfaces/inner_api/engine/src/update_service_kits_impl.cpp b/interfaces/inner_api/engine/src/update_service_kits_impl.cpp index 0b8c48d4..225ebf10 100644 --- a/interfaces/inner_api/engine/src/update_service_kits_impl.cpp +++ b/interfaces/inner_api/engine/src/update_service_kits_impl.cpp @@ -24,7 +24,7 @@ #include "update_define.h" #include "update_log.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { UpdateServiceKits &UpdateServiceKits::GetInstance() { return DelayedRefSingleton::GetInstance(); @@ -292,4 +292,4 @@ void UpdateServiceKitsImpl::ResetService(const wptr &remote) ENGINE_LOGI("ResetService, reconnect service %{public}s", (updateService != nullptr) ? "success" : "fail"); } } -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService diff --git a/interfaces/inner_api/feature/update/api/local_updater/iservice_local_updater.h b/interfaces/inner_api/feature/update/api/local_updater/iservice_local_updater.h index ed2b03c7..c159d67f 100644 --- a/interfaces/inner_api/feature/update/api/local_updater/iservice_local_updater.h +++ b/interfaces/inner_api/feature/update/api/local_updater/iservice_local_updater.h @@ -21,7 +21,7 @@ #include "business_error.h" #include "upgrade_info.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { class IServiceLocalUpdater : public virtual RefBase { public: virtual ~IServiceLocalUpdater() = default; @@ -32,5 +32,5 @@ public: virtual int32_t VerifyUpgradePackage(const std::string &packagePath, const std::string &keyPath, BusinessError &businessError) = 0; }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // ISERVICE_LOCAL_UPDATER_H diff --git a/interfaces/inner_api/feature/update/api/online_updater/iservice_online_updater.h b/interfaces/inner_api/feature/update/api/online_updater/iservice_online_updater.h index ef26ce68..071cd4a1 100644 --- a/interfaces/inner_api/feature/update/api/online_updater/iservice_online_updater.h +++ b/interfaces/inner_api/feature/update/api/online_updater/iservice_online_updater.h @@ -35,7 +35,7 @@ #include "version_description_info.h" #include "version_digest_info.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { class IServiceOnlineUpdater : public virtual RefBase { public: virtual ~IServiceOnlineUpdater() = default; @@ -82,5 +82,5 @@ public: virtual int32_t Cancel(const UpgradeInfo &info, int32_t service, BusinessError &businessError) = 0; }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // ISERVICE_ONLINE_UPDATER_H diff --git a/interfaces/inner_api/feature/update/api/restorer/iservice_restorer.h b/interfaces/inner_api/feature/update/api/restorer/iservice_restorer.h index 857554b1..eb959aa0 100644 --- a/interfaces/inner_api/feature/update/api/restorer/iservice_restorer.h +++ b/interfaces/inner_api/feature/update/api/restorer/iservice_restorer.h @@ -20,12 +20,12 @@ #include "business_error.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { class IServiceRestorer : public virtual RefBase { public: virtual ~IServiceRestorer() = default; virtual int32_t FactoryReset(BusinessError &businessError) = 0; }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // ISERVICE_RESTORER_H diff --git a/interfaces/inner_api/feature/update/model/check/check_result.h b/interfaces/inner_api/feature/update/model/check/check_result.h index 0c0b6b51..542fb90c 100644 --- a/interfaces/inner_api/feature/update/model/check/check_result.h +++ b/interfaces/inner_api/feature/update/model/check/check_result.h @@ -19,7 +19,7 @@ #include "new_version_info.h" #include "parcel.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { struct CheckResult : public Parcelable { bool isExistNewVersion = false; NewVersionInfo newVersionInfo; @@ -28,5 +28,5 @@ struct CheckResult : public Parcelable { bool Marshalling(Parcel &parcel) const override; static CheckResult *Unmarshalling(Parcel &parcel); }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // UPDATE_SERVICE_CHECK_RESULT_H diff --git a/interfaces/inner_api/feature/update/model/check/search_status.h b/interfaces/inner_api/feature/update/model/check/search_status.h index 1a30af16..e84d31ae 100644 --- a/interfaces/inner_api/feature/update/model/check/search_status.h +++ b/interfaces/inner_api/feature/update/model/check/search_status.h @@ -16,7 +16,7 @@ #ifndef UPDATE_SERVICE_SEARCH_STATUS_H #define UPDATE_SERVICE_SEARCH_STATUS_H -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { // 搜索状态 enum class SearchStatus { NET_ERROR = -2, @@ -26,5 +26,5 @@ enum class SearchStatus { SERVER_BUSY, CHECK_EXECUTE_ERR }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // UPDATE_SERVICE_SEARCH_STATUS_H diff --git a/interfaces/inner_api/feature/update/model/check/src/check_result.cpp b/interfaces/inner_api/feature/update/model/check/src/check_result.cpp index 79f71eaa..f4288215 100644 --- a/interfaces/inner_api/feature/update/model/check/src/check_result.cpp +++ b/interfaces/inner_api/feature/update/model/check/src/check_result.cpp @@ -16,7 +16,7 @@ #include "check_result.h" #include "parcel_common.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { bool CheckResult::ReadFromParcel(Parcel &parcel) { isExistNewVersion = parcel.ReadBool(); @@ -74,4 +74,4 @@ CheckResult *CheckResult::Unmarshalling(Parcel &parcel) } return checkResult; } -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService diff --git a/interfaces/inner_api/feature/update/model/check/src/error_message.cpp b/interfaces/inner_api/feature/update/model/check/src/error_message.cpp index 7ce8ca0a..30d6a894 100644 --- a/interfaces/inner_api/feature/update/model/check/src/error_message.cpp +++ b/interfaces/inner_api/feature/update/model/check/src/error_message.cpp @@ -17,7 +17,7 @@ #include -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { bool ErrorMessage::ReadFromParcel(Parcel &parcel) { errorCode = parcel.ReadInt32(); @@ -47,4 +47,4 @@ ErrorMessage *ErrorMessage::Unmarshalling(Parcel &parcel) } return errorMessage; } -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService diff --git a/interfaces/inner_api/feature/update/model/clear/clear_options.h b/interfaces/inner_api/feature/update/model/clear/clear_options.h index ce926939..30979bd9 100644 --- a/interfaces/inner_api/feature/update/model/clear/clear_options.h +++ b/interfaces/inner_api/feature/update/model/clear/clear_options.h @@ -19,7 +19,7 @@ #include "upgrade_status.h" #include "parcel.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { struct ClearOptions : public Parcelable { UpgradeStatus status = UpgradeStatus::INIT; @@ -27,5 +27,5 @@ struct ClearOptions : public Parcelable { bool Marshalling(Parcel &parcel) const override; static ClearOptions *Unmarshalling(Parcel &parcel); }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // UPDATE_SERVICE_CLEAR_OPTIONS_H diff --git a/interfaces/inner_api/feature/update/model/common/base_json_struct.h b/interfaces/inner_api/feature/update/model/common/base_json_struct.h index fb816966..15030839 100644 --- a/interfaces/inner_api/feature/update/model/common/base_json_struct.h +++ b/interfaces/inner_api/feature/update/model/common/base_json_struct.h @@ -20,7 +20,7 @@ #include "json_builder.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { struct BaseJsonStruct { virtual ~BaseJsonStruct() = default; @@ -31,5 +31,5 @@ struct BaseJsonStruct { return GetJsonBuilder().ToJson(); }; }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // UPDATE_SERVICE_BASE_JSON_STRUCT_H diff --git a/interfaces/inner_api/feature/update/model/common/order.h b/interfaces/inner_api/feature/update/model/common/order.h index b7c9d14e..971e630e 100644 --- a/interfaces/inner_api/feature/update/model/common/order.h +++ b/interfaces/inner_api/feature/update/model/common/order.h @@ -16,7 +16,7 @@ #ifndef UPDATE_SERVICE_ORDER_H #define UPDATE_SERVICE_ORDER_H -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { enum class Order { DOWNLOAD = 1, INSTALL = 2, @@ -26,5 +26,5 @@ enum class Order { TRANSFER = 8, TRANSFER_AND_APPLY = TRANSFER | APPLY }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // UPDATE_SERVICE_ORDER_H diff --git a/interfaces/inner_api/feature/update/model/common/parcel_common.h b/interfaces/inner_api/feature/update/model/common/parcel_common.h index 3866aadc..25b0dad1 100644 --- a/interfaces/inner_api/feature/update/model/common/parcel_common.h +++ b/interfaces/inner_api/feature/update/model/common/parcel_common.h @@ -16,7 +16,7 @@ #ifndef UPDATE_SERVICE_PARCEL_COMMON_H #define UPDATE_SERVICE_PARCEL_COMMON_H -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { static constexpr int32_t MAX_VECTOR_SIZE = 128; -} // OHOS::UpdateEngine +} // OHOS::UpdateService #endif // UPDATE_SERVICE_PARCEL_COMMON_H diff --git a/interfaces/inner_api/feature/update/model/common/progress.h b/interfaces/inner_api/feature/update/model/common/progress.h index aaed216c..6263897a 100644 --- a/interfaces/inner_api/feature/update/model/common/progress.h +++ b/interfaces/inner_api/feature/update/model/common/progress.h @@ -21,11 +21,11 @@ #include "upgrade_status.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { struct Progress { uint32_t percent = 0; UpgradeStatus status = UpgradeStatus::INIT; std::string endReason; }; -} // OHOS::UpdateEngine +} // OHOS::UpdateService #endif // UPDATE_SERVICE_PROGRESS_H diff --git a/interfaces/inner_api/feature/update/model/common/upgrade_status.h b/interfaces/inner_api/feature/update/model/common/upgrade_status.h index 9a67ce50..2ce6e542 100644 --- a/interfaces/inner_api/feature/update/model/common/upgrade_status.h +++ b/interfaces/inner_api/feature/update/model/common/upgrade_status.h @@ -16,7 +16,7 @@ #ifndef UPDATE_SERVICE_UPGRADE_STATUS_H #define UPDATE_SERVICE_UPGRADE_STATUS_H -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { enum class UpgradeStatus { ERROR = -1, INIT = 0, @@ -50,5 +50,5 @@ enum class UpgradeStatus { UPGRADE_COUNT_DOWN = 100, UPGRADE_CANCEL }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // UPDATE_SERVICE_UPGRADE_STATUS_H diff --git a/interfaces/inner_api/feature/update/model/download/download_options.h b/interfaces/inner_api/feature/update/model/download/download_options.h index 19efb065..621bc174 100644 --- a/interfaces/inner_api/feature/update/model/download/download_options.h +++ b/interfaces/inner_api/feature/update/model/download/download_options.h @@ -21,7 +21,7 @@ #include "parcel.h" #include "update_log.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { struct DownloadOptions : public Parcelable { NetType allowNetwork = NetType::WIFI; Order order = Order::DOWNLOAD; @@ -30,5 +30,5 @@ struct DownloadOptions : public Parcelable { bool Marshalling(Parcel &parcel) const override; static DownloadOptions *Unmarshalling(Parcel &parcel); }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // UPDATE_SERVICE_DOWNLOAD_OPTIONS_H diff --git a/interfaces/inner_api/feature/update/model/download/pause_download_options.h b/interfaces/inner_api/feature/update/model/download/pause_download_options.h index e77d514d..0f98ec08 100644 --- a/interfaces/inner_api/feature/update/model/download/pause_download_options.h +++ b/interfaces/inner_api/feature/update/model/download/pause_download_options.h @@ -18,7 +18,7 @@ #include "parcel.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { struct PauseDownloadOptions : public Parcelable { bool isAllowAutoResume = false; @@ -26,5 +26,5 @@ struct PauseDownloadOptions : public Parcelable { bool Marshalling(Parcel &parcel) const override; static PauseDownloadOptions *Unmarshalling(Parcel &parcel); }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // UPDATE_SERVICE_PAUSE_DOWNLOAD_OPTIONS_H diff --git a/interfaces/inner_api/feature/update/model/download/resume_download_options.h b/interfaces/inner_api/feature/update/model/download/resume_download_options.h index d2d1c801..31f68399 100644 --- a/interfaces/inner_api/feature/update/model/download/resume_download_options.h +++ b/interfaces/inner_api/feature/update/model/download/resume_download_options.h @@ -19,7 +19,7 @@ #include "network_type.h" #include "parcel.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { struct ResumeDownloadOptions : public Parcelable { NetType allowNetwork = NetType::WIFI; @@ -27,5 +27,5 @@ struct ResumeDownloadOptions : public Parcelable { bool Marshalling(Parcel &parcel) const override; static ResumeDownloadOptions *Unmarshalling(Parcel &parcel); }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // UPDATE_SERVICE_RESUME_DOWNLOAD_OPTIONS_H diff --git a/interfaces/inner_api/feature/update/model/event/event_classify.h b/interfaces/inner_api/feature/update/model/event/event_classify.h index 58f6dc40..187b672d 100644 --- a/interfaces/inner_api/feature/update/model/event/event_classify.h +++ b/interfaces/inner_api/feature/update/model/event/event_classify.h @@ -18,7 +18,7 @@ #include -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { enum class EventClassify { TASK = 0x01000000, SYSTEM = 0x02000000, @@ -27,5 +27,5 @@ enum class EventClassify { const std::list g_eventClassifyList = { EventClassify::TASK, EventClassify::SYSTEM, EventClassify::COMMAND }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // UPDATE_SERVICE_EVENT_CLASSIFY_H diff --git a/interfaces/inner_api/feature/update/model/event/event_id.h b/interfaces/inner_api/feature/update/model/event/event_id.h index a50dd0c9..0f9b54d9 100644 --- a/interfaces/inner_api/feature/update/model/event/event_id.h +++ b/interfaces/inner_api/feature/update/model/event/event_id.h @@ -19,7 +19,7 @@ #include "event_classify.h" #include "update_define.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { enum class EventId { EVENT_TASK_BASE = CAST_UINT(EventClassify::TASK), EVENT_TASK_RECEIVE, @@ -56,5 +56,5 @@ enum class EventId { COMMAND_BASE = CAST_UINT(EventClassify::COMMAND), EVENT_INITIALIZE, }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // UPDATE_SERVICE_EVENT_ID_H diff --git a/interfaces/inner_api/feature/update/model/event/event_info.h b/interfaces/inner_api/feature/update/model/event/event_info.h index 8c98fd2f..75b4e282 100644 --- a/interfaces/inner_api/feature/update/model/event/event_info.h +++ b/interfaces/inner_api/feature/update/model/event/event_info.h @@ -25,7 +25,7 @@ #include "task_body.h" #include "version_component.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { struct EventInfo : public BaseJsonStruct, public Parcelable { EventId eventId = EventId::EVENT_TASK_BASE; TaskBody taskBody; @@ -39,5 +39,5 @@ struct EventInfo : public BaseJsonStruct, public Parcelable { bool Marshalling(Parcel &parcel) const override; static EventInfo *Unmarshalling(Parcel &parcel); }; -} // OHOS::UpdateEngine +} // OHOS::UpdateService #endif // UPDATE_SERVICE_EVENT_INFO_H diff --git a/interfaces/inner_api/feature/update/model/event/on_off/event_classify_info.h b/interfaces/inner_api/feature/update/model/event/on_off/event_classify_info.h index 5c88b568..767fed76 100644 --- a/interfaces/inner_api/feature/update/model/event/on_off/event_classify_info.h +++ b/interfaces/inner_api/feature/update/model/event/on_off/event_classify_info.h @@ -20,7 +20,7 @@ #include "event_classify.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { struct EventClassifyInfo { EventClassify eventClassify = EventClassify::TASK; std::string extraInfo; @@ -29,5 +29,5 @@ struct EventClassifyInfo { explicit EventClassifyInfo(EventClassify classify) : eventClassify(classify) {} EventClassifyInfo(EventClassify classify, const std::string &info) : eventClassify(classify), extraInfo(info) {} }; -} // OHOS::UpdateEngine +} // OHOS::UpdateService #endif // UPDATE_SERVICE_EVENT_CLASSIFY_INFO_H diff --git a/interfaces/inner_api/feature/update/model/event/src/event_info.cpp b/interfaces/inner_api/feature/update/model/event/src/event_info.cpp index 477f6d88..a47df7ea 100644 --- a/interfaces/inner_api/feature/update/model/event/src/event_info.cpp +++ b/interfaces/inner_api/feature/update/model/event/src/event_info.cpp @@ -17,7 +17,7 @@ #include "update_define.h" #include "update_log.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { JsonBuilder EventInfo::GetJsonBuilder() { return JsonBuilder() @@ -65,4 +65,4 @@ EventInfo *EventInfo::Unmarshalling(Parcel &parcel) } return eventInfo; } -} // namespace OHOS::UpdateEngine \ No newline at end of file +} // namespace OHOS::UpdateService \ No newline at end of file diff --git a/interfaces/inner_api/feature/update/model/event/update_callback_info.h b/interfaces/inner_api/feature/update/model/event/update_callback_info.h index 32777c56..964c10b8 100644 --- a/interfaces/inner_api/feature/update/model/event/update_callback_info.h +++ b/interfaces/inner_api/feature/update/model/event/update_callback_info.h @@ -18,12 +18,12 @@ #include "event_info.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { using OnEvent = std::function; // 回调函数 struct UpdateCallbackInfo { OnEvent onEvent; }; -} // OHOS::UpdateEngine +} // OHOS::UpdateService #endif // UPDATE_SERVICE_UPDATE_CALLBACK_INFO_H diff --git a/interfaces/inner_api/feature/update/model/install/install_mode.h b/interfaces/inner_api/feature/update/model/install/install_mode.h index ba0a4c1f..3229debd 100644 --- a/interfaces/inner_api/feature/update/model/install/install_mode.h +++ b/interfaces/inner_api/feature/update/model/install/install_mode.h @@ -16,11 +16,11 @@ #ifndef UPDATE_SERVICE_INSTALL_MODE_H #define UPDATE_SERVICE_INSTALL_MODE_H -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { enum class InstallMode { NORMAL = 0, NIGHT, AUTO }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // UPDATE_SERVICE_INSTALL_MODE_H diff --git a/interfaces/inner_api/feature/update/model/policy/src/upgrade_policy.cpp b/interfaces/inner_api/feature/update/model/policy/src/upgrade_policy.cpp index a06be51b..40efa392 100644 --- a/interfaces/inner_api/feature/update/model/policy/src/upgrade_policy.cpp +++ b/interfaces/inner_api/feature/update/model/policy/src/upgrade_policy.cpp @@ -18,7 +18,7 @@ #include "parcel_common.h" #include "update_define.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { bool UpgradePolicy::ReadFromParcel(Parcel &parcel) { downloadStrategy = static_cast(parcel.ReadBool()); @@ -76,4 +76,4 @@ UpgradePolicy *UpgradePolicy::Unmarshalling(Parcel &parcel) } return upgradePolicy; } -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService diff --git a/interfaces/inner_api/feature/update/model/policy/upgrade_period.h b/interfaces/inner_api/feature/update/model/policy/upgrade_period.h index e5dabf25..febae208 100644 --- a/interfaces/inner_api/feature/update/model/policy/upgrade_period.h +++ b/interfaces/inner_api/feature/update/model/policy/upgrade_period.h @@ -18,10 +18,10 @@ #include -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { struct UpgradePeriod { uint32_t start = 0; uint32_t end = 0; }; -} // OHOS::UpdateEngine +} // OHOS::UpdateService #endif // UPDATE_SERVICE_UPGRADE_PERIOD_H diff --git a/interfaces/inner_api/feature/update/model/policy/upgrade_policy.h b/interfaces/inner_api/feature/update/model/policy/upgrade_policy.h index 45dfd942..801bb538 100644 --- a/interfaces/inner_api/feature/update/model/policy/upgrade_policy.h +++ b/interfaces/inner_api/feature/update/model/policy/upgrade_policy.h @@ -19,7 +19,7 @@ #include "upgrade_period.h" #include "parcel.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { struct UpgradePolicy : public Parcelable { bool downloadStrategy = false; bool autoUpgradeStrategy = false; @@ -29,5 +29,5 @@ struct UpgradePolicy : public Parcelable { bool Marshalling(Parcel &parcel) const override; static UpgradePolicy *Unmarshalling(Parcel &parcel); }; -} // OHOS::UpdateEngine +} // OHOS::UpdateService #endif // UPDATE_SERVICE_UPGRADE_POLICY_H diff --git a/interfaces/inner_api/feature/update/model/subscribe/src/subscribe_info.cpp b/interfaces/inner_api/feature/update/model/subscribe/src/subscribe_info.cpp index dc619e52..f962872a 100644 --- a/interfaces/inner_api/feature/update/model/subscribe/src/subscribe_info.cpp +++ b/interfaces/inner_api/feature/update/model/subscribe/src/subscribe_info.cpp @@ -15,7 +15,7 @@ #include "subscribe_info.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { JsonBuilder SubscribeInfo::GetJsonBuilder() { return JsonBuilder() @@ -29,4 +29,4 @@ JsonBuilder SubscribeInfo::GetJsonBuilder() .Append("deviceName", deviceName) .Append("}"); } -} // namespace OHOS::UpdateEngine \ No newline at end of file +} // namespace OHOS::UpdateService \ No newline at end of file diff --git a/interfaces/inner_api/feature/update/model/subscribe/subscribe_info.h b/interfaces/inner_api/feature/update/model/subscribe/subscribe_info.h index 7f49f58c..391133b1 100644 --- a/interfaces/inner_api/feature/update/model/subscribe/subscribe_info.h +++ b/interfaces/inner_api/feature/update/model/subscribe/subscribe_info.h @@ -22,7 +22,7 @@ #include "business_type.h" #include "update_device_type.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { const std::string UPDATE_APP_PACKAGE_NAME = "com.ohos.updateapp"; const std::string UPDATE_APP_SERVICE_EXT_ABILITY_NAME = "ServiceExtAbility"; constexpr int32_t UPDATE_APP_TIMEOUT = 15; @@ -46,5 +46,5 @@ struct SubscribeInfo : public BaseJsonStruct { JsonBuilder GetJsonBuilder() final; }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // UPDATE_SERVICE_SUBSCRIBE_INFO_H diff --git a/interfaces/inner_api/feature/update/model/task/src/task_body.cpp b/interfaces/inner_api/feature/update/model/task/src/task_body.cpp index 1d9d6955..c3ad60c1 100644 --- a/interfaces/inner_api/feature/update/model/task/src/task_body.cpp +++ b/interfaces/inner_api/feature/update/model/task/src/task_body.cpp @@ -19,7 +19,7 @@ #include "task_body_member_mask.h" #include "update_log.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { JsonBuilder GetJsonBuilder(VersionComponent &versionComponent) { return versionComponent.GetJsonBuilder(); @@ -152,4 +152,4 @@ TaskBody *TaskBody::Unmarshalling(Parcel &parcel) } return taskBody; } -} // namespace OHOS::UpdateEngine \ No newline at end of file +} // namespace OHOS::UpdateService \ No newline at end of file diff --git a/interfaces/inner_api/feature/update/model/task/src/task_info.cpp b/interfaces/inner_api/feature/update/model/task/src/task_info.cpp index 7c52c3d2..6947ab0a 100644 --- a/interfaces/inner_api/feature/update/model/task/src/task_info.cpp +++ b/interfaces/inner_api/feature/update/model/task/src/task_info.cpp @@ -16,7 +16,7 @@ #include "task_info.h" #include "update_log.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { bool TaskInfo::ReadFromParcel(Parcel &parcel) { existTask = parcel.ReadBool(); @@ -55,4 +55,4 @@ TaskInfo *TaskInfo::Unmarshalling(Parcel &parcel) } return taskInfo; } -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService diff --git a/interfaces/inner_api/feature/update/model/task/task_body.h b/interfaces/inner_api/feature/update/model/task/task_body.h index f6f4067c..f450ca41 100644 --- a/interfaces/inner_api/feature/update/model/task/task_body.h +++ b/interfaces/inner_api/feature/update/model/task/task_body.h @@ -25,7 +25,7 @@ #include "version_digest_info.h" #include "version_component.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { struct TaskBody : public Parcelable { VersionDigestInfo versionDigestInfo; UpgradeStatus status = UpgradeStatus::INIT; @@ -41,5 +41,5 @@ struct TaskBody : public Parcelable { bool Marshalling(Parcel &parcel) const override; static TaskBody *Unmarshalling(Parcel &parcel); }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // UPDATE_SERVICE_TASK_BODY_H diff --git a/interfaces/inner_api/feature/update/model/task/task_body_member_mask.h b/interfaces/inner_api/feature/update/model/task/task_body_member_mask.h index 4163af3a..bff2cc18 100644 --- a/interfaces/inner_api/feature/update/model/task/task_body_member_mask.h +++ b/interfaces/inner_api/feature/update/model/task/task_body_member_mask.h @@ -20,7 +20,7 @@ #include "event_id.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { enum TaskBodyMemberMask { VERSION_DIGEST_INFO = 0x00000001, UPGRADE_STATUS = 0x00000010, @@ -62,5 +62,5 @@ const std::map g_taskBodyTemplateMap = { { EventId::EVENT_AUTH_SUCCESS, VERSION_DIGEST_INFO | VERSION_COMPONENT | UPGRADE_STATUS }, { EventId::EVENT_INITIALIZE, UPGRADE_STATUS }, }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // UPDATE_SERVICE_TASK_BODY_MEMBER_MASK_H diff --git a/interfaces/inner_api/feature/update/model/task/task_info.h b/interfaces/inner_api/feature/update/model/task/task_info.h index d8538171..b7631b73 100644 --- a/interfaces/inner_api/feature/update/model/task/task_info.h +++ b/interfaces/inner_api/feature/update/model/task/task_info.h @@ -20,7 +20,7 @@ #include "task_body.h" #include "parcel.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { struct TaskInfo : public Parcelable { bool existTask = false; TaskBody taskBody; @@ -29,5 +29,5 @@ struct TaskInfo : public Parcelable { bool Marshalling(Parcel &parcel) const override; static TaskInfo *Unmarshalling(Parcel &parcel); }; -} // OHOS::UpdateEngine +} // OHOS::UpdateService #endif // UPDATE_SERVICE_TASK_INFO_H diff --git a/interfaces/inner_api/feature/update/model/upgrade/upgrade_interval.h b/interfaces/inner_api/feature/update/model/upgrade/upgrade_interval.h index af12b11d..5a706fbb 100644 --- a/interfaces/inner_api/feature/update/model/upgrade/upgrade_interval.h +++ b/interfaces/inner_api/feature/update/model/upgrade/upgrade_interval.h @@ -18,10 +18,10 @@ #include -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { struct UpgradeInterval { uint64_t timeStart = 0; uint64_t timeEnd = 0; }; -} // OHOS::UpdateEngine +} // OHOS::UpdateService #endif // UPDATE_SERVICE_UPGRADE_INTERVAL_H diff --git a/interfaces/inner_api/feature/update/model/upgrade/upgrade_options.h b/interfaces/inner_api/feature/update/model/upgrade/upgrade_options.h index 9c4a5a22..47c9d13f 100644 --- a/interfaces/inner_api/feature/update/model/upgrade/upgrade_options.h +++ b/interfaces/inner_api/feature/update/model/upgrade/upgrade_options.h @@ -19,7 +19,7 @@ #include "order.h" #include "parcel.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { struct UpgradeOptions : public Parcelable { Order order = Order::INSTALL; @@ -27,5 +27,5 @@ struct UpgradeOptions : public Parcelable { bool Marshalling(Parcel &parcel) const override; static UpgradeOptions *Unmarshalling(Parcel &parcel); }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // UPDATE_SERVICE_UPGRADE_OPTIONS_H diff --git a/interfaces/inner_api/feature/update/model/upgrade_info/business_sub_type.h b/interfaces/inner_api/feature/update/model/upgrade_info/business_sub_type.h index 935c148a..88168af5 100644 --- a/interfaces/inner_api/feature/update/model/upgrade_info/business_sub_type.h +++ b/interfaces/inner_api/feature/update/model/upgrade_info/business_sub_type.h @@ -16,7 +16,7 @@ #ifndef UPDATE_SERVICE_BUSINESS_SUB_TYPE_H #define UPDATE_SERVICE_BUSINESS_SUB_TYPE_H -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { enum class BusinessSubType { START_UP = 0, FIRMWARE = 1, @@ -25,5 +25,5 @@ enum class BusinessSubType { ACCESSORY = 4, ASSIST = 5 }; -} // namespace OHOS::UpdateEngine: +} // namespace OHOS::UpdateService: #endif // UPDATE_SERVICE_BUSINESS_SUB_TYPE_H diff --git a/interfaces/inner_api/feature/update/model/upgrade_info/business_type.h b/interfaces/inner_api/feature/update/model/upgrade_info/business_type.h index 72ccfc03..4d55d7c3 100644 --- a/interfaces/inner_api/feature/update/model/upgrade_info/business_type.h +++ b/interfaces/inner_api/feature/update/model/upgrade_info/business_type.h @@ -23,7 +23,7 @@ #include "business_vendor.h" #include "update_define.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { struct BusinessType : public BaseJsonStruct { std::string vendor; // BusinessVendor BusinessSubType subType = BusinessSubType::FIRMWARE; @@ -48,5 +48,5 @@ struct BusinessType : public BaseJsonStruct { JsonBuilder GetJsonBuilder() final; }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // UPDATE_SERVICE_BUSINESS_TYPE_H diff --git a/interfaces/inner_api/feature/update/model/upgrade_info/business_vendor.h b/interfaces/inner_api/feature/update/model/upgrade_info/business_vendor.h index a6732da0..979f39fa 100644 --- a/interfaces/inner_api/feature/update/model/upgrade_info/business_vendor.h +++ b/interfaces/inner_api/feature/update/model/upgrade_info/business_vendor.h @@ -16,10 +16,10 @@ #ifndef UPDATE_SERVICE_BUSINESS_VENDOR_H #define UPDATE_SERVICE_BUSINESS_VENDOR_H -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { class BusinessVendor { public: static constexpr const char *PUBLIC = "public"; }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // UPDATE_SERVICE_BUSINESS_VENDOR_H diff --git a/interfaces/inner_api/feature/update/model/upgrade_info/src/business_error.cpp b/interfaces/inner_api/feature/update/model/upgrade_info/src/business_error.cpp index e32e3228..41ab1292 100644 --- a/interfaces/inner_api/feature/update/model/upgrade_info/src/business_error.cpp +++ b/interfaces/inner_api/feature/update/model/upgrade_info/src/business_error.cpp @@ -16,7 +16,7 @@ #include "business_error.h" #include "parcel_common.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { bool BusinessError::ReadFromParcel(Parcel &parcel) { message = Str16ToStr8(parcel.ReadString16()); @@ -76,4 +76,4 @@ BusinessError *BusinessError::Unmarshalling(Parcel &parcel) } return businessError; } -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService diff --git a/interfaces/inner_api/feature/update/model/upgrade_info/src/business_type.cpp b/interfaces/inner_api/feature/update/model/upgrade_info/src/business_type.cpp index 1cb14a37..0343a2fb 100644 --- a/interfaces/inner_api/feature/update/model/upgrade_info/src/business_type.cpp +++ b/interfaces/inner_api/feature/update/model/upgrade_info/src/business_type.cpp @@ -15,7 +15,7 @@ #include "business_type.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { JsonBuilder BusinessType::GetJsonBuilder() { return JsonBuilder() @@ -24,4 +24,4 @@ JsonBuilder BusinessType::GetJsonBuilder() .Append("subType", CAST_INT(subType)) .Append("}"); } -} // namespace OHOS::UpdateEngine \ No newline at end of file +} // namespace OHOS::UpdateService \ No newline at end of file diff --git a/interfaces/inner_api/feature/update/model/upgrade_info/src/clear_options.cpp b/interfaces/inner_api/feature/update/model/upgrade_info/src/clear_options.cpp index 0a267832..7d4339a4 100644 --- a/interfaces/inner_api/feature/update/model/upgrade_info/src/clear_options.cpp +++ b/interfaces/inner_api/feature/update/model/upgrade_info/src/clear_options.cpp @@ -17,7 +17,7 @@ #include "update_log.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { bool ClearOptions::ReadFromParcel(Parcel &parcel) { status = static_cast(parcel.ReadUint32()); @@ -48,4 +48,4 @@ ClearOptions *ClearOptions::Unmarshalling(Parcel &parcel) } return clearOptions; } -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService diff --git a/interfaces/inner_api/feature/update/model/upgrade_info/src/download_options.cpp b/interfaces/inner_api/feature/update/model/upgrade_info/src/download_options.cpp index a833bb62..f75ea354 100644 --- a/interfaces/inner_api/feature/update/model/upgrade_info/src/download_options.cpp +++ b/interfaces/inner_api/feature/update/model/upgrade_info/src/download_options.cpp @@ -16,7 +16,7 @@ #include "download_options.h" #include "update_log.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { bool DownloadOptions::ReadFromParcel(Parcel &parcel) { allowNetwork = static_cast(parcel.ReadUint32()); @@ -53,4 +53,4 @@ DownloadOptions *DownloadOptions::Unmarshalling(Parcel &parcel) } return downloadOptions; } -} // namespace OHOS::UpdateEngine \ No newline at end of file +} // namespace OHOS::UpdateService \ No newline at end of file diff --git a/interfaces/inner_api/feature/update/model/upgrade_info/src/pause_download_options.cpp b/interfaces/inner_api/feature/update/model/upgrade_info/src/pause_download_options.cpp index 64f5bdb6..7760fb15 100644 --- a/interfaces/inner_api/feature/update/model/upgrade_info/src/pause_download_options.cpp +++ b/interfaces/inner_api/feature/update/model/upgrade_info/src/pause_download_options.cpp @@ -16,7 +16,7 @@ #include "pause_download_options.h" #include "update_log.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { bool PauseDownloadOptions::ReadFromParcel(Parcel &parcel) { isAllowAutoResume = parcel.ReadBool(); @@ -47,4 +47,4 @@ PauseDownloadOptions *PauseDownloadOptions::Unmarshalling(Parcel &parcel) } return pauseDownloadOptions; } -} // namespace OHOS::UpdateEngine \ No newline at end of file +} // namespace OHOS::UpdateService \ No newline at end of file diff --git a/interfaces/inner_api/feature/update/model/upgrade_info/src/resume_download_options.cpp b/interfaces/inner_api/feature/update/model/upgrade_info/src/resume_download_options.cpp index 8b50b184..6659db8a 100644 --- a/interfaces/inner_api/feature/update/model/upgrade_info/src/resume_download_options.cpp +++ b/interfaces/inner_api/feature/update/model/upgrade_info/src/resume_download_options.cpp @@ -16,7 +16,7 @@ #include "resume_download_options.h" #include "update_log.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { bool ResumeDownloadOptions::ReadFromParcel(Parcel &parcel) { allowNetwork = static_cast(parcel.ReadUint32()); @@ -47,4 +47,4 @@ ResumeDownloadOptions *ResumeDownloadOptions::Unmarshalling(Parcel &parcel) } return resumeDownloadOptions; } -} // namespace OHOS::UpdateEngine \ No newline at end of file +} // namespace OHOS::UpdateService \ No newline at end of file diff --git a/interfaces/inner_api/feature/update/model/upgrade_info/src/upgrade_info.cpp b/interfaces/inner_api/feature/update/model/upgrade_info/src/upgrade_info.cpp index 4a175fe2..c16b9eb5 100644 --- a/interfaces/inner_api/feature/update/model/upgrade_info/src/upgrade_info.cpp +++ b/interfaces/inner_api/feature/update/model/upgrade_info/src/upgrade_info.cpp @@ -17,7 +17,7 @@ #include "upgrade_info.h" #include "update_define.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { std::string UpgradeInfo::ToString() const { std::string output = "upgradeApp:" + upgradeApp; @@ -94,4 +94,4 @@ UpgradeInfo *UpgradeInfo::Unmarshalling(Parcel &parcel) } return upgradeInfo; } -} // namespace OHOS::UpdateEngine \ No newline at end of file +} // namespace OHOS::UpdateService \ No newline at end of file diff --git a/interfaces/inner_api/feature/update/model/upgrade_info/src/upgrade_options.cpp b/interfaces/inner_api/feature/update/model/upgrade_info/src/upgrade_options.cpp index bd202678..a92e1e11 100644 --- a/interfaces/inner_api/feature/update/model/upgrade_info/src/upgrade_options.cpp +++ b/interfaces/inner_api/feature/update/model/upgrade_info/src/upgrade_options.cpp @@ -16,7 +16,7 @@ #include "upgrade_options.h" #include "update_log.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { bool UpgradeOptions::ReadFromParcel(Parcel &parcel) { order = static_cast(parcel.ReadUint32()); @@ -47,4 +47,4 @@ UpgradeOptions *UpgradeOptions::Unmarshalling(Parcel &parcel) } return upgradeOptions; } -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService diff --git a/interfaces/inner_api/feature/update/model/upgrade_info/upgrade_info.h b/interfaces/inner_api/feature/update/model/upgrade_info/upgrade_info.h index b63f6be3..52f2bca3 100644 --- a/interfaces/inner_api/feature/update/model/upgrade_info/upgrade_info.h +++ b/interfaces/inner_api/feature/update/model/upgrade_info/upgrade_info.h @@ -23,7 +23,7 @@ #include "parcel.h" #include "update_device_type.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { const std::string LOCAL_UPGRADE_INFO = "LocalUpgradeInfo"; struct UpgradeInfo : public Parcelable { std::string upgradeApp; @@ -73,5 +73,5 @@ struct UpgradeInfo : public Parcelable { bool Marshalling(Parcel &parcel) const override; static UpgradeInfo *Unmarshalling(Parcel &parcel); }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // UPDATE_SERVICE_UPGRADE_INFO_H diff --git a/interfaces/inner_api/feature/update/model/version_info/component_type.h b/interfaces/inner_api/feature/update/model/version_info/component_type.h index 55538de9..5665ee8b 100644 --- a/interfaces/inner_api/feature/update/model/version_info/component_type.h +++ b/interfaces/inner_api/feature/update/model/version_info/component_type.h @@ -16,7 +16,7 @@ #ifndef UPDATE_SERVICE_COMPONENT_TYPE_H #define UPDATE_SERVICE_COMPONENT_TYPE_H -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { enum class ComponentType { INVALID = 0, OTA = 1, @@ -25,5 +25,5 @@ enum class ComponentType { PARAM = 8, SA = 16 }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // UPDATE_SERVICE_COMPONENT_TYPE_H diff --git a/interfaces/inner_api/feature/update/model/version_info/current_version/current_version_info.h b/interfaces/inner_api/feature/update/model/version_info/current_version/current_version_info.h index d6cd54ae..71b180f4 100644 --- a/interfaces/inner_api/feature/update/model/version_info/current_version/current_version_info.h +++ b/interfaces/inner_api/feature/update/model/version_info/current_version/current_version_info.h @@ -24,7 +24,7 @@ #include "parcel.h" #include "version_component.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { struct CurrentVersionInfo : public Parcelable { std::string osVersion; std::string deviceName; @@ -34,5 +34,5 @@ struct CurrentVersionInfo : public Parcelable { bool Marshalling(Parcel &parcel) const override; static CurrentVersionInfo *Unmarshalling(Parcel &parcel); }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // UPDATE_SERVICE_CURRENT_VERSION_INFO_H diff --git a/interfaces/inner_api/feature/update/model/version_info/current_version/src/current_version_info.cpp b/interfaces/inner_api/feature/update/model/version_info/current_version/src/current_version_info.cpp index 79c22c64..49e92a33 100644 --- a/interfaces/inner_api/feature/update/model/version_info/current_version/src/current_version_info.cpp +++ b/interfaces/inner_api/feature/update/model/version_info/current_version/src/current_version_info.cpp @@ -17,7 +17,7 @@ #include "parcel_common.h" #include "update_log.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { bool CurrentVersionInfo::ReadFromParcel(Parcel &parcel) { @@ -76,4 +76,4 @@ CurrentVersionInfo *CurrentVersionInfo::Unmarshalling(Parcel &parcel) } return currentVersionInfo; } -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService diff --git a/interfaces/inner_api/feature/update/model/version_info/description/component_description.h b/interfaces/inner_api/feature/update/model/version_info/description/component_description.h index 2130b296..08abdb00 100644 --- a/interfaces/inner_api/feature/update/model/version_info/description/component_description.h +++ b/interfaces/inner_api/feature/update/model/version_info/description/component_description.h @@ -21,7 +21,7 @@ #include "description_info.h" #include "parcel.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { struct ComponentDescription : public Parcelable { std::string componentId; DescriptionInfo descriptionInfo; @@ -31,5 +31,5 @@ struct ComponentDescription : public Parcelable { bool Marshalling(Parcel &parcel) const override; static ComponentDescription *Unmarshalling(Parcel &parcel); }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // UPDATE_SERVICE_COMPONENT_DESCRIPTION_H diff --git a/interfaces/inner_api/feature/update/model/version_info/description/description_format.h b/interfaces/inner_api/feature/update/model/version_info/description/description_format.h index 0d266d75..1dead826 100644 --- a/interfaces/inner_api/feature/update/model/version_info/description/description_format.h +++ b/interfaces/inner_api/feature/update/model/version_info/description/description_format.h @@ -16,10 +16,10 @@ #ifndef UPDATE_SERVICE_DESCRIPTION_FORMAT_H #define UPDATE_SERVICE_DESCRIPTION_FORMAT_H -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { enum class DescriptionFormat { STANDARD = 0, SIMPLIFIED = 1 }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // UPDATE_SERVICE_DESCRIPTION_FORMAT_H diff --git a/interfaces/inner_api/feature/update/model/version_info/description/description_info.h b/interfaces/inner_api/feature/update/model/version_info/description/description_info.h index a3cf3267..048ace27 100644 --- a/interfaces/inner_api/feature/update/model/version_info/description/description_info.h +++ b/interfaces/inner_api/feature/update/model/version_info/description/description_info.h @@ -19,12 +19,12 @@ #include "base_json_struct.h" #include "description_type.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { struct DescriptionInfo : public BaseJsonStruct { DescriptionType descriptionType = DescriptionType::CONTENT; std::string content; JsonBuilder GetJsonBuilder() final; }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // UPDATE_SERVICE_DESCRIPTION_INFO_H diff --git a/interfaces/inner_api/feature/update/model/version_info/description/description_options.h b/interfaces/inner_api/feature/update/model/version_info/description/description_options.h index 60b96029..780700c1 100644 --- a/interfaces/inner_api/feature/update/model/version_info/description/description_options.h +++ b/interfaces/inner_api/feature/update/model/version_info/description/description_options.h @@ -22,7 +22,7 @@ #include "description_format.h" #include "parcel.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { struct DescriptionOptions : public Parcelable { DescriptionFormat format = DescriptionFormat::STANDARD; std::string language; @@ -31,5 +31,5 @@ struct DescriptionOptions : public Parcelable { bool Marshalling(Parcel &parcel) const override; static DescriptionOptions *Unmarshalling(Parcel &parcel); }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // UPDATE_SERVICE_DESCRIPTION_OPTIONS_H diff --git a/interfaces/inner_api/feature/update/model/version_info/description/description_type.h b/interfaces/inner_api/feature/update/model/version_info/description/description_type.h index e717f1bf..1c8ac8ba 100644 --- a/interfaces/inner_api/feature/update/model/version_info/description/description_type.h +++ b/interfaces/inner_api/feature/update/model/version_info/description/description_type.h @@ -16,11 +16,11 @@ #ifndef UPDATE_SERVICE_DESCRIPTION_TYPE_H #define UPDATE_SERVICE_DESCRIPTION_TYPE_H -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { enum class DescriptionType { CONTENT = 0, URI = 1, ID = 2 }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // UPDATE_SERVICE_DESCRIPTION_TYPE_H diff --git a/interfaces/inner_api/feature/update/model/version_info/description/src/component_description.cpp b/interfaces/inner_api/feature/update/model/version_info/description/src/component_description.cpp index 58b79bd3..e5d2ddb5 100644 --- a/interfaces/inner_api/feature/update/model/version_info/description/src/component_description.cpp +++ b/interfaces/inner_api/feature/update/model/version_info/description/src/component_description.cpp @@ -18,7 +18,7 @@ #include #include "update_log.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { bool ComponentDescription::ReadFromParcel(Parcel &parcel) { componentId = Str16ToStr8(parcel.ReadString16()); @@ -54,4 +54,4 @@ ComponentDescription *ComponentDescription::Unmarshalling(Parcel &parcel) } return componentDescription; } -} // namespace OHOS::UpdateEngine \ No newline at end of file +} // namespace OHOS::UpdateService \ No newline at end of file diff --git a/interfaces/inner_api/feature/update/model/version_info/description/src/description_info.cpp b/interfaces/inner_api/feature/update/model/version_info/description/src/description_info.cpp index 27e74c93..32872da4 100644 --- a/interfaces/inner_api/feature/update/model/version_info/description/src/description_info.cpp +++ b/interfaces/inner_api/feature/update/model/version_info/description/src/description_info.cpp @@ -16,7 +16,7 @@ #include "description_info.h" #include "update_define.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { JsonBuilder DescriptionInfo::GetJsonBuilder() { return JsonBuilder() @@ -25,4 +25,4 @@ JsonBuilder DescriptionInfo::GetJsonBuilder() .Append("content", content) .Append("}"); } -} // namespace OHOS::UpdateEngine \ No newline at end of file +} // namespace OHOS::UpdateService \ No newline at end of file diff --git a/interfaces/inner_api/feature/update/model/version_info/description/src/description_options.cpp b/interfaces/inner_api/feature/update/model/version_info/description/src/description_options.cpp index 693d3553..a3bf10b3 100644 --- a/interfaces/inner_api/feature/update/model/version_info/description/src/description_options.cpp +++ b/interfaces/inner_api/feature/update/model/version_info/description/src/description_options.cpp @@ -18,7 +18,7 @@ #include "description_info.h" #include "update_define.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { bool DescriptionOptions::ReadFromParcel(Parcel &parcel) { format = static_cast(parcel.ReadUint32()); @@ -54,4 +54,4 @@ DescriptionOptions *DescriptionOptions::Unmarshalling(Parcel &parcel) } return descriptionOptions; } -} // namespace OHOS::UpdateEngine \ No newline at end of file +} // namespace OHOS::UpdateService \ No newline at end of file diff --git a/interfaces/inner_api/feature/update/model/version_info/description/src/version_description_info.cpp b/interfaces/inner_api/feature/update/model/version_info/description/src/version_description_info.cpp index a10fa5bf..57919d5c 100644 --- a/interfaces/inner_api/feature/update/model/version_info/description/src/version_description_info.cpp +++ b/interfaces/inner_api/feature/update/model/version_info/description/src/version_description_info.cpp @@ -19,7 +19,7 @@ #include "parcel_common.h" #include "update_log.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { bool VersionDescriptionInfo::ReadFromParcel(Parcel &parcel) { int32_t componentDescriptionsSize = parcel.ReadInt32(); @@ -65,4 +65,4 @@ VersionDescriptionInfo *VersionDescriptionInfo::Unmarshalling(Parcel &parcel) } return versionDescriptionInfo; } -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService diff --git a/interfaces/inner_api/feature/update/model/version_info/description/version_description_info.h b/interfaces/inner_api/feature/update/model/version_info/description/version_description_info.h index 377b0074..c7e84c12 100644 --- a/interfaces/inner_api/feature/update/model/version_info/description/version_description_info.h +++ b/interfaces/inner_api/feature/update/model/version_info/description/version_description_info.h @@ -22,7 +22,7 @@ #include "component_description.h" #include "parcel.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { struct VersionDescriptionInfo : public Parcelable { std::vector componentDescriptions; @@ -30,5 +30,5 @@ struct VersionDescriptionInfo : public Parcelable { bool Marshalling(Parcel &parcel) const override; static VersionDescriptionInfo *Unmarshalling(Parcel &parcel); }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // VERSION_DESCRIPTION_INFO_H diff --git a/interfaces/inner_api/feature/update/model/version_info/effective_mode.h b/interfaces/inner_api/feature/update/model/version_info/effective_mode.h index ecf221ea..3015c3f5 100644 --- a/interfaces/inner_api/feature/update/model/version_info/effective_mode.h +++ b/interfaces/inner_api/feature/update/model/version_info/effective_mode.h @@ -16,11 +16,11 @@ #ifndef UPDATE_SERVICE_EFFECTIVE_MODE_H #define UPDATE_SERVICE_EFFECTIVE_MODE_H -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { enum class EffectiveMode { COLD = 1, LIVE = 2, LIVE_AND_COLD = 3 }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // UPDATE_SERVICE_EFFECTIVE_MODE_H diff --git a/interfaces/inner_api/feature/update/model/version_info/new_version/new_version_info.h b/interfaces/inner_api/feature/update/model/version_info/new_version/new_version_info.h index 73f8495a..130de2e0 100644 --- a/interfaces/inner_api/feature/update/model/version_info/new_version/new_version_info.h +++ b/interfaces/inner_api/feature/update/model/version_info/new_version/new_version_info.h @@ -23,7 +23,7 @@ #include "version_digest_info.h" #include "parcel.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { struct NewVersionInfo : public Parcelable { VersionDigestInfo versionDigestInfo; std::vector versionComponents; @@ -32,5 +32,5 @@ struct NewVersionInfo : public Parcelable { bool Marshalling(Parcel &parcel) const override; static NewVersionInfo *Unmarshalling(Parcel &parcel); }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // UPDATE_SERVICE_NEW_VERSION_INFO_H diff --git a/interfaces/inner_api/feature/update/model/version_info/new_version/src/new_version_info.cpp b/interfaces/inner_api/feature/update/model/version_info/new_version/src/new_version_info.cpp index 777ec1aa..682c75f0 100644 --- a/interfaces/inner_api/feature/update/model/version_info/new_version/src/new_version_info.cpp +++ b/interfaces/inner_api/feature/update/model/version_info/new_version/src/new_version_info.cpp @@ -18,7 +18,7 @@ #include "parcel_common.h" #include "update_log.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { bool NewVersionInfo::ReadFromParcel(Parcel &parcel) { versionDigestInfo.versionDigest = Str16ToStr8(parcel.ReadString16()); @@ -68,4 +68,4 @@ NewVersionInfo *NewVersionInfo::Unmarshalling(Parcel &parcel) } return newVersionInfo; } -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService diff --git a/interfaces/inner_api/feature/update/model/version_info/ota_mode.h b/interfaces/inner_api/feature/update/model/version_info/ota_mode.h index 8946d447..8b8f475a 100755 --- a/interfaces/inner_api/feature/update/model/version_info/ota_mode.h +++ b/interfaces/inner_api/feature/update/model/version_info/ota_mode.h @@ -16,12 +16,12 @@ #ifndef UPDATE_SERVICE_OTA_TYPE_H #define UPDATE_SERVICE_OTA_TYPE_H -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { enum class OtaMode { REGULAR = 0, STREAM = 1, // 1 << 0 AB = 2, // 1 << 1 AB_STREAM = 3 // STREAM | AB }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // UPDATE_SERVICE_OTA_TYPE_H diff --git a/interfaces/inner_api/feature/update/model/version_info/ota_type.h b/interfaces/inner_api/feature/update/model/version_info/ota_type.h index 8946d447..8b8f475a 100755 --- a/interfaces/inner_api/feature/update/model/version_info/ota_type.h +++ b/interfaces/inner_api/feature/update/model/version_info/ota_type.h @@ -16,12 +16,12 @@ #ifndef UPDATE_SERVICE_OTA_TYPE_H #define UPDATE_SERVICE_OTA_TYPE_H -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { enum class OtaMode { REGULAR = 0, STREAM = 1, // 1 << 0 AB = 2, // 1 << 1 AB_STREAM = 3 // STREAM | AB }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // UPDATE_SERVICE_OTA_TYPE_H diff --git a/interfaces/inner_api/feature/update/model/version_info/src/version_component.cpp b/interfaces/inner_api/feature/update/model/version_info/src/version_component.cpp index 2a783eb0..b1c3ed53 100644 --- a/interfaces/inner_api/feature/update/model/version_info/src/version_component.cpp +++ b/interfaces/inner_api/feature/update/model/version_info/src/version_component.cpp @@ -18,7 +18,7 @@ #include #include "update_log.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { JsonBuilder VersionComponent::GetJsonBuilder() { return JsonBuilder() @@ -85,4 +85,4 @@ JsonBuilder VersionComponent::GetJsonBuilder() } return versionComponent; } -} // namespace OHOS::UpdateEngine \ No newline at end of file +} // namespace OHOS::UpdateService \ No newline at end of file diff --git a/interfaces/inner_api/feature/update/model/version_info/src/version_digest_info.cpp b/interfaces/inner_api/feature/update/model/version_info/src/version_digest_info.cpp index 7f362412..86dada2d 100644 --- a/interfaces/inner_api/feature/update/model/version_info/src/version_digest_info.cpp +++ b/interfaces/inner_api/feature/update/model/version_info/src/version_digest_info.cpp @@ -15,7 +15,7 @@ #include "version_digest_info.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { JsonBuilder VersionDigestInfo::GetJsonBuilder() { return JsonBuilder() @@ -54,4 +54,4 @@ VersionDigestInfo *VersionDigestInfo::Unmarshalling(Parcel &parcel) } return versionDigestInfo; } -} // namespace OHOS::UpdateEngine \ No newline at end of file +} // namespace OHOS::UpdateService \ No newline at end of file diff --git a/interfaces/inner_api/feature/update/model/version_info/upgrade_action.h b/interfaces/inner_api/feature/update/model/version_info/upgrade_action.h index 2b7b8b15..fd5e4197 100644 --- a/interfaces/inner_api/feature/update/model/version_info/upgrade_action.h +++ b/interfaces/inner_api/feature/update/model/version_info/upgrade_action.h @@ -16,12 +16,12 @@ #ifndef UPDATE_SERVICE_UPGRADE_ACTION_H #define UPDATE_SERVICE_UPGRADE_ACTION_H -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { class UpgradeAction { public: static constexpr const char *UPGRADE = "upgrade"; static constexpr const char *RECOVERY = "recovery"; static constexpr const char *ROLLBACK = "rollback"; }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // UPDATE_SERVICE_UPGRADE_ACTION_H diff --git a/interfaces/inner_api/feature/update/model/version_info/version_component.h b/interfaces/inner_api/feature/update/model/version_info/version_component.h index d7a7996f..739449d6 100644 --- a/interfaces/inner_api/feature/update/model/version_info/version_component.h +++ b/interfaces/inner_api/feature/update/model/version_info/version_component.h @@ -29,7 +29,7 @@ #include "parcel.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { struct VersionComponent : public BaseJsonStruct, public Parcelable { std::string componentId; int32_t componentType = CAST_INT(ComponentType::INVALID); @@ -48,5 +48,5 @@ struct VersionComponent : public BaseJsonStruct, public Parcelable { bool Marshalling(Parcel &parcel) const override; static VersionComponent *Unmarshalling(Parcel &parcel); }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // UPDATE_SERVICE_VERSION_COMPONENT_H diff --git a/interfaces/inner_api/feature/update/model/version_info/version_digest_info.h b/interfaces/inner_api/feature/update/model/version_info/version_digest_info.h index 761630ea..cbc7e000 100644 --- a/interfaces/inner_api/feature/update/model/version_info/version_digest_info.h +++ b/interfaces/inner_api/feature/update/model/version_info/version_digest_info.h @@ -23,7 +23,7 @@ #include "parcel.h" #include "update_log.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { struct VersionDigestInfo : public BaseJsonStruct, public Parcelable { std::string versionDigest; @@ -33,5 +33,5 @@ struct VersionDigestInfo : public BaseJsonStruct, public Parcelable { bool Marshalling(Parcel &parcel) const override; static VersionDigestInfo *Unmarshalling(Parcel &parcel); }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // UPDATE_SERVICE_VERSION_DIGEST_INFO_H diff --git a/interfaces/inner_api/include/update_service_kits.h b/interfaces/inner_api/include/update_service_kits.h index 3034e533..feb29cf1 100644 --- a/interfaces/inner_api/include/update_service_kits.h +++ b/interfaces/inner_api/include/update_service_kits.h @@ -36,7 +36,7 @@ #include "version_description_info.h" #include "version_digest_info.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { class UpdateServiceKits { public: UpdateServiceKits() = default; @@ -108,5 +108,5 @@ public: virtual int32_t VerifyUpgradePackage(const std::string &packagePath, const std::string &keyPath, BusinessError &businessError, int32_t &funcResult) = 0; }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // UPDATE_SERVICE_KITS_H diff --git a/interfaces/inner_api/include/updater_sa_ipc_interface_code.h b/interfaces/inner_api/include/updater_sa_ipc_interface_code.h index b5aab428..d8234a13 100644 --- a/interfaces/inner_api/include/updater_sa_ipc_interface_code.h +++ b/interfaces/inner_api/include/updater_sa_ipc_interface_code.h @@ -18,7 +18,7 @@ #include -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { /* SAID: 3006 */ enum class UpdaterSaInterfaceCode : uint32_t { CHECK_VERSION = 1, @@ -42,5 +42,5 @@ enum class UpdaterSaInterfaceCode : uint32_t { APPLY_NEW_VERSION, VERIFY_UPGRADE_PACKAGE }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // UPDATER_SA_IPC_INTERFACE_CODE_H \ No newline at end of file diff --git a/interfaces/inner_api/modulemgr/include/module_log.h b/interfaces/inner_api/modulemgr/include/module_log.h index f5f22dd6..8db23997 100644 --- a/interfaces/inner_api/modulemgr/include/module_log.h +++ b/interfaces/inner_api/modulemgr/include/module_log.h @@ -19,8 +19,8 @@ #include "update_log.h" -#define UTILS_LOGE(fmt, ...) PRINT_LOGE(OHOS::UpdateEngine::UPDATE_MODULEMGR_TAG, fmt, ##__VA_ARGS__) -#define UTILS_LOGI(fmt, ...) PRINT_LOGI(OHOS::UpdateEngine::UPDATE_MODULEMGR_TAG, fmt, ##__VA_ARGS__) -#define UTILS_LOGD(fmt, ...) PRINT_LOGD(OHOS::UpdateEngine::UPDATE_MODULEMGR_TAG, fmt, ##__VA_ARGS__) +#define UTILS_LOGE(fmt, ...) PRINT_LOGE(OHOS::UpdateService::UPDATE_MODULEMGR_TAG, fmt, ##__VA_ARGS__) +#define UTILS_LOGI(fmt, ...) PRINT_LOGI(OHOS::UpdateService::UPDATE_MODULEMGR_TAG, fmt, ##__VA_ARGS__) +#define UTILS_LOGD(fmt, ...) PRINT_LOGD(OHOS::UpdateService::UPDATE_MODULEMGR_TAG, fmt, ##__VA_ARGS__) #endif // UPDATE_SERVICE__MODULE_LOG_H diff --git a/interfaces/inner_api/modulemgr/include/module_manager.h b/interfaces/inner_api/modulemgr/include/module_manager.h index d39c0c3b..558d20e7 100644 --- a/interfaces/inner_api/modulemgr/include/module_manager.h +++ b/interfaces/inner_api/modulemgr/include/module_manager.h @@ -29,7 +29,7 @@ #include "update_service_module.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { class ModuleManager { public: ModuleManager(); @@ -64,6 +64,6 @@ private: static std::mutex onIdleFuncMapMutex_; static std::mutex onDumpFuncMapMutex_; }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // UPDATE_SERVICE_MODULE_MANAGER_H diff --git a/interfaces/inner_api/modulemgr/include/update_service_module.h b/interfaces/inner_api/modulemgr/include/update_service_module.h index 443e5466..7f3bfe1f 100644 --- a/interfaces/inner_api/modulemgr/include/update_service_module.h +++ b/interfaces/inner_api/modulemgr/include/update_service_module.h @@ -31,7 +31,7 @@ extern "C" { #endif #endif -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { using RequestFuncType = int32_t (*)(uint32_t code, OHOS::MessageParcel &data, OHOS::MessageParcel &reply, OHOS::MessageOption &option); @@ -50,5 +50,5 @@ void RegisterDumpFunc(std::string phase, LifeCycleFuncDumpType handlePhase); } #endif #endif -} // OHOS::UpdateEngine +} // OHOS::UpdateService #endif // UPDATE_SERVICE_MODULE_H diff --git a/interfaces/inner_api/modulemgr/src/module_manager.cpp b/interfaces/inner_api/modulemgr/src/module_manager.cpp index 99d0e801..767936af 100644 --- a/interfaces/inner_api/modulemgr/src/module_manager.cpp +++ b/interfaces/inner_api/modulemgr/src/module_manager.cpp @@ -22,7 +22,7 @@ #include "../include/module_manager.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { std::map ModuleManager::onRemoteRequestFuncMap_; std::map ModuleManager::onStartOnStopFuncMap_; std::map ModuleManager::onIdleFuncMap_; @@ -181,5 +181,5 @@ bool ModuleManager::IsMapFuncExist(uint32_t code) { return onRemoteRequestFuncMap_.count(code); } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS diff --git a/interfaces/inner_api/modulemgr/src/update_service_module.cpp b/interfaces/inner_api/modulemgr/src/update_service_module.cpp index 83dd66f5..e0e1b9a4 100644 --- a/interfaces/inner_api/modulemgr/src/update_service_module.cpp +++ b/interfaces/inner_api/modulemgr/src/update_service_module.cpp @@ -21,25 +21,25 @@ #include "../include/module_manager.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { void RegisterFunc(std::vector codes, RequestFuncType handleRemoteRequest) { - OHOS::UpdateEngine::ModuleManager::GetInstance().HookFunc(codes, handleRemoteRequest); + OHOS::UpdateService::ModuleManager::GetInstance().HookFunc(codes, handleRemoteRequest); } void RegisterOnStartOnStopFunc(std::string phase, LifeCycleFuncType handlePhase) { - OHOS::UpdateEngine::ModuleManager::GetInstance().HookOnStartOnStopFunc(phase, handlePhase); + OHOS::UpdateService::ModuleManager::GetInstance().HookOnStartOnStopFunc(phase, handlePhase); } void RegisterOnIdleFunc(std::string phase, LifeCycleFuncReturnType handlePhase) { - OHOS::UpdateEngine::ModuleManager::GetInstance().HookOnIdleFunc(phase, handlePhase); + OHOS::UpdateService::ModuleManager::GetInstance().HookOnIdleFunc(phase, handlePhase); } void RegisterDumpFunc(std::string phase, LifeCycleFuncDumpType handlePhase) { - OHOS::UpdateEngine::ModuleManager::GetInstance().HookDumpFunc(phase, handlePhase); + OHOS::UpdateService::ModuleManager::GetInstance().HookDumpFunc(phase, handlePhase); } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS \ No newline at end of file diff --git a/services/core/ability/adapter/include/config_info.h b/services/core/ability/adapter/include/config_info.h index 1d224976..1e4253e9 100644 --- a/services/core/ability/adapter/include/config_info.h +++ b/services/core/ability/adapter/include/config_info.h @@ -19,12 +19,12 @@ #include #include -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { struct ConfigInfo { std::string businessDomain; uint32_t abInstallTimeout = 1800; // 1800s uint32_t streamInstallTimeout = 3600; // 3600s std::string moduleLibPath; }; -} // OHOS::UpdateEngine +} // OHOS::UpdateService #endif //UPDATE_SERVICE_CONFIG_INFO_H diff --git a/services/core/ability/adapter/include/config_parse.h b/services/core/ability/adapter/include/config_parse.h index 40ff0efa..e6884d78 100644 --- a/services/core/ability/adapter/include/config_parse.h +++ b/services/core/ability/adapter/include/config_parse.h @@ -21,7 +21,7 @@ #include "config_info.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { class ConfigParse : public DelayedSingleton { DECLARE_DELAYED_SINGLETON(ConfigParse); @@ -34,6 +34,6 @@ public: private: ConfigInfo configInfo_; }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // CONFIG_PRASE_H diff --git a/services/core/ability/adapter/include/device_adapter.h b/services/core/ability/adapter/include/device_adapter.h index 2bd2987a..7863d4aa 100644 --- a/services/core/ability/adapter/include/device_adapter.h +++ b/services/core/ability/adapter/include/device_adapter.h @@ -20,7 +20,7 @@ #include namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { class DeviceAdapter { public: static std::string GetParameter(const std::string &key, const std::string &def); @@ -33,6 +33,6 @@ public: private: static bool IsValidParamValue(const char *value, uint32_t len); }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // DEVICE_ADAPTER_H \ No newline at end of file diff --git a/services/core/ability/adapter/src/config_parse.cpp b/services/core/ability/adapter/src/config_parse.cpp index 337cef86..7dc800ae 100644 --- a/services/core/ability/adapter/src/config_parse.cpp +++ b/services/core/ability/adapter/src/config_parse.cpp @@ -24,7 +24,7 @@ #include "firmware_constant.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { ConfigParse::ConfigParse() { ENGINE_LOGI("ConfigParse::ConfigParse"); @@ -73,5 +73,5 @@ void ConfigParse::LoadConfigInfo() JsonUtils::GetValueAndSetTo(root, "streamInstallTimeout", configInfo_.streamInstallTimeout); JsonUtils::GetValueAndSetTo(root, "moduleLibPath", configInfo_.moduleLibPath); } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS diff --git a/services/core/ability/adapter/src/device_adapter.cpp b/services/core/ability/adapter/src/device_adapter.cpp index d806a32f..2aca73f0 100644 --- a/services/core/ability/adapter/src/device_adapter.cpp +++ b/services/core/ability/adapter/src/device_adapter.cpp @@ -32,7 +32,7 @@ #include "update_log.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { constexpr int32_t MAX_PARAM_VALUE_LEN = 128; bool DeviceAdapter::IsValidParamValue(const char *value, uint32_t len) @@ -82,5 +82,5 @@ std::string DeviceAdapter::GetBootSlot() { return GetParameter("ohos.boot.bootslots", "0"); // 0:not ab,2:ab; default 0 } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS diff --git a/services/core/ability/alarm/include/alarm_timer_utils.h b/services/core/ability/alarm/include/alarm_timer_utils.h index bc1bc8f5..fc2cbc85 100644 --- a/services/core/ability/alarm/include/alarm_timer_utils.h +++ b/services/core/ability/alarm/include/alarm_timer_utils.h @@ -22,7 +22,7 @@ #include "itimer_info.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { using AlarmTimerCallback = std::function; class AlarmTimerUtils { @@ -51,6 +51,6 @@ private: AlarmTimerCallback callBack_ = nullptr; }; }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // ALARM_TIMER_UTILS_H \ No newline at end of file diff --git a/services/core/ability/alarm/include/timer_manager.h b/services/core/ability/alarm/include/timer_manager.h index c86bebf5..a22dbefa 100644 --- a/services/core/ability/alarm/include/timer_manager.h +++ b/services/core/ability/alarm/include/timer_manager.h @@ -22,7 +22,7 @@ #include "timer.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { enum class EventType { STARTUP_IDLE_LOOPER_EVENT = 1 }; @@ -40,6 +40,6 @@ private: std::shared_ptr timer_ = nullptr; std::mutex mutex_; }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // TIMER_MANAGER_H \ No newline at end of file diff --git a/services/core/ability/alarm/src/alarm_timer_utils.cpp b/services/core/ability/alarm/src/alarm_timer_utils.cpp index 8bfc16fb..fb3f09c6 100644 --- a/services/core/ability/alarm/src/alarm_timer_utils.cpp +++ b/services/core/ability/alarm/src/alarm_timer_utils.cpp @@ -23,7 +23,7 @@ #include "update_log.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { void AlarmTimerUtils::TimerTaskInfo::OnTrigger() { ENGINE_LOGI("timed task had been triggered"); @@ -129,5 +129,5 @@ uint64_t AlarmTimerUtils::GetSystemBootTime() ENGINE_LOGI("GetSystemBootTime bootTime : %{public}" PRIu64 "", bootTime); return bootTime; } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS diff --git a/services/core/ability/alarm/src/timer_manager.cpp b/services/core/ability/alarm/src/timer_manager.cpp index 2e99cf45..71b7cddf 100644 --- a/services/core/ability/alarm/src/timer_manager.cpp +++ b/services/core/ability/alarm/src/timer_manager.cpp @@ -18,7 +18,7 @@ #include "update_define.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { constexpr int32_t ONE_SECOND_MILLISECONDS = 1000; TimerManager::TimerManager() @@ -83,5 +83,5 @@ void TimerManager::UnregisterLooperEvent(EventType eventType) registeredTimerIdMap_.erase(result); ENGINE_LOGD("TimerManager UnregisterLooperEvent EventType %{public}d success", CAST_INT(eventType)); } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS diff --git a/services/core/ability/callback/include/base_callback_utils.h b/services/core/ability/callback/include/base_callback_utils.h index 9486be05..1e9e63d6 100644 --- a/services/core/ability/callback/include/base_callback_utils.h +++ b/services/core/ability/callback/include/base_callback_utils.h @@ -29,7 +29,7 @@ #include "version_component.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { class BaseCallbackUtils { public: void NotifyEvent(const std::string &versionDigestInfo, EventId eventId, UpgradeStatus status, @@ -44,6 +44,6 @@ private: void CallbackToHap(EventInfo &eventInfo); sptr GetUpgradeCallback(const UpgradeInfo &upgradeInfo); }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // BASE_CALLBACK_UTILS_H \ No newline at end of file diff --git a/services/core/ability/callback/src/base_callback_utils.cpp b/services/core/ability/callback/src/base_callback_utils.cpp index ef0c7813..d06a834d 100644 --- a/services/core/ability/callback/src/base_callback_utils.cpp +++ b/services/core/ability/callback/src/base_callback_utils.cpp @@ -24,7 +24,7 @@ #include "update_service_util.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { void BaseCallbackUtils::NotifyEvent(const std::string &versionDigestInfo, EventId eventId, UpgradeStatus status, const ErrorMessage &errorMessage, const std::vector &versionComponents) { @@ -104,5 +104,5 @@ void BaseCallbackUtils::NotifyToHap(EventInfo &info) UpdateNotify::GetInstance()->ConnectToAppService(eventInfoStr, subscribeInfo.ToJson()); } } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS diff --git a/services/core/ability/callback/src/base_callback_utils_empty.cpp b/services/core/ability/callback/src/base_callback_utils_empty.cpp index 00ca9b65..00f24634 100644 --- a/services/core/ability/callback/src/base_callback_utils_empty.cpp +++ b/services/core/ability/callback/src/base_callback_utils_empty.cpp @@ -20,7 +20,7 @@ #include "update_service_cache.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { void BaseCallbackUtils::NotifyEvent(const std::string &versionDigestInfo, EventId eventId, UpgradeStatus status, const ErrorMessage &errorMessage, const std::vector &versionComponents) { @@ -46,5 +46,5 @@ void BaseCallbackUtils::NotifyToHap(EventInfo &info) { ENGINE_LOGI("BaseCallbackUtils NotifyToHap"); } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS diff --git a/services/core/ability/common/include/constant.h b/services/core/ability/common/include/constant.h index 6df32e6d..eec7fac9 100644 --- a/services/core/ability/common/include/constant.h +++ b/services/core/ability/common/include/constant.h @@ -23,7 +23,7 @@ #include "file_utils.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { namespace Constant { constexpr int32_t ONE_DAY_HOUR = 24; constexpr int32_t ONE_HOUR_MINUTES = 60; @@ -69,6 +69,6 @@ static const std::vector BASE_DIR_INFOS { {Constant::UPDATE_PACKAGE_ROOT_PATH, 0770, false}, {Constant::DUPDATE_ENGINE_PACKAGE_ROOT_PATH, 0770, true} }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // CONSTANT_H \ No newline at end of file diff --git a/services/core/ability/download/data/include/download_info.h b/services/core/ability/download/data/include/download_info.h index 82fa4070..36549db0 100644 --- a/services/core/ability/download/data/include/download_info.h +++ b/services/core/ability/download/data/include/download_info.h @@ -23,7 +23,7 @@ #include "anonymous_utils.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { struct DownloadInfo { public: DownloadInfo() = default; @@ -67,6 +67,6 @@ public: .append("isNeedAutoResume=").append(std::to_string(isNeedAutoResume)); } }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // DOWNLOAD_INFO_H diff --git a/services/core/ability/model/include/device_info.h b/services/core/ability/model/include/device_info.h index ed112c75..ea146030 100644 --- a/services/core/ability/model/include/device_info.h +++ b/services/core/ability/model/include/device_info.h @@ -23,7 +23,7 @@ #include "anonymous_utils.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { struct DeviceInfo { public: std::string udid; @@ -37,6 +37,6 @@ public: return json; } }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // DEVICE_INFO_H \ No newline at end of file diff --git a/services/core/ability/model/include/ota_mode.h b/services/core/ability/model/include/ota_mode.h index 739adb6f..34f01c3d 100755 --- a/services/core/ability/model/include/ota_mode.h +++ b/services/core/ability/model/include/ota_mode.h @@ -16,12 +16,12 @@ #ifndef UPDATE_SERVICE_OTA_MODE_H #define UPDATE_SERVICE_OTA_MODE_H -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { enum class OtaType { REGULAR = 0, STREAM = 1, // 1 << 0 AB = 2, // 1 << 1 AB_STREAM = 3 // STREAM | AB }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // UPDATE_SERVICE_OTA_MODE_H diff --git a/services/core/ability/model/include/ota_type.h b/services/core/ability/model/include/ota_type.h index 739adb6f..34f01c3d 100755 --- a/services/core/ability/model/include/ota_type.h +++ b/services/core/ability/model/include/ota_type.h @@ -16,12 +16,12 @@ #ifndef UPDATE_SERVICE_OTA_MODE_H #define UPDATE_SERVICE_OTA_MODE_H -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { enum class OtaType { REGULAR = 0, STREAM = 1, // 1 << 0 AB = 2, // 1 << 1 AB_STREAM = 3 // STREAM | AB }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // UPDATE_SERVICE_OTA_MODE_H diff --git a/services/core/ability/model/include/package_type.h b/services/core/ability/model/include/package_type.h index d01cc4f6..e340abea 100644 --- a/services/core/ability/model/include/package_type.h +++ b/services/core/ability/model/include/package_type.h @@ -16,7 +16,7 @@ #ifndef UPDATE_SERVICE_PACKAGE_TYPE_H #define UPDATE_SERVICE_PACKAGE_TYPE_H -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { enum class PackageType { DYNAMIC = 0, NORMAL = 1, @@ -28,5 +28,5 @@ enum class PackageType { PATCH = 8, SA = 9 }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // UPDATE_SERVICE_PACKAGE_TYPE_H diff --git a/services/core/ability/net/include/network_response.h b/services/core/ability/net/include/network_response.h index 46c7df6f..e019d92f 100644 --- a/services/core/ability/net/include/network_response.h +++ b/services/core/ability/net/include/network_response.h @@ -20,7 +20,7 @@ #include namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { enum class HttpConstant { DEFAULT = -1, SUCCESS = 200, @@ -37,6 +37,6 @@ public: int32_t result = 0; std::string content; }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // NETWORK_RESPONSE_H \ No newline at end of file diff --git a/services/core/ability/preference/include/preferences_utils.h b/services/core/ability/preference/include/preferences_utils.h index b2b0b792..f3ca184f 100644 --- a/services/core/ability/preference/include/preferences_utils.h +++ b/services/core/ability/preference/include/preferences_utils.h @@ -25,7 +25,7 @@ #endif namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { class PreferencesUtil { public: PreferencesUtil() = default; @@ -84,6 +84,6 @@ private: std::shared_ptr ptr, const std::string &key, const float &defValue); #endif }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // PREFERENCES_UTILS_H \ No newline at end of file diff --git a/services/core/ability/preference/src/preference_utils.cpp b/services/core/ability/preference/src/preference_utils.cpp index 46fba81b..043ecdbb 100644 --- a/services/core/ability/preference/src/preference_utils.cpp +++ b/services/core/ability/preference/src/preference_utils.cpp @@ -20,7 +20,7 @@ #include "update_log.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { std::shared_ptr PreferencesUtil::GetPreference() { std::string path = GetPath(); @@ -266,5 +266,5 @@ bool PreferencesUtil::RefreshSync() } return true; } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS diff --git a/services/core/ability/preference/src/preference_utils_empty.cpp b/services/core/ability/preference/src/preference_utils_empty.cpp index b511fa76..a563d97b 100644 --- a/services/core/ability/preference/src/preference_utils_empty.cpp +++ b/services/core/ability/preference/src/preference_utils_empty.cpp @@ -18,7 +18,7 @@ #include "update_log.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { bool PreferencesUtil::DeletePreference() { return true; @@ -105,5 +105,5 @@ bool PreferencesUtil::RefreshSync() { return true; } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS \ No newline at end of file diff --git a/services/core/ability/sqlite/core/include/idatabase.h b/services/core/ability/sqlite/core/include/idatabase.h index a6e15ff1..7d78718c 100644 --- a/services/core/ability/sqlite/core/include/idatabase.h +++ b/services/core/ability/sqlite/core/include/idatabase.h @@ -23,7 +23,7 @@ #include "values_bucket.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { class IDataBase { public: virtual ~IDataBase() = default; @@ -35,6 +35,6 @@ public: virtual bool Update( int &changedRows, const NativeRdb::ValuesBucket &values, const NativeRdb::RdbPredicates &predicates) = 0; }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // IDATABASE_H \ No newline at end of file diff --git a/services/core/ability/sqlite/core/include/itable.h b/services/core/ability/sqlite/core/include/itable.h index 3ba7ca05..9e1717ea 100644 --- a/services/core/ability/sqlite/core/include/itable.h +++ b/services/core/ability/sqlite/core/include/itable.h @@ -28,7 +28,7 @@ using ResultSet = OHOS::NativeRdb::ResultSet; namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { const std::string COLUMN_ID = "id"; template @@ -134,6 +134,6 @@ private: return ret; } }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // ITABLE_H \ No newline at end of file diff --git a/services/core/ability/sqlite/core/include/itable_operator.h b/services/core/ability/sqlite/core/include/itable_operator.h index fa83b39b..1d6c5515 100644 --- a/services/core/ability/sqlite/core/include/itable_operator.h +++ b/services/core/ability/sqlite/core/include/itable_operator.h @@ -22,7 +22,7 @@ #include "values_bucket.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { template class ITableOperator { public: @@ -35,6 +35,6 @@ public: virtual bool Update( int &changedRows, const NativeRdb::ValuesBucket &values, const NativeRdb::RdbPredicates &predicates) = 0; }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // ITABLE_OPERATOR_H \ No newline at end of file diff --git a/services/core/ability/sqlite/core/include/sqlite_db.h b/services/core/ability/sqlite/core/include/sqlite_db.h index b09d9d66..7496c531 100644 --- a/services/core/ability/sqlite/core/include/sqlite_db.h +++ b/services/core/ability/sqlite/core/include/sqlite_db.h @@ -27,7 +27,7 @@ #include "idatabase.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { class SqliteDb : public IDataBase { public: SqliteDb() = default; @@ -56,6 +56,6 @@ private: std::mutex dbMutex_; std::mutex writeMutex_; }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // SQLITE_DB_H \ No newline at end of file diff --git a/services/core/ability/sqlite/core/include/table_base_operator.h b/services/core/ability/sqlite/core/include/table_base_operator.h index 66580a2e..8fe972d9 100644 --- a/services/core/ability/sqlite/core/include/table_base_operator.h +++ b/services/core/ability/sqlite/core/include/table_base_operator.h @@ -27,7 +27,7 @@ #include "update_log.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { template class TableBaseOperator : public ITableOperator { public: @@ -162,6 +162,6 @@ std::string TableBaseOperator::GetTableName() } return table_->GetTableName(); } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // TABLE_BASE_OPERATOR_H \ No newline at end of file diff --git a/services/core/ability/sqlite/core/src/sqlite_db.cpp b/services/core/ability/sqlite/core/src/sqlite_db.cpp index bb385258..3c80d647 100644 --- a/services/core/ability/sqlite/core/src/sqlite_db.cpp +++ b/services/core/ability/sqlite/core/src/sqlite_db.cpp @@ -25,7 +25,7 @@ #include "update_log.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { std::shared_ptr SqliteDb::GetDbStore() { if (dbStore_ == nullptr) { @@ -102,5 +102,5 @@ bool SqliteDb::Update( ENGINE_CHECK(ret == NativeRdb::E_OK, return false, "SqliteDb failed to update ret=%{public}d", ret); return true; } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS \ No newline at end of file diff --git a/services/core/ability/status_cache/include/status_cache.h b/services/core/ability/status_cache/include/status_cache.h index ed1ba890..a74b4430 100644 --- a/services/core/ability/status_cache/include/status_cache.h +++ b/services/core/ability/status_cache/include/status_cache.h @@ -21,7 +21,7 @@ #include "time_utils_proxy.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { class StatusCache { public: StatusCache(std::shared_ptr timeUtilsProxy) : timeUtilsProxy_(timeUtilsProxy) {} @@ -41,6 +41,6 @@ private: int64_t lastDownloadTime_ = -1; int64_t lastUpgradeTime_ = -1; }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // STATUS_CACHE_H \ No newline at end of file diff --git a/services/core/ability/status_cache/src/status_cache.cpp b/services/core/ability/status_cache/src/status_cache.cpp index f831e0ce..a62cfd92 100644 --- a/services/core/ability/status_cache/src/status_cache.cpp +++ b/services/core/ability/status_cache/src/status_cache.cpp @@ -20,7 +20,7 @@ #include "update_log.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { bool StatusCache::IsChecking() { if (lastCheckTime_ != -1 && abs(GetCurrentTime() - lastCheckTime_) > Constant::FIVE_MINUTES_SECONDS) { @@ -78,5 +78,5 @@ bool StatusCache::IsUpgradeTriggered() lastUpgradeTime_ = TimeUtils::GetTimestampByMilliseconds(); return false; } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS diff --git a/services/core/ability/utils/include/file_utils.h b/services/core/ability/utils/include/file_utils.h index bc5b16d5..d1ea4580 100644 --- a/services/core/ability/utils/include/file_utils.h +++ b/services/core/ability/utils/include/file_utils.h @@ -24,7 +24,7 @@ #include namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { constexpr int32_t FOLDER_PERMISSION = 0750; struct DirInfo { @@ -54,6 +54,6 @@ private: static std::map baseDirMap_; static void RemoveAll(const std::filesystem::path &path); }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // FILE_UTILS_H \ No newline at end of file diff --git a/services/core/ability/utils/include/sha256_utils.h b/services/core/ability/utils/include/sha256_utils.h index dee12a9e..947af1c4 100644 --- a/services/core/ability/utils/include/sha256_utils.h +++ b/services/core/ability/utils/include/sha256_utils.h @@ -23,7 +23,7 @@ #include "update_log.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { class Sha256Utils { public: static std::string CalculateHashCode(std::string inputStr); @@ -35,6 +35,6 @@ private: static bool Sha256Calculate(const unsigned char *input, int len, char *componentId, int componentIdLen); static bool TransDigestToSha256Result(char *sha256Result, uint32_t componentIdLen, const unsigned char *digest); }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // SHA256_UTILS_H \ No newline at end of file diff --git a/services/core/ability/utils/include/time_utils.h b/services/core/ability/utils/include/time_utils.h index 7e050c00..5aacfe28 100644 --- a/services/core/ability/utils/include/time_utils.h +++ b/services/core/ability/utils/include/time_utils.h @@ -26,7 +26,7 @@ #include "update_log.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { class TimeUtils { static constexpr int64_t BOOT_COMPLETE_SIMULATE_DURATION = 60L; // 模拟开机广播:时间判断门限 public: @@ -83,6 +83,6 @@ public: return GetSystemBootDuration() <= BOOT_COMPLETE_SIMULATE_DURATION; } }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // TIME_UTILS_H \ No newline at end of file diff --git a/services/core/ability/utils/include/time_utils_proxy.h b/services/core/ability/utils/include/time_utils_proxy.h index d071fe9c..b9f562df 100644 --- a/services/core/ability/utils/include/time_utils_proxy.h +++ b/services/core/ability/utils/include/time_utils_proxy.h @@ -20,7 +20,7 @@ #include namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { class TimeUtilsProxy { public: virtual ~TimeUtilsProxy() = default; @@ -29,6 +29,6 @@ public: virtual int64_t GetRandTime(int32_t minTime, int32_t maxTime); virtual int64_t GetSystemBootDuration(); }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // TIME_UTILS_PROXY \ No newline at end of file diff --git a/services/core/ability/utils/src/file_utils.cpp b/services/core/ability/utils/src/file_utils.cpp index daebf53f..8c5c9752 100644 --- a/services/core/ability/utils/src/file_utils.cpp +++ b/services/core/ability/utils/src/file_utils.cpp @@ -31,7 +31,7 @@ #include "update_log.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { std::map FileUtils::baseDirMap_; int64_t FileUtils::GetFileSize(const std::string &fileName) @@ -221,5 +221,5 @@ std::string FileUtils::ReadDataFromFile(const std::string &filePath) readFile.close(); return fileRaw; } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS diff --git a/services/core/ability/utils/src/sha256_utils.cpp b/services/core/ability/utils/src/sha256_utils.cpp index a0e1d7be..90e40073 100644 --- a/services/core/ability/utils/src/sha256_utils.cpp +++ b/services/core/ability/utils/src/sha256_utils.cpp @@ -24,7 +24,7 @@ #include "mbedtls/sha256.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { constexpr unsigned int SHA256_STRING_LEN = 65; constexpr unsigned int SHA256_LENGTH = 32; constexpr unsigned int MAX_BUFFER_LENGTH = 1024; @@ -152,5 +152,5 @@ bool Sha256Utils::TransDigestToSha256Result(char *sha256Result, uint32_t compone } return true; } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS \ No newline at end of file diff --git a/services/core/ability/utils/src/time_utils_proxy.cpp b/services/core/ability/utils/src/time_utils_proxy.cpp index 6def1296..39932109 100644 --- a/services/core/ability/utils/src/time_utils_proxy.cpp +++ b/services/core/ability/utils/src/time_utils_proxy.cpp @@ -18,7 +18,7 @@ #include "time_utils.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { int64_t TimeUtilsProxy::GetTimestamp() { return TimeUtils::GetTimestamp(); @@ -33,5 +33,5 @@ int64_t TimeUtilsProxy::GetSystemBootDuration() { return TimeUtils::GetSystemBootDuration(); } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS diff --git a/services/engine/IUpdateService.idl b/services/engine/IUpdateService.idl index 19d30e2e..8f3f982e 100644 --- a/services/engine/IUpdateService.idl +++ b/services/engine/IUpdateService.idl @@ -13,30 +13,30 @@ * limitations under the License. */ -package OHOS.UpdateEngine; +package OHOS.UpdateService; import callback/IUpdateCallback; -sequenceable OHOS.UpdateEngine.BusinessError; -sequenceable OHOS.UpdateEngine.CheckResult; -sequenceable OHOS.UpdateEngine.ClearOptions; -sequenceable OHOS.UpdateEngine.CurrentVersionInfo; -sequenceable OHOS.UpdateEngine.DescriptionOptions; -sequenceable OHOS.UpdateEngine.DownloadOptions; -sequenceable OHOS.UpdateEngine.NewVersionInfo; -sequenceable OHOS.UpdateEngine.PauseDownloadOptions; -sequenceable OHOS.UpdateEngine.ResumeDownloadOptions; -sequenceable OHOS.UpdateEngine.TaskInfo; -sequenceable OHOS.UpdateEngine.UpgradeInfo; -sequenceable OHOS.UpdateEngine.UpgradeOptions; -sequenceable OHOS.UpdateEngine.UpgradePolicy; -sequenceable OHOS.UpdateEngine.VersionDescriptionInfo; -sequenceable OHOS.UpdateEngine.VersionDigestInfo; +sequenceable OHOS.UpdateService.BusinessError; +sequenceable OHOS.UpdateService.CheckResult; +sequenceable OHOS.UpdateService.ClearOptions; +sequenceable OHOS.UpdateService.CurrentVersionInfo; +sequenceable OHOS.UpdateService.DescriptionOptions; +sequenceable OHOS.UpdateService.DownloadOptions; +sequenceable OHOS.UpdateService.NewVersionInfo; +sequenceable OHOS.UpdateService.PauseDownloadOptions; +sequenceable OHOS.UpdateService.ResumeDownloadOptions; +sequenceable OHOS.UpdateService.TaskInfo; +sequenceable OHOS.UpdateService.UpgradeInfo; +sequenceable OHOS.UpdateService.UpgradeOptions; +sequenceable OHOS.UpdateService.UpgradePolicy; +sequenceable OHOS.UpdateService.VersionDescriptionInfo; +sequenceable OHOS.UpdateService.VersionDigestInfo; option_stub_hooks on; option_parcel_hooks on; -interface OHOS.UpdateEngine.IUpdateService { +interface OHOS.UpdateService.IUpdateService { [ipccode 1] int CheckNewVersion([in] UpgradeInfo info, [out] BusinessError businessError, [out] CheckResult checkResult); [ipccode 2] int Download([in] UpgradeInfo info, [in] VersionDigestInfo versionDigestInfo, [in] DownloadOptions downloadOptions, [out] BusinessError businessError); diff --git a/services/engine/callback/IUpdateCallback.idl b/services/engine/callback/IUpdateCallback.idl index 034e7b9d..024ddf58 100644 --- a/services/engine/callback/IUpdateCallback.idl +++ b/services/engine/callback/IUpdateCallback.idl @@ -13,8 +13,8 @@ * limitations under the License. */ -sequenceable OHOS.UpdateEngine.EventInfo; +sequenceable OHOS.UpdateService.EventInfo; -[callback] interface OHOS.UpdateEngine.IUpdateCallback { +[callback] interface OHOS.UpdateService.IUpdateCallback { void OnEvent([in] EventInfo eventInfo) ; } diff --git a/services/engine/include/i_update_notify.h b/services/engine/include/i_update_notify.h index 6bc41c01..8cfa8e89 100644 --- a/services/engine/include/i_update_notify.h +++ b/services/engine/include/i_update_notify.h @@ -20,10 +20,10 @@ #include "iremote_broker.h" -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { class IUpdateNotify : public OHOS::IRemoteBroker { public: DECLARE_INTERFACE_DESCRIPTOR(u"OHOS.Updater.IUpdateNotify"); }; -} // namespace OHOS::UpdateEngine +} // namespace OHOS::UpdateService #endif // I_UPDATE_NOTIFY_H \ No newline at end of file diff --git a/services/engine/include/progress_thread.h b/services/engine/include/progress_thread.h index e97fcb0a..73851cdc 100644 --- a/services/engine/include/progress_thread.h +++ b/services/engine/include/progress_thread.h @@ -25,7 +25,7 @@ #include "progress.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { #define ENGINE_CHECK_NO_LOG(retCode, exper) \ if (!(retCode)) { \ exper; \ @@ -146,6 +146,6 @@ private: int64_t downloadedSize_ = 0; // 已下载大小 std::atomic exitDownload_ { false }; }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // UPDATER_THREAD_H diff --git a/services/engine/include/update_no_constructor.h b/services/engine/include/update_no_constructor.h index 7b10bdc6..7dd8b729 100644 --- a/services/engine/include/update_no_constructor.h +++ b/services/engine/include/update_no_constructor.h @@ -17,7 +17,7 @@ #define UPDATE_NO_CONSTRUCTOR_H namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { class NoConstructor { public: // 禁止默认构造 @@ -26,6 +26,6 @@ public: // 禁止拷贝构造 NoConstructor(const NoConstructor &) = delete; }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // UPDATE_NO_CONSTRUCTOR_H \ No newline at end of file diff --git a/services/engine/include/update_notify.h b/services/engine/include/update_notify.h index 91be2ab0..7742312e 100644 --- a/services/engine/include/update_notify.h +++ b/services/engine/include/update_notify.h @@ -30,7 +30,7 @@ #include "want.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { class UpdateNotify : public IRemoteStub { public: DISALLOW_COPY_AND_MOVE(UpdateNotify); @@ -70,6 +70,6 @@ public: private: sptr instance_ = nullptr; }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // UPDATE_NOTIFY_H \ No newline at end of file diff --git a/services/engine/include/update_service.h b/services/engine/include/update_service.h index 7daab77b..8fa56d7b 100644 --- a/services/engine/include/update_service.h +++ b/services/engine/include/update_service.h @@ -31,7 +31,7 @@ #include "update_service_stub.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { class UpdateService : public SystemAbility, public UpdateServiceStub { public: DECLARE_SYSTEM_ABILITY(UpdateService); @@ -161,6 +161,6 @@ private: std::shared_ptr updateImplMgr_ = nullptr; }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // UPDATE_SERVICE_H \ No newline at end of file diff --git a/services/engine/include/update_service_cache.h b/services/engine/include/update_service_cache.h index a42a986e..1c207a3d 100644 --- a/services/engine/include/update_service_cache.h +++ b/services/engine/include/update_service_cache.h @@ -23,7 +23,7 @@ #include "upgrade_interval.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { class UpdateServiceCache { public: static UpgradeInfo GetUpgradeInfo(BusinessSubType businessSubType); @@ -50,6 +50,6 @@ private: static uint64_t paramDownloadInterval_; static UpgradeInterval paramUpgradeInterval_; }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // UPDATE_SERVICE_CACHE_H \ No newline at end of file diff --git a/services/engine/include/update_service_impl_firmware.h b/services/engine/include/update_service_impl_firmware.h index d8c1ec3e..241b32ef 100644 --- a/services/engine/include/update_service_impl_firmware.h +++ b/services/engine/include/update_service_impl_firmware.h @@ -24,7 +24,7 @@ #include "firmware_task.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { class UpdateServiceImplFirmware final : public IServiceOnlineUpdater { public: UpdateServiceImplFirmware() = default; @@ -82,6 +82,6 @@ private: bool checkComplete_ = false; void GetChangelogContent(std::string &dataXml, const std::string &language); }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // UPDATE_SERVICE_IMPL_FIRMWARE_H \ No newline at end of file diff --git a/services/engine/include/update_service_impl_manager.h b/services/engine/include/update_service_impl_manager.h index 49dbe81c..4827ed13 100644 --- a/services/engine/include/update_service_impl_manager.h +++ b/services/engine/include/update_service_impl_manager.h @@ -23,7 +23,7 @@ #include "upgrade_info.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { class UpdateServiceImplManager { public: UpdateServiceImplManager(); @@ -38,6 +38,6 @@ private: std::mutex updateImplMapLock_; std::map> updateImpMap_; }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // UPDATE_SERVICE_IMPL_MANAGER_H \ No newline at end of file diff --git a/services/engine/include/update_service_local_updater.h b/services/engine/include/update_service_local_updater.h index 84e10259..29273f2b 100644 --- a/services/engine/include/update_service_local_updater.h +++ b/services/engine/include/update_service_local_updater.h @@ -21,7 +21,7 @@ #include "nocopyable.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { class UpdateServiceLocalUpdater final : public IServiceLocalUpdater { public: UpdateServiceLocalUpdater() = default; @@ -36,6 +36,6 @@ public: int32_t VerifyUpgradePackage(const std::string &packagePath, const std::string &keyPath, BusinessError &businessError) final; }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // UPDATE_SERVICE_LOCAL_UPDATER_H \ No newline at end of file diff --git a/services/engine/include/update_service_restorer.h b/services/engine/include/update_service_restorer.h index 69a2f5d1..e898f769 100644 --- a/services/engine/include/update_service_restorer.h +++ b/services/engine/include/update_service_restorer.h @@ -21,7 +21,7 @@ #include "nocopyable.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { class UpdateServiceRestorer final : public IServiceRestorer { public: UpdateServiceRestorer() = default; @@ -32,6 +32,6 @@ public: int32_t FactoryReset(BusinessError &businessError) override; }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // UPDATE_SERVICE_RESTORER_H \ No newline at end of file diff --git a/services/engine/include/update_service_util.h b/services/engine/include/update_service_util.h index d2429498..13ed485a 100644 --- a/services/engine/include/update_service_util.h +++ b/services/engine/include/update_service_util.h @@ -22,12 +22,12 @@ #include "upgrade_info.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { class UpdateServiceUtil { public: static void BuildTaskBody(const Progress &progress, TaskBody &taskBody); static sptr GetUpgradeCallback(const UpgradeInfo &upgradeInfo); }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // UPDATE_SERVICE_UTIL_H \ No newline at end of file diff --git a/services/engine/src/progress_thread.cpp b/services/engine/src/progress_thread.cpp index 24d85dcc..26d5c727 100644 --- a/services/engine/src/progress_thread.cpp +++ b/services/engine/src/progress_thread.cpp @@ -26,7 +26,7 @@ #include "update_log.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { bool ProgressThread::isNoNet_ = false; bool ProgressThread::isCancel_ = false; @@ -283,5 +283,5 @@ FILE* DownloadThread::FileOpen(const std::string &fileName, const std::string &m FILE* fp = fopen(fileName.c_str(), mode.c_str()); return fp; } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS diff --git a/services/engine/src/stream_progress_thread.cpp b/services/engine/src/stream_progress_thread.cpp index 8d1c5b58..53694dd0 100755 --- a/services/engine/src/stream_progress_thread.cpp +++ b/services/engine/src/stream_progress_thread.cpp @@ -30,7 +30,7 @@ #include "update_log.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { int32_t StreamProgressThread::StartDownload(const std::string &url, const int64_t size, const int64_t recordPoint) { @@ -230,5 +230,5 @@ bool StreamProgressThread::DealExitOrCancel() } return false; } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS diff --git a/services/engine/src/update_notify.cpp b/services/engine/src/update_notify.cpp index 18db4f27..c53fc025 100644 --- a/services/engine/src/update_notify.cpp +++ b/services/engine/src/update_notify.cpp @@ -23,7 +23,7 @@ #include "update_log.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { std::mutex UpdateNotify::instanceLock_; sptr UpdateNotify::instance_ = nullptr; @@ -153,5 +153,5 @@ void NotifyConnection::OnAbilityDisconnectDone(const AppExecFwk::ElementName &el { ENGINE_LOGI("OnAbilityDisconnectDone successfully. result %{public}d", resultCode); } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS \ No newline at end of file diff --git a/services/engine/src/update_service.cpp b/services/engine/src/update_service.cpp index 43a380fc..07cb402e 100644 --- a/services/engine/src/update_service.cpp +++ b/services/engine/src/update_service.cpp @@ -50,7 +50,7 @@ using namespace std; namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { constexpr const pid_t ROOT_UID = 0; constexpr const pid_t EDM_UID = 3057; REGISTER_SYSTEM_ABILITY_BY_ID(UpdateService, UPDATE_DISTRIBUTED_SERVICE_ID, true) @@ -609,5 +609,5 @@ bool UpdateService::IsPermissionGranted(uint32_t code) } return isPermissionGranted; } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS diff --git a/services/engine/src/update_service_cache.cpp b/services/engine/src/update_service_cache.cpp index 081ef7bf..26c2c90e 100644 --- a/services/engine/src/update_service_cache.cpp +++ b/services/engine/src/update_service_cache.cpp @@ -23,7 +23,7 @@ #include "upgrade_interval.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { UpgradeInfo UpdateServiceCache::upgradeInfo_{}; uint64_t UpdateServiceCache::checkInterval_ = 0; uint64_t UpdateServiceCache::downloadInterval_ = 0; @@ -150,5 +150,5 @@ void UpdateServiceCache::SetUpgradeEndTime(BusinessSubType businessSubType, uint upgradeInterval_.timeEnd = time; } } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS diff --git a/services/engine/src/update_service_impl_firmware.cpp b/services/engine/src/update_service_impl_firmware.cpp index f8e0f042..10f97e51 100644 --- a/services/engine/src/update_service_impl_firmware.cpp +++ b/services/engine/src/update_service_impl_firmware.cpp @@ -31,7 +31,7 @@ #include "update_service_util.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { const std::string LANGUAGE_CHINESE = ""; const std::string LANGUAGE_ENGLISH = ""; const std::string LANGUAGE_END = ""; @@ -340,5 +340,5 @@ void UpdateServiceImplFirmware::GetChangelogContent(std::string &dataXml, const } StringUtils::StringRemove(dataXml, languageStart, LANGUAGE_END); } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS diff --git a/services/engine/src/update_service_impl_manager.cpp b/services/engine/src/update_service_impl_manager.cpp index 3c0629bd..ccc50bb7 100644 --- a/services/engine/src/update_service_impl_manager.cpp +++ b/services/engine/src/update_service_impl_manager.cpp @@ -21,7 +21,7 @@ using namespace std; namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { UpdateServiceImplManager::UpdateServiceImplManager() { ENGINE_LOGI("UpdateServiceImplManager"); @@ -51,5 +51,5 @@ sptr UpdateServiceImplManager::GetOnlineUpdater(const Upg return updateServiceImpl; } } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS \ No newline at end of file diff --git a/services/engine/src/update_service_local_updater.cpp b/services/engine/src/update_service_local_updater.cpp index 1197b872..c41e1121 100644 --- a/services/engine/src/update_service_local_updater.cpp +++ b/services/engine/src/update_service_local_updater.cpp @@ -23,7 +23,7 @@ #include "update_system_event.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { int32_t UpdateServiceLocalUpdater::ApplyNewVersion(const UpgradeInfo &info, const std::string &miscFile, const std::vector &packageNames, BusinessError &businessError) { @@ -49,5 +49,5 @@ int32_t UpdateServiceLocalUpdater::VerifyUpgradePackage(const std::string &packa ENGINE_LOGI("VerifyUpgradePackage %s, %s, %{public}d", packagePath.c_str(), keyPath.c_str(), ret); return (ret == 0) ? INT_CALL_SUCCESS : INT_CALL_FAIL; } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS diff --git a/services/engine/src/update_service_restorer.cpp b/services/engine/src/update_service_restorer.cpp index 47c37ffa..fe78713f 100644 --- a/services/engine/src/update_service_restorer.cpp +++ b/services/engine/src/update_service_restorer.cpp @@ -25,7 +25,7 @@ #include "update_system_event.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { const std::string MISC_PATH = "/misc"; const std::string MISC_FILE = "/dev/block/by-name/misc"; const std::string CMD_WIPE_DATA = "--user_wipe_data"; @@ -46,5 +46,5 @@ int32_t UpdateServiceRestorer::FactoryReset(BusinessError &businessError) return INT_CALL_SUCCESS; #endif } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS diff --git a/services/engine/src/update_service_util_hmos.cpp b/services/engine/src/update_service_util_hmos.cpp index a12e3848..fbc0e019 100644 --- a/services/engine/src/update_service_util_hmos.cpp +++ b/services/engine/src/update_service_util_hmos.cpp @@ -27,7 +27,7 @@ #include "update_system_event.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { void UpdateServiceUtil::BuildTaskBody(const Progress &progress, TaskBody &taskBody) { taskBody.status = progress.status; @@ -51,5 +51,5 @@ sptr UpdateServiceUtil::GetUpgradeCallback(const UpgradeInfo &u int32_t funcResult = 0; return service->GetUpgradeCallback(upgradeInfo, funcResult); } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS \ No newline at end of file diff --git a/services/firmware/callback/include/firmware_callback_utils.h b/services/firmware/callback/include/firmware_callback_utils.h index 27ce0859..6c3696d5 100644 --- a/services/firmware/callback/include/firmware_callback_utils.h +++ b/services/firmware/callback/include/firmware_callback_utils.h @@ -21,13 +21,13 @@ #include "base_callback_utils.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { class FirmwareCallbackUtils final : public BaseCallbackUtils, public DelayedSingleton { DECLARE_DELAYED_SINGLETON(FirmwareCallbackUtils); protected: BusinessSubType GetBusinessSubType() final; }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // FIRMWARE_CALLBACK_UTILS_H \ No newline at end of file diff --git a/services/firmware/callback/src/firmware_callback_utils.cpp b/services/firmware/callback/src/firmware_callback_utils.cpp index 9fa41276..f4c85b72 100644 --- a/services/firmware/callback/src/firmware_callback_utils.cpp +++ b/services/firmware/callback/src/firmware_callback_utils.cpp @@ -16,7 +16,7 @@ #include "firmware_callback_utils.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { FirmwareCallbackUtils::FirmwareCallbackUtils() {} FirmwareCallbackUtils::~FirmwareCallbackUtils() {} @@ -25,5 +25,5 @@ BusinessSubType FirmwareCallbackUtils::GetBusinessSubType() { return BusinessSubType::FIRMWARE; } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS \ No newline at end of file diff --git a/services/firmware/check/include/firmware_icheck.h b/services/firmware/check/include/firmware_icheck.h index 706521fc..0f4041e8 100644 --- a/services/firmware/check/include/firmware_icheck.h +++ b/services/firmware/check/include/firmware_icheck.h @@ -48,7 +48,7 @@ constexpr int32_t TIMEOUT_FOR_CONNECT = 1; #endif namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { const std::string DEFAULT_SERVER_IP = "127.0.0.1"; const std::string PARAM_NAME_FOR_SEARCH = "update.serverip.search"; using CheckCallback = std::function checkResultList_; }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // FIRMWARE_ICHECK_H \ No newline at end of file diff --git a/services/firmware/common/include/firmware_common.h b/services/firmware/common/include/firmware_common.h index 4a143b40..ce001cec 100644 --- a/services/firmware/common/include/firmware_common.h +++ b/services/firmware/common/include/firmware_common.h @@ -27,7 +27,7 @@ #include "update_define.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { enum class FirmwareStep { INIT = 0, CHECK_STEP, @@ -185,6 +185,6 @@ enum class DownloadEndReason { INIT_PACKAGE_FAIL, NET_CHANGE, }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // FIRMWARE_COMMON_H diff --git a/services/firmware/common/include/firmware_constant.h b/services/firmware/common/include/firmware_constant.h index b232b098..97d699a0 100644 --- a/services/firmware/common/include/firmware_constant.h +++ b/services/firmware/common/include/firmware_constant.h @@ -21,7 +21,7 @@ #include "constant.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { namespace Firmware { constexpr double HALF_PROGRESS = 0.5; constexpr int32_t NIGHT_UPGRADE_START_HOUR = 2; @@ -56,6 +56,6 @@ static const std::vector FIRMWARE_DIR_INFOS { {Firmware::PACKAGE_ROOT_PATH, 0770, true}, {Firmware::PACKAGE_PATH, 0770, true} }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // FIRMWARE_CONSTANT_H diff --git a/services/firmware/common/include/firmware_update_adapter.h b/services/firmware/common/include/firmware_update_adapter.h index 2ac4ccdf..1a3482b4 100644 --- a/services/firmware/common/include/firmware_update_adapter.h +++ b/services/firmware/common/include/firmware_update_adapter.h @@ -23,12 +23,12 @@ #include "firmware_common.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { class FirmwareUpdateAdapter final : public DeviceAdapter { public: static std::string GetUpdateAction(); static std::string GetBusinessDomain(); }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // FIRMWARE_UPDATE_ADAPTER_H \ No newline at end of file diff --git a/services/firmware/common/include/firmware_update_helper.h b/services/firmware/common/include/firmware_update_helper.h index ad7c64dc..25456244 100644 --- a/services/firmware/common/include/firmware_update_helper.h +++ b/services/firmware/common/include/firmware_update_helper.h @@ -37,7 +37,7 @@ #include "version_component.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { class FirmwareUpdateHelper { public: static bool IsBatteryEnough(int32_t batteryLimit); @@ -56,6 +56,6 @@ public: private: static VersionComponent BuildHotaVersionComponent(std::vector &hotaComponents); }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // FIRMWARE_UPDATE_HELPER_H \ No newline at end of file diff --git a/services/firmware/common/src/firmware_update_adapter.cpp b/services/firmware/common/src/firmware_update_adapter.cpp index c2f461b6..75090edc 100644 --- a/services/firmware/common/src/firmware_update_adapter.cpp +++ b/services/firmware/common/src/firmware_update_adapter.cpp @@ -35,7 +35,7 @@ #include "time_utils.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { std::string FirmwareUpdateAdapter::GetBusinessDomain() { return DelayedSingleton::GetInstance()->GetBusinessDomain(); @@ -50,5 +50,5 @@ std::string FirmwareUpdateAdapter::GetUpdateAction() } return "upgrade"; } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS diff --git a/services/firmware/common/src/firmware_update_helper.cpp b/services/firmware/common/src/firmware_update_helper.cpp index 7c54fed7..9351a81b 100644 --- a/services/firmware/common/src/firmware_update_helper.cpp +++ b/services/firmware/common/src/firmware_update_helper.cpp @@ -16,7 +16,7 @@ #include "firmware_update_helper.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { std::string FirmwareUpdateHelper::BuildTaskId(const std::vector &componentList) { if (componentList.empty()) { @@ -178,5 +178,5 @@ bool FirmwareUpdateHelper::IsStreamUpgrade(const std::vector return (componentList[0].otaType == OtaType::AB_STREAM); } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS \ No newline at end of file diff --git a/services/firmware/data/db/include/firmware_component.h b/services/firmware/data/db/include/firmware_component.h index bb8d11ab..58b2b03f 100644 --- a/services/firmware/data/db/include/firmware_component.h +++ b/services/firmware/data/db/include/firmware_component.h @@ -24,7 +24,7 @@ #include "upgrade_status.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { struct FirmwareComponent { int32_t id = 0; @@ -89,6 +89,6 @@ struct FirmwareComponent { .append("recordPoint=").append(std::to_string(recordPoint)); } }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // FIRMWARE_COMPONENT_H diff --git a/services/firmware/data/db/include/firmware_component_operator.h b/services/firmware/data/db/include/firmware_component_operator.h index 7bec4443..e8a5d056 100644 --- a/services/firmware/data/db/include/firmware_component_operator.h +++ b/services/firmware/data/db/include/firmware_component_operator.h @@ -28,7 +28,7 @@ #endif namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { #ifdef RELATIONAL_STORE_NATIVE_RDB_ENABLE class FirmwareComponentOperator final : public TableBaseOperator { #else @@ -51,6 +51,6 @@ public: bool QueryByVersionId(const std::string &versionId, FirmwareComponent &component); bool QueryByUrl(const std::string &url, FirmwareComponent &component); }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // FIRMWARE_COMPONENT_OPERATOR_H \ No newline at end of file diff --git a/services/firmware/data/db/include/firmware_component_table.h b/services/firmware/data/db/include/firmware_component_table.h index d92750f6..f336ef89 100644 --- a/services/firmware/data/db/include/firmware_component_table.h +++ b/services/firmware/data/db/include/firmware_component_table.h @@ -24,7 +24,7 @@ #include "firmware_component.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { const std::string FIRMWARE_TABLE_COMPONENT = "component"; const std::string COLUMN_COMPONENT_VERSION_ID = "versionId"; const std::string COLUMN_COMPONENT_VERSION_PACKAGE_TYPE = "versionPackageType"; @@ -76,6 +76,6 @@ public: std::string GetTableCreateSql(); #endif }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // FIRMWARE_COMPONENT_TABLE_H diff --git a/services/firmware/data/db/include/firmware_database.h b/services/firmware/data/db/include/firmware_database.h index 6b18ea9c..70c9d4b6 100644 --- a/services/firmware/data/db/include/firmware_database.h +++ b/services/firmware/data/db/include/firmware_database.h @@ -24,7 +24,7 @@ #endif namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { #ifdef RELATIONAL_STORE_NATIVE_RDB_ENABLE class FirmwareDatabase final : public SqliteDb, DelayedSingleton { DECLARE_DELAYED_SINGLETON(FirmwareDatabase); @@ -54,6 +54,6 @@ private: FirmwareDatabaseCallback dbOpenCallback_; #endif }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // FIRMWARE_DATABASE_H diff --git a/services/firmware/data/db/include/firmware_database_callback.h b/services/firmware/data/db/include/firmware_database_callback.h index 77574d9d..b32d9143 100644 --- a/services/firmware/data/db/include/firmware_database_callback.h +++ b/services/firmware/data/db/include/firmware_database_callback.h @@ -25,7 +25,7 @@ #endif namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { #ifdef RELATIONAL_STORE_NATIVE_RDB_ENABLE class FirmwareDatabaseCallback final : public NativeRdb::RdbOpenCallback { #else @@ -41,6 +41,6 @@ public: private: std::vector GenerateDbCreateSqlVector(); }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // FIRMWARE_DATABASE_CALLBACK_H diff --git a/services/firmware/data/db/include/firmware_task.h b/services/firmware/data/db/include/firmware_task.h index 83aaea95..93ccc486 100644 --- a/services/firmware/data/db/include/firmware_task.h +++ b/services/firmware/data/db/include/firmware_task.h @@ -24,7 +24,7 @@ #include "update_define.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { struct FirmwareTask { std::string taskId; UpgradeStatus status = UpgradeStatus::INIT; @@ -73,6 +73,6 @@ struct FirmwareTask { .append("isStreamUpgrade=").append(std::to_string(isStreamUpgrade)); } }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // FIRMWARE_TASK_H diff --git a/services/firmware/data/db/include/firmware_task_operator.h b/services/firmware/data/db/include/firmware_task_operator.h index 37e3d52a..abd8f416 100644 --- a/services/firmware/data/db/include/firmware_task_operator.h +++ b/services/firmware/data/db/include/firmware_task_operator.h @@ -30,7 +30,7 @@ #endif namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { #ifdef RELATIONAL_STORE_NATIVE_RDB_ENABLE class FirmwareTaskOperator final : public TableBaseOperator { #else @@ -67,6 +67,6 @@ private: bool UpdateByTaskId(const std::string &taskId, const NativeRdb::ValuesBucket &values); #endif }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // FIRMWARE_TASK_OPERATOR_H \ No newline at end of file diff --git a/services/firmware/data/db/include/firmware_task_table.h b/services/firmware/data/db/include/firmware_task_table.h index ca24a41c..942d225b 100644 --- a/services/firmware/data/db/include/firmware_task_table.h +++ b/services/firmware/data/db/include/firmware_task_table.h @@ -24,7 +24,7 @@ #include "firmware_task.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { const std::string FIRMWARE_TABLE_TASK = "task"; const std::string COLUMN_TASK_TASK_ID = "taskId"; const std::string COLUMN_TASK_STATUS = "status"; @@ -73,6 +73,6 @@ public: std::string GetTableCreateSql(); #endif }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // FIRMWARE_TASK_TABLE_H diff --git a/services/firmware/data/db/src/firmware_component_operator.cpp b/services/firmware/data/db/src/firmware_component_operator.cpp index fcebe8e8..df092a8a 100644 --- a/services/firmware/data/db/src/firmware_component_operator.cpp +++ b/services/firmware/data/db/src/firmware_component_operator.cpp @@ -18,7 +18,7 @@ #include namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { bool FirmwareComponentOperator::UpdateProgressByUrl(const std::string &url, UpgradeStatus status, int32_t progress) { NativeRdb::ValuesBucket values; @@ -83,5 +83,5 @@ bool FirmwareComponentOperator::QueryByUrl(const std::string &url, FirmwareCompo } return false; } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS diff --git a/services/firmware/data/db/src/firmware_component_operator_empty.cpp b/services/firmware/data/db/src/firmware_component_operator_empty.cpp index 6f4779ac..03a9b9ae 100644 --- a/services/firmware/data/db/src/firmware_component_operator_empty.cpp +++ b/services/firmware/data/db/src/firmware_component_operator_empty.cpp @@ -18,7 +18,7 @@ #include namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { bool FirmwareComponentOperator::QueryAll(const std::vector &results) { return true; @@ -53,5 +53,5 @@ bool FirmwareComponentOperator::QueryByUrl(const std::string &url, FirmwareCompo { return true; } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS \ No newline at end of file diff --git a/services/firmware/data/db/src/firmware_component_table.cpp b/services/firmware/data/db/src/firmware_component_table.cpp index 760a4c54..7b947c8d 100644 --- a/services/firmware/data/db/src/firmware_component_table.cpp +++ b/services/firmware/data/db/src/firmware_component_table.cpp @@ -16,7 +16,7 @@ #include "firmware_component_table.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { std::string FirmwareComponentTable::GetTableName() { return FIRMWARE_TABLE_COMPONENT; @@ -122,5 +122,5 @@ void FirmwareComponentTable::BuildDbValue(const FirmwareComponent &value, Native PutColumnValue(dbValue, COLUMN_COMPONENT_PROGRESS, value.progress); PutColumnValue(dbValue, COLUMN_COMPONENT_RECORD_POINT, value.recordPoint); } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS \ No newline at end of file diff --git a/services/firmware/data/db/src/firmware_component_table_empty.cpp b/services/firmware/data/db/src/firmware_component_table_empty.cpp index aba59f86..dd315c2f 100644 --- a/services/firmware/data/db/src/firmware_component_table_empty.cpp +++ b/services/firmware/data/db/src/firmware_component_table_empty.cpp @@ -16,7 +16,7 @@ #include "firmware_component_table.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { const std::string COLUMN_ID = "id"; std::string FirmwareComponentTable::GetTableName() { @@ -27,5 +27,5 @@ std::string FirmwareComponentTable::GetTableCreateSql() { return ""; } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS \ No newline at end of file diff --git a/services/firmware/data/db/src/firmware_database.cpp b/services/firmware/data/db/src/firmware_database.cpp index 304609da..63ecbe7f 100644 --- a/services/firmware/data/db/src/firmware_database.cpp +++ b/services/firmware/data/db/src/firmware_database.cpp @@ -18,7 +18,7 @@ #include "constant.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { const std::string FIRMWARE_DB_NAME = "/firmware_sqlite.db"; constexpr int32_t FIRMWARE_DB_VERSION = 1; FirmwareDatabase::FirmwareDatabase() @@ -52,5 +52,5 @@ NativeRdb::RdbOpenCallback &FirmwareDatabase::GetDbOpenCallback() { return dbOpenCallback_; } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS diff --git a/services/firmware/data/db/src/firmware_database_callback.cpp b/services/firmware/data/db/src/firmware_database_callback.cpp index 14e0ef1a..aff1a827 100644 --- a/services/firmware/data/db/src/firmware_database_callback.cpp +++ b/services/firmware/data/db/src/firmware_database_callback.cpp @@ -24,7 +24,7 @@ #include "firmware_task_table.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { enum { VERSION_INITIAL_VERSION = 1, @@ -71,5 +71,5 @@ std::vector FirmwareDatabaseCallback::GenerateDbCreateSqlVector() dbCreateSqlVector.push_back(FirmwareTaskTable().GetTableCreateSql()); return dbCreateSqlVector; } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS \ No newline at end of file diff --git a/services/firmware/data/db/src/firmware_database_empty.cpp b/services/firmware/data/db/src/firmware_database_empty.cpp index d10b6163..0e39081e 100644 --- a/services/firmware/data/db/src/firmware_database_empty.cpp +++ b/services/firmware/data/db/src/firmware_database_empty.cpp @@ -18,7 +18,7 @@ #include "constant.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { const std::string FIRMWARE_DB_NAME = "/firmware_sqlite.db"; constexpr int32_t FIRMWARE_DB_VERSION = 1; FirmwareDatabase::FirmwareDatabase() @@ -52,5 +52,5 @@ bool FirmwareDatabase::DeleteDbStore() { return true; } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS diff --git a/services/firmware/data/db/src/firmware_task_operator.cpp b/services/firmware/data/db/src/firmware_task_operator.cpp index fb0c35cf..bf8e377a 100644 --- a/services/firmware/data/db/src/firmware_task_operator.cpp +++ b/services/firmware/data/db/src/firmware_task_operator.cpp @@ -24,7 +24,7 @@ #include "upgrade_status.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { void FirmwareTaskOperator::QueryTask(FirmwareTask &task) { std::vector taskList; @@ -127,5 +127,5 @@ bool FirmwareTaskOperator::UpdateByTaskId(const std::string &taskId, const Nativ predicates.EqualTo(COLUMN_TASK_TASK_ID, taskId); return TableBaseOperator::Update(values, predicates); } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS diff --git a/services/firmware/data/db/src/firmware_task_operator_empty.cpp b/services/firmware/data/db/src/firmware_task_operator_empty.cpp index b2454fca..346e2c66 100644 --- a/services/firmware/data/db/src/firmware_task_operator_empty.cpp +++ b/services/firmware/data/db/src/firmware_task_operator_empty.cpp @@ -22,7 +22,7 @@ #include "order.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { bool FirmwareTaskOperator::Insert(const FirmwareTask &values) { return true; @@ -89,5 +89,5 @@ bool FirmwareTaskOperator::UpdateUpgradeOrderByTaskId(const std::string &taskId, { return true; } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS diff --git a/services/firmware/data/db/src/firmware_task_table.cpp b/services/firmware/data/db/src/firmware_task_table.cpp index 3373b8b9..ded98354 100644 --- a/services/firmware/data/db/src/firmware_task_table.cpp +++ b/services/firmware/data/db/src/firmware_task_table.cpp @@ -18,7 +18,7 @@ #include "update_define.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { std::string FirmwareTaskTable::GetTableName() { return FIRMWARE_TABLE_TASK; @@ -116,5 +116,5 @@ void FirmwareTaskTable::BuildDbValue(const FirmwareTask &value, NativeRdb::Value PutColumnValue(dbValue, COLUMN_TASK_AUTH_TIME, value.authTime); PutColumnValue(dbValue, COLUMN_TASK_IS_STREAM_UPGRADE, value.isStreamUpgrade); } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS \ No newline at end of file diff --git a/services/firmware/data/db/src/firmware_task_table_empty.cpp b/services/firmware/data/db/src/firmware_task_table_empty.cpp index 56167839..f730009a 100644 --- a/services/firmware/data/db/src/firmware_task_table_empty.cpp +++ b/services/firmware/data/db/src/firmware_task_table_empty.cpp @@ -16,7 +16,7 @@ #include "firmware_task_table.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { std::string FirmwareTaskTable::GetTableName() { return ""; @@ -26,5 +26,5 @@ std::string FirmwareTaskTable::GetTableCreateSql() { return ""; } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS \ No newline at end of file diff --git a/services/firmware/data/manager/include/firmware_preferences_utils.h b/services/firmware/data/manager/include/firmware_preferences_utils.h index 4ace0221..bfcdba9c 100644 --- a/services/firmware/data/manager/include/firmware_preferences_utils.h +++ b/services/firmware/data/manager/include/firmware_preferences_utils.h @@ -21,13 +21,13 @@ #include "preferences_utils.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { class FirmwarePreferencesUtil : public PreferencesUtil, public DelayedSingleton { DECLARE_DELAYED_SINGLETON(FirmwarePreferencesUtil); protected: std::string GetPath() final; }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // FIRMWARE_PREFERENCES_UTILS_H \ No newline at end of file diff --git a/services/firmware/data/manager/src/firmware_preferences_utils.cpp b/services/firmware/data/manager/src/firmware_preferences_utils.cpp index fed15301..f8148d9c 100644 --- a/services/firmware/data/manager/src/firmware_preferences_utils.cpp +++ b/services/firmware/data/manager/src/firmware_preferences_utils.cpp @@ -19,7 +19,7 @@ #include "firmware_log.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { FirmwarePreferencesUtil::FirmwarePreferencesUtil() { FIRMWARE_LOGD("FirmwarePreferencesUtil"); @@ -34,5 +34,5 @@ std::string FirmwarePreferencesUtil::GetPath() { return Constant::PREFERENCES_ROOT_PATH + "/update_firmware_sp.xml"; } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS diff --git a/services/firmware/event/include/firmware_event_listener.h b/services/firmware/event/include/firmware_event_listener.h index d49927f4..ed2e1ff5 100644 --- a/services/firmware/event/include/firmware_event_listener.h +++ b/services/firmware/event/include/firmware_event_listener.h @@ -21,7 +21,7 @@ #include "dupdate_inet_observer.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { class FirmwareEventListener : public DelayedSingleton { DECLARE_DELAYED_SINGLETON(FirmwareEventListener); @@ -29,6 +29,6 @@ public: void RegisterNetChangedListener(); void UnregisterNetChangedListener(); }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // FIRMWARE_EVENT_LISTENER_H \ No newline at end of file diff --git a/services/firmware/event/src/firmware_event_listener.cpp b/services/firmware/event/src/firmware_event_listener.cpp index 89590644..7cc01541 100644 --- a/services/firmware/event/src/firmware_event_listener.cpp +++ b/services/firmware/event/src/firmware_event_listener.cpp @@ -22,7 +22,7 @@ #include "update_define.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { FirmwareEventListener::FirmwareEventListener() { FIRMWARE_LOGD("FirmwareEventListener::FirmwareEventListener"); @@ -49,5 +49,5 @@ void FirmwareEventListener::UnregisterNetChangedListener() FIRMWARE_LOGI("FirmwareEventListener UnregisterNetChangedListener"); DelayedSingleton::GetInstance()->UnregisterCallback(NetChangeCallbackType::HOTA_DOWNLOAD); } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS \ No newline at end of file diff --git a/services/firmware/event/src/firmware_event_listener_empty.cpp b/services/firmware/event/src/firmware_event_listener_empty.cpp index 21dc8281..5846c83b 100644 --- a/services/firmware/event/src/firmware_event_listener_empty.cpp +++ b/services/firmware/event/src/firmware_event_listener_empty.cpp @@ -18,7 +18,7 @@ #include "firmware_log.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { FirmwareEventListener::FirmwareEventListener() { FIRMWARE_LOGD("FirmwareEventListener::FirmwareEventListener"); @@ -38,5 +38,5 @@ void FirmwareEventListener::UnregisterNetChangedListener() { FIRMWARE_LOGI("FirmwareEventListener UnregisterNetChangedListener"); } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS \ No newline at end of file diff --git a/services/firmware/upgrade/data_processor/include/firmware_check_data_processor.h b/services/firmware/upgrade/data_processor/include/firmware_check_data_processor.h index b1bbe6d7..896fc5ce 100644 --- a/services/firmware/upgrade/data_processor/include/firmware_check_data_processor.h +++ b/services/firmware/upgrade/data_processor/include/firmware_check_data_processor.h @@ -23,7 +23,7 @@ #include "new_version_info.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { class FirmwareCheckDataProcessor { public: FirmwareCheckDataProcessor(); @@ -63,6 +63,6 @@ private: bool isSameWithDb_ = true; CheckStatus status_ = CheckStatus::CHECK_FAIL; }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // FIRMWARE_CHECK_DATA_PROCESSOR_H \ No newline at end of file diff --git a/services/firmware/upgrade/data_processor/include/firmware_download_data_processor.h b/services/firmware/upgrade/data_processor/include/firmware_download_data_processor.h index 186c864b..8f46900b 100644 --- a/services/firmware/upgrade/data_processor/include/firmware_download_data_processor.h +++ b/services/firmware/upgrade/data_processor/include/firmware_download_data_processor.h @@ -21,7 +21,7 @@ #include "progress.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { class FirmwareDownloadDataProcessor { public: FirmwareDownloadDataProcessor(); @@ -40,6 +40,6 @@ private: FirmwareTask tasks_; Progress downloadProgress_; }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // FIRMWARE_DOWNLOAD_DATA_RPOCESSOR_H \ No newline at end of file diff --git a/services/firmware/upgrade/data_processor/include/firmware_install_data_processor.h b/services/firmware/upgrade/data_processor/include/firmware_install_data_processor.h index ab8028d6..2b102193 100644 --- a/services/firmware/upgrade/data_processor/include/firmware_install_data_processor.h +++ b/services/firmware/upgrade/data_processor/include/firmware_install_data_processor.h @@ -20,7 +20,7 @@ #include "firmware_task.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { class FirmwareInstallDataProcessor { public: FirmwareInstallDataProcessor() = default; @@ -39,6 +39,6 @@ private: private: FirmwareTask tasks_; }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // FIRMWARE_INSTALL_DATA_RPOCESSOR_H \ No newline at end of file diff --git a/services/firmware/upgrade/data_processor/src/firmware_check_data_processor.cpp b/services/firmware/upgrade/data_processor/src/firmware_check_data_processor.cpp index d3fd4cd1..b3d96a30 100644 --- a/services/firmware/upgrade/data_processor/src/firmware_check_data_processor.cpp +++ b/services/firmware/upgrade/data_processor/src/firmware_check_data_processor.cpp @@ -33,7 +33,7 @@ #include "time_utils.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { FirmwareCheckDataProcessor::FirmwareCheckDataProcessor() { FIRMWARE_LOGD("FirmwareCheckDataProcessor::FirmwareCheckDataProcessor"); @@ -258,5 +258,5 @@ void FirmwareCheckDataProcessor::BuildVersionDigest( { newVersionInfo.versionDigestInfo.versionDigest = FirmwareUpdateHelper::BuildTaskId(componentList); } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS \ No newline at end of file diff --git a/services/firmware/upgrade/data_processor/src/firmware_check_data_processor_empty.cpp b/services/firmware/upgrade/data_processor/src/firmware_check_data_processor_empty.cpp index 41e27984..a590adb3 100644 --- a/services/firmware/upgrade/data_processor/src/firmware_check_data_processor_empty.cpp +++ b/services/firmware/upgrade/data_processor/src/firmware_check_data_processor_empty.cpp @@ -18,7 +18,7 @@ #include "firmware_log.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { FirmwareCheckDataProcessor::FirmwareCheckDataProcessor() { FIRMWARE_LOGD("FirmwareCheckDataProcessor::FirmwareCheckDataProcessor"); @@ -118,5 +118,5 @@ void FirmwareCheckDataProcessor::BuildVersionDigest( { FIRMWARE_LOGI("FirmwareCheckDataProcessor::BuildVersionDigest"); } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS \ No newline at end of file diff --git a/services/firmware/upgrade/data_processor/src/firmware_download_data_processor.cpp b/services/firmware/upgrade/data_processor/src/firmware_download_data_processor.cpp index f5ef4f54..2a01bceb 100644 --- a/services/firmware/upgrade/data_processor/src/firmware_download_data_processor.cpp +++ b/services/firmware/upgrade/data_processor/src/firmware_download_data_processor.cpp @@ -26,7 +26,7 @@ #include "string_utils.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { FirmwareDownloadDataProcessor::FirmwareDownloadDataProcessor() { FIRMWARE_LOGD("FirmwareDownloadDataProcessor::FirmwareDownloadDataProcessor"); @@ -80,5 +80,5 @@ Progress FirmwareDownloadDataProcessor::GetDownloadProgress() { return downloadProgress_; } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS diff --git a/services/firmware/upgrade/data_processor/src/firmware_install_data_processor.cpp b/services/firmware/upgrade/data_processor/src/firmware_install_data_processor.cpp index 79592b1f..ec825d43 100644 --- a/services/firmware/upgrade/data_processor/src/firmware_install_data_processor.cpp +++ b/services/firmware/upgrade/data_processor/src/firmware_install_data_processor.cpp @@ -26,7 +26,7 @@ #include "string_utils.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { constexpr int64_t SPACE_OFFSET = 100 *1024 *1024; bool FirmwareInstallDataProcessor::IsSpaceEnough(int64_t &requireTotalSize) @@ -112,5 +112,5 @@ bool FirmwareInstallDataProcessor::IsUpgradeFileCheckSuccess() FirmwareComponentOperator().QueryAll(components); return FirmwareUpdateHelper::IsUpgradePackagesReady(components); } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS diff --git a/services/firmware/upgrade/executor/include/firmware_apply_executor.h b/services/firmware/upgrade/executor/include/firmware_apply_executor.h index 4501cec9..24299214 100644 --- a/services/firmware/upgrade/executor/include/firmware_apply_executor.h +++ b/services/firmware/upgrade/executor/include/firmware_apply_executor.h @@ -24,7 +24,7 @@ #include "firmware_install.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { class FirmwareApplyExecutor : public FirmwareIExecutor { public: FirmwareApplyExecutor(FirmwareApplyCallback firmwareApplyCallback) @@ -41,6 +41,6 @@ private: std::vector components_; FirmwareTask tasks_; }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // FIRMWARE_APPLY_EXECUTOR_H \ No newline at end of file diff --git a/services/firmware/upgrade/executor/include/firmware_check_executor.h b/services/firmware/upgrade/executor/include/firmware_check_executor.h index c341eb9f..1bea0f5f 100644 --- a/services/firmware/upgrade/executor/include/firmware_check_executor.h +++ b/services/firmware/upgrade/executor/include/firmware_check_executor.h @@ -21,7 +21,7 @@ #include "firmware_iexecutor.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { class FirmwareCheckExecutor : public FirmwareIExecutor { public: FirmwareCheckExecutor(FirmwareCheckComponentCallback checkComponentCallback) @@ -42,6 +42,6 @@ private: std::vector componentList_; CheckStatus status_ = CheckStatus::CHECK_SUCCESS; }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // FIRMWARE_CHECK_EXECUTOR_H \ No newline at end of file diff --git a/services/firmware/upgrade/executor/include/firmware_download_executor.h b/services/firmware/upgrade/executor/include/firmware_download_executor.h index fb8f301d..292ff426 100644 --- a/services/firmware/upgrade/executor/include/firmware_download_executor.h +++ b/services/firmware/upgrade/executor/include/firmware_download_executor.h @@ -23,7 +23,7 @@ #include "progress_thread.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { class FirmwareDownloadExecutor : public FirmwareIExecutor { public: FirmwareDownloadExecutor(const DownloadOptions &downloadOptions, FirmwareProgressCallback progressCallback) @@ -46,6 +46,6 @@ private: UpgradeStatus upgradeStatus_ = UpgradeStatus::INIT; std::shared_ptr downloadThread_ = nullptr; }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // FIRMWARE_DOWNLOAD_EXECUTOR_H \ No newline at end of file diff --git a/services/firmware/upgrade/executor/include/firmware_iexecutor.h b/services/firmware/upgrade/executor/include/firmware_iexecutor.h index 47c9b81e..eef248ad 100644 --- a/services/firmware/upgrade/executor/include/firmware_iexecutor.h +++ b/services/firmware/upgrade/executor/include/firmware_iexecutor.h @@ -23,7 +23,7 @@ #include "progress.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { using FirmwareComponentCallback = std::function &componentList, const CheckAndAuthInfo &checkAndAuthInfo)>; @@ -56,6 +56,6 @@ public: virtual ~FirmwareIExecutor() = default; virtual void Execute() = 0; }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // FIRMWARE_IEXECUTOR_H \ No newline at end of file diff --git a/services/firmware/upgrade/executor/include/firmware_install_executor.h b/services/firmware/upgrade/executor/include/firmware_install_executor.h index 61981c28..8850cd72 100644 --- a/services/firmware/upgrade/executor/include/firmware_install_executor.h +++ b/services/firmware/upgrade/executor/include/firmware_install_executor.h @@ -24,7 +24,7 @@ #include "firmware_install.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { class FirmwareInstallExecutor : public FirmwareIExecutor { public: FirmwareInstallExecutor(InstallType installType, FirmwareInstallExecutorCallback firmwareInstallCallback) @@ -49,6 +49,6 @@ private: std::shared_ptr preferencesUtil_ = DelayedSingleton::GetInstance(); }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // FIRMWARE_INSTALL_EXECUTOR_H \ No newline at end of file diff --git a/services/firmware/upgrade/executor/src/firmware_apply_executor.cpp b/services/firmware/upgrade/executor/src/firmware_apply_executor.cpp index 902fe595..2273bebf 100644 --- a/services/firmware/upgrade/executor/src/firmware_apply_executor.cpp +++ b/services/firmware/upgrade/executor/src/firmware_apply_executor.cpp @@ -28,7 +28,7 @@ #include "firmware_update_helper.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { void FirmwareApplyExecutor::Execute() { FIRMWARE_LOGI("FirmwareApplyExecutor::Execute"); @@ -60,5 +60,5 @@ void FirmwareApplyExecutor::GetTask() FirmwareTaskOperator().QueryTask(tasks_); } } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS diff --git a/services/firmware/upgrade/executor/src/firmware_check_executor.cpp b/services/firmware/upgrade/executor/src/firmware_check_executor.cpp index 1ca519e1..422b35f6 100644 --- a/services/firmware/upgrade/executor/src/firmware_check_executor.cpp +++ b/services/firmware/upgrade/executor/src/firmware_check_executor.cpp @@ -27,7 +27,7 @@ #include "firmware_update_helper.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { void FirmwareCheckExecutor::Execute() { FIRMWARE_LOGI("FirmwareCheckExecutor::Execute"); @@ -82,5 +82,5 @@ void FirmwareCheckExecutor::SetComponentCheckStatus() component.status = UpgradeStatus::CHECK_VERSION_SUCCESS; } } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS diff --git a/services/firmware/upgrade/executor/src/firmware_download_executor.cpp b/services/firmware/upgrade/executor/src/firmware_download_executor.cpp index 4c246e7e..adb95a93 100644 --- a/services/firmware/upgrade/executor/src/firmware_download_executor.cpp +++ b/services/firmware/upgrade/executor/src/firmware_download_executor.cpp @@ -32,7 +32,7 @@ #include "string_utils.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { const mode_t MKDIR_MODE = 0777; void FirmwareDownloadExecutor::Execute() { @@ -175,5 +175,5 @@ bool FirmwareDownloadExecutor::VerifyDownloadPkg(const std::string &pkgName, Pro } return true; } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS diff --git a/services/firmware/upgrade/executor/src/firmware_install_executor.cpp b/services/firmware/upgrade/executor/src/firmware_install_executor.cpp index 6b4c2632..fee793ab 100644 --- a/services/firmware/upgrade/executor/src/firmware_install_executor.cpp +++ b/services/firmware/upgrade/executor/src/firmware_install_executor.cpp @@ -27,7 +27,7 @@ #include "firmware_update_helper.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { void FirmwareInstallExecutor::Execute() { FIRMWARE_LOGI("FirmwareInstallExecutor::Execute"); @@ -161,5 +161,5 @@ void FirmwareInstallExecutor::HandleInstallResult(const bool result, const Error installCallback_.installCallback(installCallbackInfo_); } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS diff --git a/services/firmware/upgrade/flow/include/firmware_flow_manager.h b/services/firmware/upgrade/flow/include/firmware_flow_manager.h index 1940a9c0..a09907ec 100644 --- a/services/firmware/upgrade/flow/include/firmware_flow_manager.h +++ b/services/firmware/upgrade/flow/include/firmware_flow_manager.h @@ -23,7 +23,7 @@ #include "progress.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { class FirmwareFlowManager { public: FirmwareFlowManager(); @@ -49,6 +49,6 @@ private: std::shared_ptr executor_ = nullptr; FirmwareStep nextStep_ = FirmwareStep::INIT; }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // FIRMWARE_FLOW_MANAGER_H \ No newline at end of file diff --git a/services/firmware/upgrade/flow/include/firmware_manager.h b/services/firmware/upgrade/flow/include/firmware_manager.h index e062c6b1..0cf44c78 100644 --- a/services/firmware/upgrade/flow/include/firmware_manager.h +++ b/services/firmware/upgrade/flow/include/firmware_manager.h @@ -31,7 +31,7 @@ #include "upgrade_options.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { class FirmwareManager : public DelayedSingleton { DECLARE_DELAYED_SINGLETON(FirmwareManager); @@ -74,6 +74,6 @@ private: std::shared_ptr preferencesUtil_ = DelayedSingleton::GetInstance(); }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // FIRMWARE_MANAGER_H \ No newline at end of file diff --git a/services/firmware/upgrade/flow/src/firmware_flow_manager.cpp b/services/firmware/upgrade/flow/src/firmware_flow_manager.cpp index b41ca867..8d692fef 100644 --- a/services/firmware/upgrade/flow/src/firmware_flow_manager.cpp +++ b/services/firmware/upgrade/flow/src/firmware_flow_manager.cpp @@ -24,7 +24,7 @@ #include "firmware_log.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { FirmwareFlowManager::FirmwareFlowManager() { FIRMWARE_LOGD("FirmwareFlowManager::FirmwareFlowManager()"); @@ -159,5 +159,5 @@ std::shared_ptr FirmwareFlowManager::CreateInstance(FirmwareS } return executor; } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS \ No newline at end of file diff --git a/services/firmware/upgrade/flow/src/firmware_manager.cpp b/services/firmware/upgrade/flow/src/firmware_manager.cpp index 58f82da8..88a0e146 100644 --- a/services/firmware/upgrade/flow/src/firmware_manager.cpp +++ b/services/firmware/upgrade/flow/src/firmware_manager.cpp @@ -48,7 +48,7 @@ #include "time_utils.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { constexpr int32_t INIT_DELAY_TIME = 5; // 进程启动延时时间5秒,为了安装重启之后可以看到版本号及时刷新 constexpr int32_t PROCESS_EXIT_DELAY_TIME = 1; // 进程退出等待时间,单位:秒 constexpr uint64_t PULLUP_AFTER_TERMINATE_INTERVAL = 5; // 终止升级后SA拉起间隔 @@ -516,5 +516,5 @@ void FirmwareManager::NotifyInitEvent() UpgradeStatus::INIT); } } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS diff --git a/services/firmware/upgrade/install/include/firmware_install.h b/services/firmware/upgrade/install/include/firmware_install.h index e8d10392..f18e59ea 100644 --- a/services/firmware/upgrade/install/include/firmware_install.h +++ b/services/firmware/upgrade/install/include/firmware_install.h @@ -25,7 +25,7 @@ #include "progress.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { constexpr int32_t SLEEP_INSTALL = 1; struct InstallProgress { @@ -65,6 +65,6 @@ private: std::mutex mutex_; bool isInstalling_ = false; }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // FIRMWARE_INSTALL_H \ No newline at end of file diff --git a/services/firmware/upgrade/install/include/firmware_install_factory.h b/services/firmware/upgrade/install/include/firmware_install_factory.h index 2c339e02..75ed9c00 100644 --- a/services/firmware/upgrade/install/include/firmware_install_factory.h +++ b/services/firmware/upgrade/install/include/firmware_install_factory.h @@ -22,11 +22,11 @@ #include "firmware_install.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { class InstallFactory final { public: static std::shared_ptr GetInstance(InstallType type); }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // FIRMWARE_INSTALL_FACTORY diff --git a/services/firmware/upgrade/install/include/firmware_stream_installer_install.h b/services/firmware/upgrade/install/include/firmware_stream_installer_install.h index 9e70443e..ee1c6f6f 100755 --- a/services/firmware/upgrade/install/include/firmware_stream_installer_install.h +++ b/services/firmware/upgrade/install/include/firmware_stream_installer_install.h @@ -26,7 +26,7 @@ #include "progress_thread.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { constexpr int16_t MAX_RETRY_COUNT = 3; // 重试次数 constexpr int32_t RETRY_INTERVAL_TIME = 100 * 1000; // 重试间隔时间50ms @@ -50,6 +50,6 @@ private: std::mutex installMutex_; std::condition_variable installCond_; }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // FIRMWARE_STREAM_INSTALLER_INSTALL_H \ No newline at end of file diff --git a/services/firmware/upgrade/install/include/firmware_sys_installer_callback.h b/services/firmware/upgrade/install/include/firmware_sys_installer_callback.h index a8acbae7..d69dec77 100644 --- a/services/firmware/upgrade/install/include/firmware_sys_installer_callback.h +++ b/services/firmware/upgrade/install/include/firmware_sys_installer_callback.h @@ -22,7 +22,7 @@ #include "firmware_sys_installer_install.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { class SysInstallerCallback : public SysInstaller::ISysInstallerCallbackFunc { public: explicit SysInstallerCallback(SysInstallerExecutorCallback &installCallback); @@ -36,6 +36,6 @@ public: private: SysInstallerExecutorCallback sysInstallCallback_; }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // FIRMWARE_SYS_INSTALLER_CALLBACK_H \ No newline at end of file diff --git a/services/firmware/upgrade/install/include/firmware_sys_installer_install.h b/services/firmware/upgrade/install/include/firmware_sys_installer_install.h index 7b49dcbd..e00edf82 100644 --- a/services/firmware/upgrade/install/include/firmware_sys_installer_install.h +++ b/services/firmware/upgrade/install/include/firmware_sys_installer_install.h @@ -22,7 +22,7 @@ #include "firmware_install.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { using OnSysInstallerCallback = std::function; struct SysInstallerExecutorCallback { @@ -41,6 +41,6 @@ private: private: Progress sysInstallProgress_; }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // FIRMWARE_SYS_INSTALLER_INSTALL_H \ No newline at end of file diff --git a/services/firmware/upgrade/install/include/firmware_updater_install.h b/services/firmware/upgrade/install/include/firmware_updater_install.h index 146b5044..1e552330 100644 --- a/services/firmware/upgrade/install/include/firmware_updater_install.h +++ b/services/firmware/upgrade/install/include/firmware_updater_install.h @@ -22,13 +22,13 @@ #include "firmware_install.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { class UpdaterInstall final : public FirmwareInstall { private: bool IsComponentLegal(const std::vector &componentList) final; bool PerformInstall(const std::vector &componentList, UpgradeStatus &status) final; int32_t DoUpdaterInstall(const std::vector &componentList); }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // FIRMWARE_UPDATER_INSTALL_H \ No newline at end of file diff --git a/services/firmware/upgrade/install/src/firmware_install.cpp b/services/firmware/upgrade/install/src/firmware_install.cpp index 4e1052f9..e2a427c3 100644 --- a/services/firmware/upgrade/install/src/firmware_install.cpp +++ b/services/firmware/upgrade/install/src/firmware_install.cpp @@ -28,7 +28,7 @@ #include "file_utils.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { void FirmwareInstall::StartInstall(const std::vector &componentList, FirmwareInstallCallback &cb) { if (IsInstalling()) { @@ -75,5 +75,5 @@ void FirmwareInstall::CallbackResult(FirmwareInstallCallback &cb, bool result, U { cb.onFirmwareEvent(result, errMsg_, status); } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS diff --git a/services/firmware/upgrade/install/src/firmware_install_factory.cpp b/services/firmware/upgrade/install/src/firmware_install_factory.cpp index 3b80df1f..9d50b5fd 100644 --- a/services/firmware/upgrade/install/src/firmware_install_factory.cpp +++ b/services/firmware/upgrade/install/src/firmware_install_factory.cpp @@ -20,7 +20,7 @@ #include "firmware_update_helper.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { std::shared_ptr InstallFactory::GetInstance(InstallType type) { switch (type) { @@ -32,5 +32,5 @@ std::shared_ptr InstallFactory::GetInstance(InstallType type) return std::make_shared(); } } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS \ No newline at end of file diff --git a/services/firmware/upgrade/install/src/firmware_stream_installer_install.cpp b/services/firmware/upgrade/install/src/firmware_stream_installer_install.cpp index 1797ce98..a966f19a 100755 --- a/services/firmware/upgrade/install/src/firmware_stream_installer_install.cpp +++ b/services/firmware/upgrade/install/src/firmware_stream_installer_install.cpp @@ -30,7 +30,7 @@ #include "firmware_update_helper.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { bool StreamInstallerInstall::IsComponentLegal(const std::vector &componentList) { @@ -252,5 +252,5 @@ int32_t StreamInstallerInstall::WaitInstallResult() return OHOS_SUCCESS; #endif } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS diff --git a/services/firmware/upgrade/install/src/firmware_sys_installer_callback.cpp b/services/firmware/upgrade/install/src/firmware_sys_installer_callback.cpp index 829a07f4..15969f08 100644 --- a/services/firmware/upgrade/install/src/firmware_sys_installer_callback.cpp +++ b/services/firmware/upgrade/install/src/firmware_sys_installer_callback.cpp @@ -19,7 +19,7 @@ #include "firmware_constant.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { SysInstallerCallback::SysInstallerCallback(SysInstallerExecutorCallback &installCallback) { sysInstallCallback_ = installCallback; @@ -83,5 +83,5 @@ void SysInstallerCallback::OnUpgradeDealLen(SysInstaller::UpdateStatus updateSta } sysInstallCallback_.onSysInstallerCallback(installProgress); } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS diff --git a/services/firmware/upgrade/install/src/firmware_sys_installer_install.cpp b/services/firmware/upgrade/install/src/firmware_sys_installer_install.cpp index 4de9d7ba..0d883e92 100644 --- a/services/firmware/upgrade/install/src/firmware_sys_installer_install.cpp +++ b/services/firmware/upgrade/install/src/firmware_sys_installer_install.cpp @@ -30,7 +30,7 @@ #include "firmware_update_helper.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { bool SysInstallerInstall::IsComponentLegal(const std::vector &componentList) { @@ -155,5 +155,5 @@ int32_t SysInstallerInstall::WaitInstallResult() CAST_INT(sysInstallProgress_.status)); return OHOS_FAILURE; } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS diff --git a/services/firmware/upgrade/install/src/firmware_sys_installer_install_empty.cpp b/services/firmware/upgrade/install/src/firmware_sys_installer_install_empty.cpp index 44ff58e7..3ecd6d97 100644 --- a/services/firmware/upgrade/install/src/firmware_sys_installer_install_empty.cpp +++ b/services/firmware/upgrade/install/src/firmware_sys_installer_install_empty.cpp @@ -20,7 +20,7 @@ #include "firmware_update_helper.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { bool SysInstallerInstall::IsComponentLegal(const std::vector &componentList) { @@ -46,5 +46,5 @@ int32_t SysInstallerInstall::WaitInstallResult() { return OHOS_SUCCESS; } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS diff --git a/services/firmware/upgrade/install/src/firmware_updater_install.cpp b/services/firmware/upgrade/install/src/firmware_updater_install.cpp index e6b41139..81bbabdb 100644 --- a/services/firmware/upgrade/install/src/firmware_updater_install.cpp +++ b/services/firmware/upgrade/install/src/firmware_updater_install.cpp @@ -29,7 +29,7 @@ #include "firmware_update_helper.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { bool UpdaterInstall::IsComponentLegal(const std::vector &componentList) { return FirmwareUpdateHelper::IsUpgradePackagesReady(componentList); @@ -62,5 +62,5 @@ int32_t UpdaterInstall::DoUpdaterInstall(const std::vector &c } return OHOS_SUCCESS; } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS diff --git a/services/firmware/upgrade/mode/include/firmware_download_mode.h b/services/firmware/upgrade/mode/include/firmware_download_mode.h index 018f5deb..b44007e6 100644 --- a/services/firmware/upgrade/mode/include/firmware_download_mode.h +++ b/services/firmware/upgrade/mode/include/firmware_download_mode.h @@ -28,7 +28,7 @@ #include "progress.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { class FirmwareDownloadMode final : public FirmwareIExecuteMode { public: FirmwareDownloadMode(const DownloadOptions &downloadOptions, BusinessError &businessError, @@ -60,6 +60,6 @@ private: OnExecuteFinishCallback onExecuteFinishCallback_; FirmwareTask tasks_; }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // FIRMWARE_DOWNLOAD_MODE_H \ No newline at end of file diff --git a/services/firmware/upgrade/mode/include/firmware_iexecute_mode.h b/services/firmware/upgrade/mode/include/firmware_iexecute_mode.h index 7572b2df..91640472 100644 --- a/services/firmware/upgrade/mode/include/firmware_iexecute_mode.h +++ b/services/firmware/upgrade/mode/include/firmware_iexecute_mode.h @@ -26,7 +26,7 @@ #include "upgrade_options.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { using OnCheckComplete = std::function; using OnExecuteFinishCallback = std::function; @@ -64,6 +64,6 @@ public: return InstallType::UPDATER; } }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // FIRMWARE_IEXECUTE_MODE_H \ No newline at end of file diff --git a/services/firmware/upgrade/mode/include/firmware_install_apply_mode.h b/services/firmware/upgrade/mode/include/firmware_install_apply_mode.h index b0512dfc..ef733f87 100644 --- a/services/firmware/upgrade/mode/include/firmware_install_apply_mode.h +++ b/services/firmware/upgrade/mode/include/firmware_install_apply_mode.h @@ -27,7 +27,7 @@ #include "upgrade_options.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { class FirmwareInstallApplyMode final : public FirmwareIExecuteMode { public: FirmwareInstallApplyMode(const UpgradeOptions &upgradeOptions, BusinessError &businessError, @@ -65,6 +65,6 @@ private: std::shared_ptr preferencesUtil_ = DelayedSingleton::GetInstance(); }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // FIRMWARE_INSTALL_APPLY_MODE_H \ No newline at end of file diff --git a/services/firmware/upgrade/mode/include/firmware_manual_check_mode.h b/services/firmware/upgrade/mode/include/firmware_manual_check_mode.h index 3ec40aa1..9d6600c9 100644 --- a/services/firmware/upgrade/mode/include/firmware_manual_check_mode.h +++ b/services/firmware/upgrade/mode/include/firmware_manual_check_mode.h @@ -23,7 +23,7 @@ #include "firmware_iexecute_mode.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { class FirmwareManualCheckMode final : public FirmwareIExecuteMode { public: FirmwareManualCheckMode(OnCheckComplete onCheckComplete) : onCheckComplete_(onCheckComplete) {} @@ -42,6 +42,6 @@ private: FirmwareCheckDataProcessor checkDataProcessor_; BusinessError businessError_; }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // FIRMWARE_MANUAL_CHECK_MODE_H \ No newline at end of file diff --git a/services/firmware/upgrade/mode/include/firmware_stream_install_apply_mode.h b/services/firmware/upgrade/mode/include/firmware_stream_install_apply_mode.h index 2b552830..6746295d 100644 --- a/services/firmware/upgrade/mode/include/firmware_stream_install_apply_mode.h +++ b/services/firmware/upgrade/mode/include/firmware_stream_install_apply_mode.h @@ -27,7 +27,7 @@ #include "upgrade_options.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { class FirmwareStreamInstallApplyMode final : public FirmwareIExecuteMode { public: FirmwareStreamInstallApplyMode(const UpgradeOptions &upgradeOptions, BusinessError &businessError, @@ -64,6 +64,6 @@ private: std::shared_ptr preferencesUtil_ = DelayedSingleton::GetInstance(); }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // FIRMWARE_STREAM_INSTALL_APPLY_MODE_H \ No newline at end of file diff --git a/services/firmware/upgrade/mode/src/firmware_download_mode.cpp b/services/firmware/upgrade/mode/src/firmware_download_mode.cpp index d6ad9947..ee97f5ac 100644 --- a/services/firmware/upgrade/mode/src/firmware_download_mode.cpp +++ b/services/firmware/upgrade/mode/src/firmware_download_mode.cpp @@ -29,7 +29,7 @@ #include "string_utils.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { FirmwareStep FirmwareDownloadMode::GetNextStep(FirmwareStep step) { FIRMWARE_LOGI("GetNextStep %{public}d", static_cast(step)); @@ -190,5 +190,5 @@ void FirmwareDownloadMode::SetDownloadProgress(const Progress &progress) { downloadDataProcessor_.SetDownloadProgress(progress); } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS \ No newline at end of file diff --git a/services/firmware/upgrade/mode/src/firmware_download_mode_empty.cpp b/services/firmware/upgrade/mode/src/firmware_download_mode_empty.cpp index dad111bc..caa9cbf5 100644 --- a/services/firmware/upgrade/mode/src/firmware_download_mode_empty.cpp +++ b/services/firmware/upgrade/mode/src/firmware_download_mode_empty.cpp @@ -19,7 +19,7 @@ #include "firmware_log.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { FirmwareStep FirmwareDownloadMode::GetNextStep(FirmwareStep step) { FIRMWARE_LOGI("GetNextStep %{public}d", static_cast(step)); @@ -78,5 +78,5 @@ void FirmwareDownloadMode::SetDownloadProgress(const Progress &progress) { downloadDataProcessor_.SetDownloadProgress(progress); } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS \ No newline at end of file diff --git a/services/firmware/upgrade/mode/src/firmware_install_apply_mode.cpp b/services/firmware/upgrade/mode/src/firmware_install_apply_mode.cpp index ae0827d0..43049b91 100644 --- a/services/firmware/upgrade/mode/src/firmware_install_apply_mode.cpp +++ b/services/firmware/upgrade/mode/src/firmware_install_apply_mode.cpp @@ -32,7 +32,7 @@ #include "firmware_update_helper.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { FirmwareStep FirmwareInstallApplyMode::GetNextStep(FirmwareStep step) { FIRMWARE_LOGI("GetNextStep %{public}d", static_cast(step)); @@ -176,5 +176,5 @@ void FirmwareInstallApplyMode::SetApplyResult(bool isSuccess) { FIRMWARE_LOGI("SetApplyResult isSuccess: %{public}s", isSuccess ? "success" : "fail"); } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS \ No newline at end of file diff --git a/services/firmware/upgrade/mode/src/firmware_install_apply_mode_empty.cpp b/services/firmware/upgrade/mode/src/firmware_install_apply_mode_empty.cpp index ded4df2e..29676938 100644 --- a/services/firmware/upgrade/mode/src/firmware_install_apply_mode_empty.cpp +++ b/services/firmware/upgrade/mode/src/firmware_install_apply_mode_empty.cpp @@ -19,7 +19,7 @@ #include "firmware_log.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { FirmwareStep FirmwareInstallApplyMode::GetNextStep(FirmwareStep step) { FIRMWARE_LOGI("GetNextStep %{public}d", static_cast(step)); @@ -86,5 +86,5 @@ void FirmwareInstallApplyMode::SetApplyResult(bool isSuccess) { FIRMWARE_LOGI("SetApplyResult isSuccess: %{public}s", isSuccess ? "success" : "fail"); } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS \ No newline at end of file diff --git a/services/firmware/upgrade/mode/src/firmware_manual_check_mode.cpp b/services/firmware/upgrade/mode/src/firmware_manual_check_mode.cpp index 7d37a03f..f5045bee 100644 --- a/services/firmware/upgrade/mode/src/firmware_manual_check_mode.cpp +++ b/services/firmware/upgrade/mode/src/firmware_manual_check_mode.cpp @@ -30,7 +30,7 @@ #include "search_status.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { FirmwareStep FirmwareManualCheckMode::GetNextStep(FirmwareStep step) { FIRMWARE_LOGI("GetNextStep %{public}d", static_cast(step)); @@ -112,5 +112,5 @@ void FirmwareManualCheckMode::HandleComplete() checkDataProcessor_.BuildCheckResult(checkResult); onCheckComplete_(businessError_, checkResult); } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS \ No newline at end of file diff --git a/services/firmware/upgrade/mode/src/firmware_manual_check_mode_empty.cpp b/services/firmware/upgrade/mode/src/firmware_manual_check_mode_empty.cpp index 5ed47565..ef87f816 100644 --- a/services/firmware/upgrade/mode/src/firmware_manual_check_mode_empty.cpp +++ b/services/firmware/upgrade/mode/src/firmware_manual_check_mode_empty.cpp @@ -19,7 +19,7 @@ #include "firmware_log.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { FirmwareStep FirmwareManualCheckMode::GetNextStep(FirmwareStep step) { FIRMWARE_LOGI("GetNextStep %{public}d", static_cast(step)); @@ -47,5 +47,5 @@ void FirmwareManualCheckMode::HandleComplete() { FIRMWARE_LOGI("FirmwareManualCheckMode::HandleComplete"); } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS \ No newline at end of file diff --git a/services/firmware/upgrade/mode/src/firmware_stream_install_apply_mode.cpp b/services/firmware/upgrade/mode/src/firmware_stream_install_apply_mode.cpp index 469df35b..c09fa398 100644 --- a/services/firmware/upgrade/mode/src/firmware_stream_install_apply_mode.cpp +++ b/services/firmware/upgrade/mode/src/firmware_stream_install_apply_mode.cpp @@ -32,7 +32,7 @@ #include "firmware_update_helper.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { FirmwareStep FirmwareStreamInstallApplyMode::GetNextStep(FirmwareStep step) { FIRMWARE_LOGI("GetNextStep %{public}d", static_cast(step)); @@ -158,5 +158,5 @@ void FirmwareStreamInstallApplyMode::SetApplyResult(bool isSuccess) { FIRMWARE_LOGI("SetApplyResult isSuccess: %{public}s", isSuccess ? "success" : "fail"); } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS \ No newline at end of file diff --git a/services/firmware/upgrade/status/include/firmware_result_process.h b/services/firmware/upgrade/status/include/firmware_result_process.h index fa994271..cbc9a3f9 100644 --- a/services/firmware/upgrade/status/include/firmware_result_process.h +++ b/services/firmware/upgrade/status/include/firmware_result_process.h @@ -24,7 +24,7 @@ #include "firmware_component.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { const std::string UPDATER_RESULT_SUCCESS = "pass"; const std::string UPDATER_RESULT_FAILURE = "fail"; const std::string UPDATER_RESULT_FAILURE_REASON = "compare version fail"; @@ -73,6 +73,6 @@ private: const std::vector &components); void ParseResult(const std::vector &results, std::string &value, size_t index); }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // FIRMWARE_RESULT_PROCESS_H \ No newline at end of file diff --git a/services/firmware/upgrade/status/include/firmware_status_cache.h b/services/firmware/upgrade/status/include/firmware_status_cache.h index 68f428f4..30ea5380 100644 --- a/services/firmware/upgrade/status/include/firmware_status_cache.h +++ b/services/firmware/upgrade/status/include/firmware_status_cache.h @@ -21,7 +21,7 @@ #include "status_cache.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { class FirmwareStatusCache : public DelayedSingleton { DECLARE_DELAYED_SINGLETON(FirmwareStatusCache); @@ -33,6 +33,6 @@ public: private: std::shared_ptr statusCache_ = nullptr; }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // FIRMWARE_STATUS_CACHE_H \ No newline at end of file diff --git a/services/firmware/upgrade/status/src/firmware_result_process.cpp b/services/firmware/upgrade/status/src/firmware_result_process.cpp index 193e6be1..6131eec2 100644 --- a/services/firmware/upgrade/status/src/firmware_result_process.cpp +++ b/services/firmware/upgrade/status/src/firmware_result_process.cpp @@ -32,7 +32,7 @@ #include "firmware_update_helper.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { static const std::string UPDATER_RESULT_FILE = "/data/updater/updater_result"; constexpr int32_t SYMBOL_LENGTH = 1; constexpr uint32_t UPDATE_SUCCESSED = 1; @@ -176,5 +176,5 @@ UpdateResultCode FirmwareResultProcess::HandleFileResults(std::mapIsUpgradeTriggered(); } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS diff --git a/services/firmware/utils/include/firmware_changelog_utils.h b/services/firmware/utils/include/firmware_changelog_utils.h index c335da96..fae4e038 100644 --- a/services/firmware/utils/include/firmware_changelog_utils.h +++ b/services/firmware/utils/include/firmware_changelog_utils.h @@ -21,7 +21,7 @@ #include "singleton.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { class FirmwareChangelogUtils final : public DelayedSingleton { DECLARE_DELAYED_SINGLETON(FirmwareChangelogUtils); public: @@ -32,6 +32,6 @@ public: void SaveHotaCurrentVersionComponentId(); void GetAllComponentIds(std::vector &componentIds); }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // FIRMWARE_CHANGELOG_UTILS_H \ No newline at end of file diff --git a/services/firmware/utils/include/firmware_check_analyze_utils.h b/services/firmware/utils/include/firmware_check_analyze_utils.h index 778bfa40..40005a70 100644 --- a/services/firmware/utils/include/firmware_check_analyze_utils.h +++ b/services/firmware/utils/include/firmware_check_analyze_utils.h @@ -25,7 +25,7 @@ #include "firmware_common.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { class FirmwareCheckAnalyzeUtils { public: FirmwareCheckAnalyzeUtils() = default; @@ -43,6 +43,6 @@ private: private: std::vector components_; }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // FIRMWARE_CHECK_ANALYZE_UTILS_H \ No newline at end of file diff --git a/services/firmware/utils/include/firmware_combine_version_utils.h b/services/firmware/utils/include/firmware_combine_version_utils.h index 7d59f51e..4c1f4607 100644 --- a/services/firmware/utils/include/firmware_combine_version_utils.h +++ b/services/firmware/utils/include/firmware_combine_version_utils.h @@ -20,7 +20,7 @@ #include namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { class CombinePackageVersionUtils { public: static std::string GetPackageVersion(std::string &baseVersion, std::string &custVersion, @@ -32,6 +32,6 @@ private: static std::string HandlePreloadVersion(std::string &preloadVersion); static void HandleBaseVersionLog(std::string &baseVersion, std::string &base, std::string &log); }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // FIRMWARE_COMBINE_VERSION_H \ No newline at end of file diff --git a/services/firmware/utils/include/firmware_file_utils.h b/services/firmware/utils/include/firmware_file_utils.h index 705c2264..bb76d9a4 100644 --- a/services/firmware/utils/include/firmware_file_utils.h +++ b/services/firmware/utils/include/firmware_file_utils.h @@ -23,7 +23,7 @@ #include "file_utils.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { class FirmwareFileUtils { public: static bool IsSpaceEnough(const int64_t requiredSpace) @@ -36,6 +36,6 @@ public: FileUtils::DeleteFile(Firmware::PACKAGE_PATH, false); } }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // FIRMWARE_FILE_UTILS_H \ No newline at end of file diff --git a/services/firmware/utils/include/firmware_log.h b/services/firmware/utils/include/firmware_log.h index a84d753e..921fcec9 100644 --- a/services/firmware/utils/include/firmware_log.h +++ b/services/firmware/utils/include/firmware_log.h @@ -19,7 +19,7 @@ #include "update_log.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { static constexpr OHOS::HiviewDFX::HiLogLabel FIRMWARE_UPDATE_LABEL = {LOG_CORE, 0xD002E00, "UPDATE_FIRMWARE"}; #define FIRMWARE_LOGD(fmt, ...) PRINT_LOGD(UPDATE_FIRMWARE_TAG, fmt, ##__VA_ARGS__) @@ -32,6 +32,6 @@ static constexpr OHOS::HiviewDFX::HiLogLabel FIRMWARE_UPDATE_LABEL = {LOG_CORE, fmt, args) #define FIRMWARE_LONG_LOGE(fmt, args) PRINT_LONG_LOGE(UPDATE_FIRMWARE_TAG, UPDATE_LABEL[UPDATE_FIRMWARE_TAG], \ fmt, args) -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // FIRMWARE_LOG_H \ No newline at end of file diff --git a/services/firmware/utils/src/firmware_changelog_utils.cpp b/services/firmware/utils/src/firmware_changelog_utils.cpp index edbc41e5..d9d8efb8 100644 --- a/services/firmware/utils/src/firmware_changelog_utils.cpp +++ b/services/firmware/utils/src/firmware_changelog_utils.cpp @@ -21,7 +21,7 @@ #include "firmware_preferences_utils.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { FirmwareChangelogUtils::FirmwareChangelogUtils() {} FirmwareChangelogUtils::~FirmwareChangelogUtils() {} @@ -77,5 +77,5 @@ void FirmwareChangelogUtils::GetAllComponentIds(std::vector &compon componentIds.insert(componentIds.end(), curComponentIds.begin(), curComponentIds.end()); componentIds.insert(componentIds.end(), newComponentIds.begin(), newComponentIds.end()); } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS diff --git a/services/firmware/utils/src/firmware_check_analyze_utils.cpp b/services/firmware/utils/src/firmware_check_analyze_utils.cpp index d9f53797..1c5099ac 100644 --- a/services/firmware/utils/src/firmware_check_analyze_utils.cpp +++ b/services/firmware/utils/src/firmware_check_analyze_utils.cpp @@ -31,7 +31,7 @@ #include "string_utils.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { void FirmwareCheckAnalyzeUtils::DoAnalyze(const std::string &rawJson, std::vector &components, Duration &duration, CheckAndAuthInfo &checkAndAuthInfo) { @@ -200,5 +200,5 @@ bool FirmwareCheckAnalyzeUtils::IsLegalStatus(int32_t status) return status == CAST_INT(CheckResultStatus::STATUS_NEW_VERSION_AVAILABLE) || status == CAST_INT(CheckResultStatus::STATUS_NEW_VERSION_NOT_AVAILABLE); } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS \ No newline at end of file diff --git a/services/firmware/utils/src/firmware_combine_version_utils.cpp b/services/firmware/utils/src/firmware_combine_version_utils.cpp index 3e74c103..61dbf207 100644 --- a/services/firmware/utils/src/firmware_combine_version_utils.cpp +++ b/services/firmware/utils/src/firmware_combine_version_utils.cpp @@ -19,7 +19,7 @@ #include "device_adapter.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { std::string CombinePackageVersionUtils::GetPackageVersion(std::string &baseVersion, std::string &custVersion, std::string &preloadVersion) { @@ -118,5 +118,5 @@ std::string CombinePackageVersionUtils::HandlePreloadVersion(std::string &preloa preload.append("P").append(getPnum); return preload; } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS diff --git a/services/service/include/dupdate_upgrade_helper.h b/services/service/include/dupdate_upgrade_helper.h index a381405f..ba4dfd47 100644 --- a/services/service/include/dupdate_upgrade_helper.h +++ b/services/service/include/dupdate_upgrade_helper.h @@ -17,8 +17,8 @@ #define DUPDATE_UPGRADE_HELPER_H namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { static constexpr int MANUAL_UPGRADE_BATTERY_LEVEL = 30; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // DUPDATE_UPGRADE_HELPER_H diff --git a/services/startup/access/include/access_factory.h b/services/startup/access/include/access_factory.h index 4fc40f23..6cc9ff86 100644 --- a/services/startup/access/include/access_factory.h +++ b/services/startup/access/include/access_factory.h @@ -22,11 +22,11 @@ #include "startup_constant.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { class AccessFactory final { public: static std::shared_ptr GetInstance(AccessType type); }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // ACCESS_FACTORY_H \ No newline at end of file diff --git a/services/startup/access/include/access_manager.h b/services/startup/access/include/access_manager.h index eb24e0a1..f0d01317 100644 --- a/services/startup/access/include/access_manager.h +++ b/services/startup/access/include/access_manager.h @@ -27,7 +27,7 @@ #include "startup_constant.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { class IAccessManager { public: virtual ~IAccessManager() = default; @@ -56,6 +56,6 @@ private: std::map> accessMap_; bool isRemoteIdle_ = true; }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // ACCESS_MANAGER_H \ No newline at end of file diff --git a/services/startup/access/include/default_access.h b/services/startup/access/include/default_access.h index 4de22fbf..63caf83b 100644 --- a/services/startup/access/include/default_access.h +++ b/services/startup/access/include/default_access.h @@ -21,7 +21,7 @@ #include "i_access.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { class DefaultAccess final : public IAccess, public DelayedSingleton { DECLARE_DELAYED_SINGLETON(DefaultAccess); @@ -31,6 +31,6 @@ public: std::vector GetScheduleTasks() final; bool Exit() final; }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // DEFAULT_ACCESS_H \ No newline at end of file diff --git a/services/startup/access/include/firmware_access.h b/services/startup/access/include/firmware_access.h index c73d4dc3..6b1ce13f 100644 --- a/services/startup/access/include/firmware_access.h +++ b/services/startup/access/include/firmware_access.h @@ -21,7 +21,7 @@ #include "i_access.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { class FirmwareAccess final : public IAccess, public DelayedSingleton { DECLARE_DELAYED_SINGLETON(FirmwareAccess); @@ -31,6 +31,6 @@ public: std::vector GetScheduleTasks() final; bool Exit() final; }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // FIRMWARE_ACCESS_H \ No newline at end of file diff --git a/services/startup/access/include/i_access.h b/services/startup/access/include/i_access.h index 9e3455ec..d0ac0341 100644 --- a/services/startup/access/include/i_access.h +++ b/services/startup/access/include/i_access.h @@ -21,7 +21,7 @@ #include "schedule_task.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { class IAccess { public: virtual ~IAccess() = default; @@ -30,6 +30,6 @@ public: virtual std::vector GetScheduleTasks() = 0; virtual bool Exit() = 0; }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // I_ACCESS_H \ No newline at end of file diff --git a/services/startup/access/src/access_factory.cpp b/services/startup/access/src/access_factory.cpp index 5fb84253..3edd50eb 100644 --- a/services/startup/access/src/access_factory.cpp +++ b/services/startup/access/src/access_factory.cpp @@ -19,7 +19,7 @@ #include "firmware_access.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { std::shared_ptr AccessFactory::GetInstance(AccessType type) { switch (type) { @@ -29,5 +29,5 @@ std::shared_ptr AccessFactory::GetInstance(AccessType type) return DelayedSingleton::GetInstance(); } } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS \ No newline at end of file diff --git a/services/startup/access/src/access_manager.cpp b/services/startup/access/src/access_manager.cpp index 3b32af7c..1bd63779 100644 --- a/services/startup/access/src/access_manager.cpp +++ b/services/startup/access/src/access_manager.cpp @@ -20,7 +20,7 @@ #include "update_log.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { AccessManager::AccessManager() { ENGINE_LOGD("AccessManager constructor"); @@ -102,5 +102,5 @@ void AccessManager::SetRemoteIdle(bool isRemoteIdle) ENGINE_LOGI("AccessManager SetRemoteIdle %{public}s", StringUtils::GetBoolStr(isRemoteIdle).c_str()); isRemoteIdle_ = isRemoteIdle; } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS \ No newline at end of file diff --git a/services/startup/access/src/default_access.cpp b/services/startup/access/src/default_access.cpp index a8944d0e..cb49cef3 100644 --- a/services/startup/access/src/default_access.cpp +++ b/services/startup/access/src/default_access.cpp @@ -18,7 +18,7 @@ #include "update_log.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { DefaultAccess::DefaultAccess() { ENGINE_LOGD("DefaultAccess constructor"); @@ -48,5 +48,5 @@ bool DefaultAccess::Exit() { return true; } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS \ No newline at end of file diff --git a/services/startup/access/src/firmware_access.cpp b/services/startup/access/src/firmware_access.cpp index 9f81b58e..ec58a15e 100644 --- a/services/startup/access/src/firmware_access.cpp +++ b/services/startup/access/src/firmware_access.cpp @@ -20,7 +20,7 @@ #include "update_log.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { FirmwareAccess::FirmwareAccess() { ENGINE_LOGD("FirmwareAccess constructor"); @@ -53,5 +53,5 @@ bool FirmwareAccess::Exit() { return DelayedSingleton::GetInstance()->Exit(); } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS \ No newline at end of file diff --git a/services/startup/manage/include/schedule_config.h b/services/startup/manage/include/schedule_config.h index 66ed1100..5a4e9bb3 100644 --- a/services/startup/manage/include/schedule_config.h +++ b/services/startup/manage/include/schedule_config.h @@ -20,7 +20,7 @@ #include "startup_constant.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { class ScheduleConfig final { public: static void InitConfig(); @@ -34,6 +34,6 @@ private: static uint64_t pullupInterval_; static uint64_t idleCheckInterval_; }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // SCHEDULE_CONFIG_H \ No newline at end of file diff --git a/services/startup/manage/include/schedule_manager.h b/services/startup/manage/include/schedule_manager.h index 418946b0..427275e3 100644 --- a/services/startup/manage/include/schedule_manager.h +++ b/services/startup/manage/include/schedule_manager.h @@ -23,7 +23,7 @@ #include "startup_schedule.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { class ScheduleManager final { public: ScheduleManager( @@ -41,6 +41,6 @@ private: std::shared_ptr startupSchedule_ = nullptr; ScheduleTask scheduleTask_; }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // SCHEDULE_MANAGER_H \ No newline at end of file diff --git a/services/startup/manage/include/startup_manager.h b/services/startup/manage/include/startup_manager.h index 1f01cd20..f30a454d 100644 --- a/services/startup/manage/include/startup_manager.h +++ b/services/startup/manage/include/startup_manager.h @@ -24,7 +24,7 @@ #include "startup_constant.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { class StartupManager final : public DelayedSingleton { DECLARE_DELAYED_SINGLETON(StartupManager); @@ -43,6 +43,6 @@ private: std::shared_ptr scheduleManager_ = nullptr; int64_t lastIdleCheckTime_ = 0; }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // STARTUP_MANAGER_H \ No newline at end of file diff --git a/services/startup/manage/include/startup_schedule.h b/services/startup/manage/include/startup_schedule.h index 0407944a..68739685 100644 --- a/services/startup/manage/include/startup_schedule.h +++ b/services/startup/manage/include/startup_schedule.h @@ -21,7 +21,7 @@ #include "schedule_task.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { using ScheduleLooper = std::function; class IStartupSchedule { @@ -45,6 +45,6 @@ public: private: uint64_t looperTimerId_ = 0; }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // STARTUP_SCHEDULE_H \ No newline at end of file diff --git a/services/startup/manage/include/system_ability_operator.h b/services/startup/manage/include/system_ability_operator.h index 90b65807..9b7bbad9 100644 --- a/services/startup/manage/include/system_ability_operator.h +++ b/services/startup/manage/include/system_ability_operator.h @@ -23,7 +23,7 @@ #include "schedule_task.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { class ISystemAbilityOperator { public: virtual ~ISystemAbilityOperator() = default; @@ -43,6 +43,6 @@ private: bool UpdateStartupOnDemandPolicy(const std::vector &events); sptr GetSystemAbilityManager() const; }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // SYSTEM_ABILITY_OPERATOR_H \ No newline at end of file diff --git a/services/startup/manage/src/schedule_config.cpp b/services/startup/manage/src/schedule_config.cpp index 3882c275..2a1c1789 100644 --- a/services/startup/manage/src/schedule_config.cpp +++ b/services/startup/manage/src/schedule_config.cpp @@ -20,7 +20,7 @@ #include "constant.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { uint64_t ScheduleConfig::pullupInterval_ = Startup::PULLUP_INTERVAL; uint64_t ScheduleConfig::idleCheckInterval_ = Startup::IDLE_CHECK_INTERVAL; @@ -58,5 +58,5 @@ uint64_t ScheduleConfig::ParseConfig(nlohmann::json &root, const std::string &ke } return defaultValue; } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS \ No newline at end of file diff --git a/services/startup/manage/src/schedule_manager.cpp b/services/startup/manage/src/schedule_manager.cpp index 716d4d0a..5652277a 100644 --- a/services/startup/manage/src/schedule_manager.cpp +++ b/services/startup/manage/src/schedule_manager.cpp @@ -19,7 +19,7 @@ #include "update_log.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { ScheduleManager::ScheduleManager( const std::shared_ptr &accessManager, const std::shared_ptr &startupSchedule) { @@ -69,5 +69,5 @@ bool ScheduleManager::TaskSchedule(const ScheduleTask &scheduleTask) scheduleTasks.emplace_back(scheduleTask); return startupSchedule_->OnDemandSchedule(scheduleTasks); } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS \ No newline at end of file diff --git a/services/startup/manage/src/startup_manager.cpp b/services/startup/manage/src/startup_manager.cpp index 5b46b0c2..9e7804a5 100644 --- a/services/startup/manage/src/startup_manager.cpp +++ b/services/startup/manage/src/startup_manager.cpp @@ -28,7 +28,7 @@ #include "update_log.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { StartupManager::StartupManager() { ENGINE_LOGD("StartupManager constructor"); @@ -145,5 +145,5 @@ StartupReason StartupManager::GetStartupReason() const preferenceUtil->Remove(Constant::PROCESS_RESTART_REASON); return reasonFromSp; } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS \ No newline at end of file diff --git a/services/startup/manage/src/startup_schedule.cpp b/services/startup/manage/src/startup_schedule.cpp index 70abb24a..80f7c0ef 100644 --- a/services/startup/manage/src/startup_schedule.cpp +++ b/services/startup/manage/src/startup_schedule.cpp @@ -26,7 +26,7 @@ #include "update_log.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { constexpr uint64_t STARTUP_LOOPER_INTERVAL = 180; // 动态启停定时器轮询周期 StartupSchedule::StartupSchedule() { @@ -84,5 +84,5 @@ bool StartupSchedule::OnDemandSchedule(const std::vector &tasks) ENGINE_LOGI("OnDemandSchedule %{public}s", isSuccess ? "success" : "failure"); return isSuccess; } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS \ No newline at end of file diff --git a/services/startup/manage/src/startup_schedule_empty.cpp b/services/startup/manage/src/startup_schedule_empty.cpp index 6e9e4f68..da637be1 100644 --- a/services/startup/manage/src/startup_schedule_empty.cpp +++ b/services/startup/manage/src/startup_schedule_empty.cpp @@ -25,7 +25,7 @@ #include "update_log.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { StartupSchedule::StartupSchedule() { ENGINE_LOGD("StartupSchedule constructor"); @@ -57,5 +57,5 @@ bool StartupSchedule::OnDemandSchedule(const std::vector &tasks) ENGINE_LOGI("OnDemandSchedule"); return true; } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS \ No newline at end of file diff --git a/services/startup/manage/src/system_ability_operator.cpp b/services/startup/manage/src/system_ability_operator.cpp index a4e53ff9..6bf19d5c 100644 --- a/services/startup/manage/src/system_ability_operator.cpp +++ b/services/startup/manage/src/system_ability_operator.cpp @@ -24,7 +24,7 @@ #include "update_log.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { bool SystemAbilityOperator::UpdateStartupPolicy(const std::vector &scheduleTasks) { ENGINE_LOGI("UpdateStartupPolicy"); @@ -120,5 +120,5 @@ inline sptr SystemAbilityOperator::GetSystemAbilityManage { return SystemAbilityManagerClient::GetInstance().GetSystemAbilityManager(); } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS diff --git a/services/startup/model/include/schedule_task.h b/services/startup/model/include/schedule_task.h index 56e48c69..8804605f 100644 --- a/services/startup/model/include/schedule_task.h +++ b/services/startup/model/include/schedule_task.h @@ -23,7 +23,7 @@ #include "update_define.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { class ScheduleTask final { public: TaskPriority priority = TaskPriority::LOW; @@ -68,6 +68,6 @@ public: .append("]"); } }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // SCHEDULE_TASK_H \ No newline at end of file diff --git a/services/startup/model/include/startup_constant.h b/services/startup/model/include/startup_constant.h index bc8e1b67..3afdfa3e 100644 --- a/services/startup/model/include/startup_constant.h +++ b/services/startup/model/include/startup_constant.h @@ -21,7 +21,7 @@ #include namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { enum class StartupReason { UNKNOWN = -1, DEVICE_REBOOT = 0, @@ -56,6 +56,6 @@ constexpr uint64_t PULLUP_INTERVAL = 4 * ONE_HOUR_MINUTES * ONE_MINUTE_SECONDS; const std::string IDLE_CHECK_INTERVAL_CONFIG = "idleCheckInterval"; // 空闲检测间隔配置项 constexpr uint64_t IDLE_CHECK_INTERVAL = 5 * ONE_MINUTE_SECONDS; // 空闲检测间隔 } // namespace Startup -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // STARTUP_CONSTANT_H \ No newline at end of file diff --git a/services/utils/include/dupdate_inet_observer.h b/services/utils/include/dupdate_inet_observer.h index ad6ca08a..eb06a1b8 100644 --- a/services/utils/include/dupdate_inet_observer.h +++ b/services/utils/include/dupdate_inet_observer.h @@ -21,7 +21,7 @@ #include "network_type.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { enum class NetChangeCallbackType { HOTA_BI_REPORT = 0, HOTA_DOWNLOAD = 1, @@ -41,6 +41,6 @@ public: virtual void SetCallback(const std::weak_ptr &callback) = 0; virtual void StartObserver() = 0; }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // DUPDATE_INET_OBSERVER_H \ No newline at end of file diff --git a/services/utils/include/dupdate_net_manager.h b/services/utils/include/dupdate_net_manager.h index 2c6c5b4e..3a6c9dd3 100644 --- a/services/utils/include/dupdate_net_manager.h +++ b/services/utils/include/dupdate_net_manager.h @@ -27,7 +27,7 @@ #endif namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { struct NetChangeCallback { std::set netTypes; NetObserverCallback function; @@ -59,6 +59,6 @@ private: NetType netType_ = NetType::NO_NET; std::map netChangeCallbackMap_; }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // DUPDATE_NET_MANAGER_H \ No newline at end of file diff --git a/services/utils/include/dupdate_net_observer.h b/services/utils/include/dupdate_net_observer.h index 61363ec4..a7a8f7e4 100644 --- a/services/utils/include/dupdate_net_observer.h +++ b/services/utils/include/dupdate_net_observer.h @@ -23,7 +23,7 @@ #include "dupdate_inet_observer.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { class NetObserver final : public DupdateINetObserver, public NetManagerStandard::NetConnCallbackStub { public: void SetCallback(const std::weak_ptr &callback) final; @@ -37,6 +37,6 @@ private: std::weak_ptr callback_; // 弱引用 }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // DUPDATE_NET_OBSERVER_H \ No newline at end of file diff --git a/services/utils/src/dupdate_net_manager.cpp b/services/utils/src/dupdate_net_manager.cpp index 0f3626e7..cfd3a949 100644 --- a/services/utils/src/dupdate_net_manager.cpp +++ b/services/utils/src/dupdate_net_manager.cpp @@ -22,7 +22,7 @@ #include "update_log.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { NetManager::NetManager() { observer_ = new NetObserver(); @@ -114,5 +114,5 @@ bool NetManager::IsBaseNetType(NetType netType) return netType == NetType::NO_NET || netType == NetType::CELLULAR || netType == NetType::METERED_WIFI || netType == NetType::NOT_METERED_WIFI; } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS \ No newline at end of file diff --git a/services/utils/src/dupdate_net_manager_empty.cpp b/services/utils/src/dupdate_net_manager_empty.cpp index c87b803e..8dd57600 100644 --- a/services/utils/src/dupdate_net_manager_empty.cpp +++ b/services/utils/src/dupdate_net_manager_empty.cpp @@ -22,7 +22,7 @@ #include "update_log.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { NetManager::NetManager() { ENGINE_LOGI("NetManager NetManager"); @@ -67,5 +67,5 @@ bool NetManager::IsBaseNetType(NetType netType) { return true; } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS \ No newline at end of file diff --git a/services/utils/src/dupdate_net_observer.cpp b/services/utils/src/dupdate_net_observer.cpp index 30a1832f..8129a853 100644 --- a/services/utils/src/dupdate_net_observer.cpp +++ b/services/utils/src/dupdate_net_observer.cpp @@ -28,7 +28,7 @@ using namespace OHOS::NetManagerStandard; namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { void NetObserver::SetCallback(const std::weak_ptr &callback) { callback_ = callback; @@ -106,5 +106,5 @@ void NetObserver::OnNetChange(NetType netType) bool result = callback_.lock()->OnNetChange(netType); ENGINE_LOGD("OnNetChange callback result %{public}s", StringUtils::GetBoolStr(result).c_str()); } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS \ No newline at end of file diff --git a/test/fuzztest/common/fuzztest_helper.cpp b/test/fuzztest/common/fuzztest_helper.cpp index 2fa2c973..251ff342 100644 --- a/test/fuzztest/common/fuzztest_helper.cpp +++ b/test/fuzztest/common/fuzztest_helper.cpp @@ -20,7 +20,7 @@ #include "token_setproc.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { constexpr uint32_t CHAR_TO_INT_INDEX0 = 0; constexpr uint32_t CHAR_TO_INT_INDEX1 = 1; constexpr uint32_t CHAR_TO_INT_INDEX2 = 2; @@ -182,5 +182,5 @@ uint32_t FuzztestHelper::GetUInt() index_ += FUZZ_INT_LEN_DATA; return number; } -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS diff --git a/test/fuzztest/common/fuzztest_helper.h b/test/fuzztest/common/fuzztest_helper.h index 96356f99..22d49be2 100644 --- a/test/fuzztest/common/fuzztest_helper.h +++ b/test/fuzztest/common/fuzztest_helper.h @@ -24,7 +24,7 @@ #include "update_service_kits_impl.h" namespace OHOS { -namespace UpdateEngine { +namespace UpdateService { constexpr const int32_t FUZZ_DATA_LEN = 500; class FuzztestHelper : public DelayedSingleton { @@ -46,7 +46,7 @@ private: uint32_t index_ = 0; uint8_t data_[FUZZ_DATA_LEN] = {0}; }; -} // namespace UpdateEngine +} // namespace UpdateService } // namespace OHOS #endif // UPDATE_SERVICE_COMMON_FUZZER_H diff --git a/test/fuzztest/updateservicecancel_fuzzer/updateservicecancel_fuzzer.cpp b/test/fuzztest/updateservicecancel_fuzzer/updateservicecancel_fuzzer.cpp index 55a9d3bd..e9fccefa 100644 --- a/test/fuzztest/updateservicecancel_fuzzer/updateservicecancel_fuzzer.cpp +++ b/test/fuzztest/updateservicecancel_fuzzer/updateservicecancel_fuzzer.cpp @@ -15,7 +15,7 @@ #include "updateservicecancel_fuzzer.h" -using namespace OHOS::UpdateEngine; +using namespace OHOS::UpdateService; namespace OHOS { bool FuzzUpdateServiceCancel(const uint8_t* data, size_t size) diff --git a/test/fuzztest/updateservicechecknewversion_fuzzer/updateservicechecknewversion_fuzzer.cpp b/test/fuzztest/updateservicechecknewversion_fuzzer/updateservicechecknewversion_fuzzer.cpp index 4311350e..0de988b0 100644 --- a/test/fuzztest/updateservicechecknewversion_fuzzer/updateservicechecknewversion_fuzzer.cpp +++ b/test/fuzztest/updateservicechecknewversion_fuzzer/updateservicechecknewversion_fuzzer.cpp @@ -15,7 +15,7 @@ #include "updateservicechecknewversion_fuzzer.h" -using namespace OHOS::UpdateEngine; +using namespace OHOS::UpdateService; namespace OHOS { bool FuzzUpdateServiceCheckNewVersion(const uint8_t* data, size_t size) diff --git a/test/fuzztest/updateservicedownload_fuzzer/updateservicedownload_fuzzer.cpp b/test/fuzztest/updateservicedownload_fuzzer/updateservicedownload_fuzzer.cpp index ce151dc3..78a02d6a 100644 --- a/test/fuzztest/updateservicedownload_fuzzer/updateservicedownload_fuzzer.cpp +++ b/test/fuzztest/updateservicedownload_fuzzer/updateservicedownload_fuzzer.cpp @@ -15,7 +15,7 @@ #include "updateservicedownload_fuzzer.h" -using namespace OHOS::UpdateEngine; +using namespace OHOS::UpdateService; namespace OHOS { bool FuzzUpdateServiceDownload(const uint8_t* data, size_t size) diff --git a/test/fuzztest/updateservicegetnewversion_fuzzer/updateservicegetnewversion_fuzzer.cpp b/test/fuzztest/updateservicegetnewversion_fuzzer/updateservicegetnewversion_fuzzer.cpp index 10b94cbe..a6e0997d 100644 --- a/test/fuzztest/updateservicegetnewversion_fuzzer/updateservicegetnewversion_fuzzer.cpp +++ b/test/fuzztest/updateservicegetnewversion_fuzzer/updateservicegetnewversion_fuzzer.cpp @@ -15,7 +15,7 @@ #include "updateservicegetnewversion_fuzzer.h" -using namespace OHOS::UpdateEngine; +using namespace OHOS::UpdateService; namespace OHOS { bool FuzzUpdateServiceGetNewVersion(const uint8_t* data, size_t size) diff --git a/test/fuzztest/updateservicegetupgradepolicy_fuzzer/updateservicegetupgradepolicy_fuzzer.cpp b/test/fuzztest/updateservicegetupgradepolicy_fuzzer/updateservicegetupgradepolicy_fuzzer.cpp index 7d54956a..d1189fc0 100644 --- a/test/fuzztest/updateservicegetupgradepolicy_fuzzer/updateservicegetupgradepolicy_fuzzer.cpp +++ b/test/fuzztest/updateservicegetupgradepolicy_fuzzer/updateservicegetupgradepolicy_fuzzer.cpp @@ -15,7 +15,7 @@ #include "updateservicegetupgradepolicy_fuzzer.h" -using namespace OHOS::UpdateEngine; +using namespace OHOS::UpdateService; namespace OHOS { bool FuzzUpdateServiceGetUpgradePolicy(const uint8_t* data, size_t size) diff --git a/test/fuzztest/updateserviceregisterupdatecallback_fuzzer/updateserviceregisterupdatecallback_fuzzer.cpp b/test/fuzztest/updateserviceregisterupdatecallback_fuzzer/updateserviceregisterupdatecallback_fuzzer.cpp index 7887cc6d..b50ae414 100644 --- a/test/fuzztest/updateserviceregisterupdatecallback_fuzzer/updateserviceregisterupdatecallback_fuzzer.cpp +++ b/test/fuzztest/updateserviceregisterupdatecallback_fuzzer/updateserviceregisterupdatecallback_fuzzer.cpp @@ -15,7 +15,7 @@ #include "updateserviceregisterupdatecallback_fuzzer.h" -using namespace OHOS::UpdateEngine; +using namespace OHOS::UpdateService; namespace OHOS { bool FuzzUpdateServiceRegisterUpdateCallback(const uint8_t* data, size_t size) diff --git a/test/fuzztest/updateservicesetupgradepolicy_fuzzer/updateservicesetupgradepolicy_fuzzer.cpp b/test/fuzztest/updateservicesetupgradepolicy_fuzzer/updateservicesetupgradepolicy_fuzzer.cpp index c01efb48..fa7fa16e 100644 --- a/test/fuzztest/updateservicesetupgradepolicy_fuzzer/updateservicesetupgradepolicy_fuzzer.cpp +++ b/test/fuzztest/updateservicesetupgradepolicy_fuzzer/updateservicesetupgradepolicy_fuzzer.cpp @@ -15,7 +15,7 @@ #include "updateservicesetupgradepolicy_fuzzer.h" -using namespace OHOS::UpdateEngine; +using namespace OHOS::UpdateService; namespace OHOS { bool FuzzUpdateServiceSetUpgradePolicy(const uint8_t* data, size_t size) diff --git a/test/fuzztest/updateserviceunregisterupdatecallback_fuzzer/updateserviceunregisterupdatecallback_fuzzer.cpp b/test/fuzztest/updateserviceunregisterupdatecallback_fuzzer/updateserviceunregisterupdatecallback_fuzzer.cpp index 5fc26bea..fcd4ff2f 100644 --- a/test/fuzztest/updateserviceunregisterupdatecallback_fuzzer/updateserviceunregisterupdatecallback_fuzzer.cpp +++ b/test/fuzztest/updateserviceunregisterupdatecallback_fuzzer/updateserviceunregisterupdatecallback_fuzzer.cpp @@ -15,7 +15,7 @@ #include "updateserviceunregisterupdatecallback_fuzzer.h" -using namespace OHOS::UpdateEngine; +using namespace OHOS::UpdateService; namespace OHOS { bool FuzzUpdateServiceUnregisterUpdateCallback(const uint8_t* data, size_t size) diff --git a/test/unittest/stream_install/firmware_stream_installer_install_test.cpp b/test/unittest/stream_install/firmware_stream_installer_install_test.cpp index 49a3601f..8a2ae11b 100644 --- a/test/unittest/stream_install/firmware_stream_installer_install_test.cpp +++ b/test/unittest/stream_install/firmware_stream_installer_install_test.cpp @@ -19,7 +19,7 @@ using namespace testing::ext; using namespace testing; -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { UpgradeStatus g_status; bool g_result; @@ -87,4 +87,4 @@ HWTEST_F(StreamInstallerInstallTest, StartInstallFailure, TestSize.Level1) ASSERT_EQ(g_result, false); } -} // namespace OHOS::UpdateEngine \ No newline at end of file +} // namespace OHOS::UpdateService \ No newline at end of file diff --git a/test/unittest/stream_install/stream_progress_thread_test.cpp b/test/unittest/stream_install/stream_progress_thread_test.cpp index ce3c4102..12b645da 100644 --- a/test/unittest/stream_install/stream_progress_thread_test.cpp +++ b/test/unittest/stream_install/stream_progress_thread_test.cpp @@ -20,7 +20,7 @@ using namespace testing::ext; using namespace testing; -namespace OHOS::UpdateEngine { +namespace OHOS::UpdateService { Progress downloadProgress; void TestProgressCallback(const Progress &progress) @@ -78,4 +78,4 @@ HWTEST_F(StreamProgressThreadTest, DownloadProgressTest, TestSize.Level1) int32_t result = StreamProgressThread::DownloadProgress(&thread, dlTotal, dlNow, ulTotal, ulNow); ASSERT_EQ(result, 0); } -} // namespace OHOS::UpdateEngine \ No newline at end of file +} // namespace OHOS::UpdateService \ No newline at end of file -- Gitee From 9c6deecd0e55b18ffbc9fc037841ad95911a4d10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=8F=8B=E6=9D=BE?= Date: Tue, 15 Apr 2025 11:30:36 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=E8=A1=A5=E5=85=A8=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 邹友松 --- foundations/ability/sa_loader/include/base_service_kits_impl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/foundations/ability/sa_loader/include/base_service_kits_impl.h b/foundations/ability/sa_loader/include/base_service_kits_impl.h index cff8e094..b06e4c2f 100644 --- a/foundations/ability/sa_loader/include/base_service_kits_impl.h +++ b/foundations/ability/sa_loader/include/base_service_kits_impl.h @@ -125,5 +125,5 @@ template void BaseServiceKitsImpl::ResetService(cons remoteServer_ = nullptr; deathRecipient_ = nullptr; } -} +} // namespace OHOS::UpdateService #endif // BASE_SERVICE_KITS_IMPL_H -- Gitee