diff --git a/foundations/ability/define/include/update_define.h b/foundations/ability/define/include/update_define.h index 2bee240bc7f270ef44dc736b62138541ce7ca772..feb6f4b5b510d9c8b863826a5701cfc6b8008527 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 3ca7e14bd0d0a0c0905054942f8121180c854a12..05a815c411f50f47e6ccb541b2db1112c4841cfb 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 7d7f6e03bfd330a9162489d8a9eaaae3a6be926a..9ec830f19589f19172df44030d702eb08a7cd827 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 1da0bca77045e34a972fbc6099ad360dd3c3697c..74b20aa7008226b0590cd47732e832ebd597a0c5 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 5fc14df11c1390d1fd08dbb37ee5683b6fdb17ed..b06e4c2fa455e00dbbbd6c9c1cb2df89e56c047b 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"); \ @@ -125,5 +125,5 @@ template void BaseServiceKitsImpl::ResetService(cons remoteServer_ = nullptr; deathRecipient_ = nullptr; } -} +} // namespace OHOS::UpdateService #endif // BASE_SERVICE_KITS_IMPL_H diff --git a/foundations/ability/sa_loader/include/common_death_recipient.h b/foundations/ability/sa_loader/include/common_death_recipient.h index ac1d3880de07c58155dae10874ee9e9f295e1bfd..b6c0f82d5c7082e8c85eeb407a43ef6f34eb295e 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 d0b3b3391f0f782aa01f5c15308e5978d01b60e3..5070b0202faef7e7e818f678fef487fc44f365f3 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 8e81ad36bb3ed3d7ad29e5e5c42afac824c29602..2bfa0e442c509d614aeb2721610b8fe841523423 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 9ff587cd4b6c4a56832185dc75f6c0a9ccbbe36b..ab12a888f7076fba0932082510070ae18a92e4f7 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 61d77029d8209e6bed5718682a531bf0e98bf6c0..3d3f8f10613f97e07458eb62d9fa5bd9d3c9d555 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 3c1375f21a23517b5306e74a9a6aa9a3fd731a9d..6dfc6f570b4e8d4d7b297e9ebb33f4dcb0056074 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 8e0161fe9e6bb85bc5f5b23d5ecbda53a736fa55..ede82f586792047a320d39e59640bcbda9743358 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 5c22f79cd1dbbecd258d5e293dd6b847815b19d1..cf73cbba1cfd20a015c75e6b184a3ba50ecfc23f 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 25e7382feb7d61f67c84f6d3c36aa1b8a313ccec..05a2d9884b2f9a4ca3fb2183c1c7d72414ddd965 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 5832b888c91c772f2cbc85612776dc7f188eb89d..3f08f214c34bdeb93cd49c134325a0192062a528 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 712284b5620a8a2b1b02e0dbec8da46d12968ca5..5cf7128650ad3f4009f73ba915d66459076ef28b 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 fc85b43585d28de0181b9197d89dd99a3b7a285c..27afa572656827a0491cf5ba2c4af330fa102355 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 9783e1997a645bbd0b0e4636b672d9e27c1ee813..415fb9744ba26e3ac4529e6b96e0939acee3f170 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 ba8044f8542403da3372aefd708c230c6d57364e..3ee6779fe535798db3be10cd2c59ed522e2d0ad6 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 59cf9e329ee32e555276307e5a2dd9b309921da5..c9da2608b2922168389dc46166c0bc70df782410 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 956d624f1c127fbd7f20be3945ddb6304d60dc5f..69f48ff2989fbf04c6d8c919e12f0155b1529a17 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 e24d05de833a3257354dbc61962415a260bee484..aecf598456a6fcca1d0821726d3b24ed9c85d038 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 0db714dc6733d5aca72e2f8c28bc726c3e961c82..1506e65f1e37c31e067ee70e02b0df93736bd371 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 b47230f97dadb646511221c28a0353f38661c580..cf2d6db37232dc9750670f8db0174c8f77a953d0 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 cbdfd4fd0b6b2a446fb352c67c0089ff03fdf26b..2698b90584ca4dd9d08e7a04affa97276e5cf03c 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 7d720a48d40075c3ec89c31e0e49c1dde469417c..c27127cb5c35533082e9b9486563b6866d8a5667 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 f8dceac708852d48e86b49a72f0f970fbb596db0..3f48eb078b11f00a7c9d811cb37ca30c7dcf269b 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 03d36c8ff1ca5635ec6055a789746b33cd92b6f6..5580cc81bdd3f249da96226809941bffac87253d 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 066f23a24441ed583ac9b8863959a18c4a85d916..871e69b92311b4d94535a2d931531a8996391fd4 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 5314c6ed36da1a1e2b247e3bb059ed33cdf8b7a5..ff5fc6387a5f8bd280ffd2ade5ac3e542c8242b7 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 dd111442c299bdf2f5aa4422e4cfdc137e86f5da..74da35861fb4d266abbbb98b8e5e895e91771b2e 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 cbbdca752e4171c75340f042bd839aa5ae833bed..be00e7e02f9b599dc82a0f883c3eab00371b2ad0 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 44b36cb37bf2c2865db33dd567351628cdb03ddb..9d9efaac08f25880adea725ee946ef5be45e69ce 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 3bb226945c06a826fa75417d8a93612562314f7f..6310155b4c77b5323f7c9483bc8292954545c703 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 3dce891b7b9c2324f37b0e0216db5ec0ce5e558f..dd1721ec49f8adf5e1bad1947448bde92c5fd021 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 8af79c0173cef18cb55f4ec655efa714a5b9e4d6..4ea68720bf66a18d84584f80554025d478eb01f6 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 38bf5dc06a3daf8a99df6a8a2c60c8a6bc05b6ec..826412a8dfdbe432fc2fb36ec5c682d22759ea7f 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 560a2aa1e7db91b701b0ea1c8079374a1c0fee29..39c2a2c4775d5e793041e6f4d63d023c597014f5 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 dfb93d9d358ecb228b24756a6f61441195eaca1a..32fccc2c2dd82fb7e44af290ecfd2ad9b7c93212 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 435f978a3f9b0080455c7cc725015bc00a4fa68f..dc70413e402383845c28531c6f1fa1264216dbcb 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 dfe615f1055cdf4acea790e73c593ef8871bfccb..7a5cc7be49ebe0e3ebc0be932f8f05391310ad81 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 aaa3449eee4667b403406ce40790f08fff5f2862..4943475a931430770ae393eb4c814aa662a09593 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 b3982f8f86f75b85562e3b297da3b7460b3177b2..c0c17542ecf2ffc7865c9d3ce2204b882b4bf407 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 dbb376b3e31cfb5abe241aed4ee99a67e15cb3ae..50a2be444cb125d96b28e6f8270eb7c4ae46013f 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 b18693eea07fc179e6f7dcf2cc5dd8f7b12aa95b..1438c87ae9e7a3244bee739cd5c934e1f5b3a062 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 a8453d6569749b6905a27e111c0624428c61fee2..bef79a8eb30aaaaac235b7aecbfd14939744adf4 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 5690ba672dc40ced638ecb386ecba8c8a7f1d722..a7ba23d336e89b9feca5b569c3feeb5a33c07cac 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 abc6f49d875b5684efdeb05273dc954943c0c286..4226b32886f0be79e173eea11a71eb891769edb1 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 19d30e2e139902455e599b46265064d3211c085e..8f3f982e92c8d2125bfe89699b354c6404fa84f6 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 034e7b9dbe8c720a7942b3e9f0c79883cb48bff7..024ddf5812a5a9d5584cc206d4f733fb83b3aca1 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 3b5a1b7cb7843b01cc986298f0424a15f22858e7..3bf20486dd39c80a6a0f6037efa998558d900ec8 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 1f1b1b58da45aa57e5784c3e82318c933561b44c..374b43425706a92e14523fc8951d8ef2c33e9e3e 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 11905571f6bf82a3c2fdf60bd2bc99f40615fd91..4403adf93ab64bce6b69cbe9788f4e92f47de20d 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 0b8c48d475d0f246623a623acdb8601f5be566f5..225ebf1066f43a42e2ddcc4396220e63a03ee03a 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 ed2b03c77332989c80edf29b8afd9d6146c5056e..c159d67faaf7ee1dea122f43d8aa619a08536483 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 ef26ce6837685e61aa0eb0bce7300ac08470c7b1..071cd4a1b3a7c2c9b433000c2e6a80265e7ef26b 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 857554b17e38e4bda3aa62322304710dfab09169..eb959aa095ad87b2f420a3fd8ebdcb3043123569 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 0c0b6b51c2bf9586416f08740cd9a92e1fabd4da..542fb90cb69a17bc2fccb4cf0aba254c6cc55c8d 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 1a30af16e9cf26722f00529f3fd7a6a0b4d3e286..e84d31ae3eb6c2f80a9bc144d6fcbb7341fb8a5f 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 79f71eaa0ab55fc8d0bddd867b09d010e1254ab9..f4288215bc1c9f0926abfa18a256ff3d5e512f1a 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 7ce8ca0a41e70671f183f889d061ff50a2909cda..30d6a8942fd31294d8a248e444519d491e45725b 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 ce9269397cdfc97157a84232ba072b69c0a66678..30979bd9ac6b04ddbb41d3690d148ff93f829f1f 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 fb81696668f88564ef895102777b2b274df6673f..15030839cc1a4820b8fa34023a19a1f92cffbf90 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 b7c9d14e9e119b80a8ac6999303b1075e8a2df5e..971e630eb879db7833b83cccff1d777f0eba1011 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 3866aadcd99b928d3de676a6ddd5a3ce59d33151..25b0dad15eefc88422c271953f09947c0d4e4147 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 aaed216c589bf0398a1f3c626bff8642595ad723..6263897a3be1d0b6373bb4e3f29b88b5e7a1a7f8 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 9a67ce50ec24734693b597728a59263905af79ca..2ce6e5422ebea3c8a3dd7795e449cef91d411f3a 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 19efb06535bead9d79aba359932255d875b7cf2a..621bc1744d0bb207a772dd0f97560fa5264db15d 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 e77d514df9b44d0a9a563c8d80bea4a15a5f3b10..0f98ec0882f3bddd82986f468468a8a005bc0684 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 d2d1c8011e4fb7f65048a983ee45167634cade57..31f68399f9f0bbec9669fa943c732b99fa7eb7fe 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 58f6dc40d654698190e65b2d1508ec6a936b0438..187b672d5644ca3610eab623067f0338ad653fe6 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 a50dd0c934bef33bec4387f81fef8950a81cc7bf..0f9b54d914df1aebdffbaa1f262c88c2e51f2f9b 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 8c98fd2f47f31c996adb937c4f677c0943984692..75b4e282088fc24d1afd06baf553d400e343f4bc 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 5c88b5687bf358deb597379bc179fab6b136e495..767fed7610dd6272ad7bfa79bff35c8b5e63192c 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 477f6d88e022cdb360d5ed507f2b4bdfbd49afc6..a47df7ea73418058432dcec8be229d293697f871 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 32777c564b010327171c86bac7653e0ea0f0e682..964c10b8255f1507a4ed4054809b19fcc6f1d8e2 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 ba0a4c1fa4b20a4aad7689be805a0174ad9a7633..3229debdf22e6454f3adabd96b18bc2823544aad 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 a06be51bfe0d7d8a5f6355ad068780f435a1d2e0..40efa3929e00eecd497ef2ac70168672e34ad499 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 e5dabf256a5a930980a2a00ad443786522cfe170..febae2080c9749ffec456a937592c6466e0939d7 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 45dfd9427cb96dea128614a743937046eb487523..801bb538a1b8c613b8075007f0f06e02891cba78 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 dc619e5262bf98adbf25633580de43e1db2e3894..f962872a97c11478e6174b507b1e0c64cb4d8ed8 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 7f49f58c88047664a35f4234a94148ff69fcb8b1..391133b16a8e555cd9877994de9c3402f2078049 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 1d9d69553234b7393121738f048eedb2dd425f52..c3ad60c1b33805aea01d5178da9ce81cb0afc27a 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 7c52c3d2a7e7f7aa111652c3e9eeff82cd36fe05..6947ab0a4c4a39c930a8d7f34705f285117ee443 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 f6f4067ca18a77d01ebab87be6c92c91c4fa7cc1..f450ca414e603789df219f5d0aaa0b487065f05f 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 4163af3ae10e826922c16fab9e75ebad0ec7ce95..bff2cc188aa7d1695e0775b5be9b72876e0bdabc 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 d8538171eaf589476db0f4100bfc569394cdc353..b7631b73f82b94529c518b543abfe2eacae8aa78 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 af12b11d8cfc86f4a2822c9702dc94d81c6bbec7..5a706fbbebe7473a034fac9200fc7dda3f6787b9 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 9c4a5a220cdf982d227e82737745a052bd041e90..47c9d13f63e15672ac05ec37de955cb4aaa94aed 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 935c148a1c55fda539d36cd93ecc571fae976080..88168af5c7588f4605bafc5f1ca0fd205355e83b 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 72ccfc030bf08bd6f17987c5f66b0048056e95f5..4d55d7c3c6ac7632ffd1915eb119643612f0e12d 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 a6732da0c03b7f751fb7a029a66a3eb3e8daa0bc..979f39fa551ecabec11f1461d27dca98413b391a 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 e32e3228508e7e23c401188e5d3afc1934180fe4..41ab129268f56bb6d036030afffaafb0bc7ce9c9 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 1cb14a37314d13efacd6f5150962322ded382e12..0343a2fbd15305eba5679b6605b341eeb9806add 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 0a26783223b47b3c52146adc539b90f5144d5377..7d4339a459c6d645d758ebd4024ab26a4035458d 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 a833bb6283df8bda7b9242f567e8e02ddc662256..f75ea354c2ddeb3b6fa100d7fda7b6d6d1b9818b 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 64f5bdb6b047709fddf8b4cfbdb486231a3a1df2..7760fb152fcc6bfc8d3da77c2f0b39bd0c4d4804 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 8b50b18423063c834d9a10f6ff4bdb76d11a29a3..6659db8a7ce1bdb9498c44ec63699cd976f6e9f5 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 4a175fe251d85511d8b3bf31a29fdb4a98b21726..c16b9eb5c743e40155182c64fdd8ef46e06f0b25 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 bd202678b69b0f29e0fba10941b09f94740829c2..a92e1e1173e8d395cd265cb484a3d87b495ea47e 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 b63f6be350a42be7e95f90c7c8d32df6fbd3a733..52f2bca32311602edf086283bc8af2d81a32a491 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 55538de9533cd20233a00c790b0de07a7221330b..5665ee8bd332f6a726e4ebc2b8e544c3abf042df 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 d6cd54ae26e20136b0e994f0b8d645f551c297bd..71b180f4811212454a92f89f17439d7f8e4ab412 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 79c22c649bcf8f12c1cfa66ebba58c3f2f3b703f..49e92a337e8e47db21d6036cf15fa4a62c633e4a 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 2130b296ac5f7ca83279250e203d2d9795394f5e..08abdb0062c79d7921082bd34766e43721462851 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 0d266d756309925a92b334df5ad3232a795435cf..1dead8269ad9090abd4fe8ce3e65e86efa142f01 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 a3cf3267f68de8d86ee3be58bcf04a4b24a56db6..048ace271a92e9ba127c0a28f8baea7747166487 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 60b96029a1bd93c4022df8942ff2281a2766bdb2..780700c1fe2067318f95018d8566d9243c8161f8 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 e717f1bff44b9c9ddf6f5c4534d7f2b144cfa9da..1c8ac8baf61d253cc226294b9be03d83ec3d730b 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 58b79bd3139efe3125c127e32b4d846d823379ea..e5d2ddb5605bfce0a04816d929d5eaf3d7b2798f 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 27e74c93dee5e4d124769bf036f16dff6124cb5f..32872da41136ce18cb85f2948e243f2e5e05c787 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 693d355304d584bd563a53c67ea1a4a6ba858603..a3bf10b333358eb2599360ce20adc99d331a2ee0 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 a10fa5bf00b3765bcf3aeed6bfcfe2db0a45b87a..57919d5c9bdc801b96b9ee748117df6548771b66 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 377b0074ded2948249b4bc9f540c5fe8efdb6199..c7e84c124559733f4175ebd2ed966ab4d67fc803 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 ecf221ea41fe2b714f118801e4c7b25e70ccc359..3015c3f588b85ee294aef9574fe273ba2117a11d 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 73f8495a25912fca07d322ff7feec38b75b2f57b..130de2e07e6b2b6e851579e93077266d21072d44 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 777ec1aacc590ea6a0bc879559582286e3840931..682c75f0f2014f284275e66aa490cc4d0a6a1696 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 8946d4479d51a7d2fe0d6189fc31c58acf28553a..8b8f475ad8ddc6ff56407bc23335ea3765e68635 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 8946d4479d51a7d2fe0d6189fc31c58acf28553a..8b8f475ad8ddc6ff56407bc23335ea3765e68635 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 2a783eb055cd232fbdaa61362feda2352771ec8b..b1c3ed5325483466771d1c34d690bd6410722408 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 7f36241212ae9ae7430991f7e5c45a01dc77beb2..86dada2d27906bc9560051491548da63230208b5 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 2b7b8b15943308e5d8ce6bbe2fdee6fc84c74952..fd5e419796a87a3552f7dd2e3331fa588de738cc 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 d7a7996f2c85e83ad42bc0cb92df8a7a123f9be8..739449d67cf7f141d298c28ec9d28a400f116182 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 761630eacbc0b2cb5ddd38187bf44cf0d2ab634b..cbc7e000df5a1a551d056a5cf8ad4f09f654202a 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 3034e53379b3a5ce3d3f4e480754f356a3eb680d..feb29cf1d17f0f0554885eaa3f069cb96ec28664 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 b5aab428e124be8058a1e648df99a75cd121882f..d8234a13c03ad2f1f399f7926ece2a4013d8c28b 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 f5f22dd660869872f94fc1521f5c22610661b71d..8db23997f6e24f21296cec47abc196c88576a208 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 d39c0c3b74dd21c04d425b2cf424d0ebecd46dc5..558d20e728b6e3c81a4b8f0c0d4c68c719499239 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 443e5466b2ed812d4a1bdbe4838fad106e8f93ff..7f3bfe1f47b862d2741724d84766f619538dc610 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 99d0e801eae967bbd12312e38bd74b5088053ca1..767936af21118217aad4768b36714930671f8459 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 83dd66f540d9d4d952bdb38385b1b0bf267a614a..e0e1b9a4c411cbcabf32890caec8760a79f49df1 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 1d224976c3a789058a68512e96f3b1c95cc852f0..1e4253e9faa9ac652140d59144de279d2e2561b6 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 40ff0efa990ba272a6936a6afe9b20846ec7fb1d..e6884d78dc7c0678a0ebaae230531066fb9573c5 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 2bd2987a68dcc87187b6f73188e022c061445fc7..7863d4aa98aedddb8613ed64fb253c92fe7998f4 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 337cef8648b6090b479435fa5818c286393b66a6..7dc800aeb25a52bbe84b2da8f0e822cac34ebdee 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 d806a32f536ac55acfede91686904186721ec82d..2aca73f008e3cbebf7034f4aab7dd15e23e82c27 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 bc1bc8f556f4d4b26346aea48a7ca851b21969ff..fc2cbc85c308e6ee2d3def9bf1cf7230455b5b7b 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 c86bebf527240cd8327a37ad1a302393d9d92257..a22dbefa1d399e2c8390aca202c6b18beae3cc3a 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 8bfc16fbe58d830d641f148e5c5c629914374daf..fb3f09c6e622e7ce36530986f5bac452a6599f50 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 2e99cf456bb2fac049c4030ddb1fae64f7547e84..71b7cddf3dc5d347699ab9dbe8d4c26c2d6e4d08 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 9486be052fc6fd3848a9b9cc3192ebe3c01cd241..1e9e63d6c99d4091b5e715de2426f2a92fa3320b 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 ef0c78132b5fca4dea696bbef932c349fea43602..d06a834d64a7552b7b1414f454e43457fdc14f30 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 00ca9b65945e6f36262107cd7fb4eb941932c7f2..00f2463479697097f37c4eb0cc3e1da642cebe71 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 6df32e6df4b24b5daaf2c002a3dd9f69d2cfc85b..eec7fac9ad694af11e400d3b3fc48df2b11da203 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 82fa4070404889c1e1065d29287572417e7ebdd2..36549db0c42fec5592f562a93ef148d2e826ad31 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 ed112c759bd14a5a3ee194cd788e7a4e257de5f0..ea146030ad36d5e9dc9c90bca9b04019159c1f93 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 739adb6f644d7ea969ea4f55f179f03f7fddd772..34f01c3df5bd7ece3f26c171517015a7b860f13f 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 739adb6f644d7ea969ea4f55f179f03f7fddd772..34f01c3df5bd7ece3f26c171517015a7b860f13f 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 d01cc4f65aa054104b21605f096c76f311b497dc..e340abead05042a84357d729b82b52ebc2f3c791 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 46c7df6f1dc85e4f9c14cfa79a8365396799a92b..e019d92f84785f4bc26f1669dd2427ab3ab71b24 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 b2b0b79260b03ace491800e4a1796d5e5333b5ed..f3ca184fed74b2fd3c6962772ab6b4fb1f2c50cb 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 46fba81b5a579e239de36b6e385f0b6b8c9f7f48..043ecdbb9c43ecad3002e7d6849accbf7ec35acd 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 b511fa76dce9d8edcb8c41014cd553081dc9f3c3..a563d97be290e44608fce2c62880220957c50e17 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 a6e15ff1384add477fee6c08f23e0b3e3ce95f45..7d78718cbed402029933636fcc67bca3e5a272ce 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 3ba7ca052864465b8d7cd4e7152a300613bf68da..9e1717ea7829be73f5948a35d1061303ec06af2b 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 fa83b39bdf3f0100c3b111ab183d95fee85b4dce..1d6c5515718e2760a1bad9657d91a29b881d14ef 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 b09d9d66c7d41b5f4c976f8a39d8a817f2f252a3..7496c531c36cd68a5151aed7b2680925e52dc56e 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 66580a2e335de90f0dc7966a6e75753c958a2d5b..8fe972d9255f82fa402cc2d5b05d58380b4778fd 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 bb3852581bd9ef0853831d6218b0397336b2674f..3c80d647fb47372de7149f192c23cd68453aa4c1 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 ed1ba8908c536d595fb9a6c67086428057785883..a74b44306e76867fc6e133dd452b2272bd10f859 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 f831e0ce01040c4bac7e32bb3f7be07d69d3ae55..a62cfd92c027637356a1d978b3dee1b59e697b56 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 bc5b16d5f6f6c0cc0b130ed4026fec64176a1375..d1ea4580caa7fb3cd4caacecfeed23f632b69c93 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 dee12a9e7d8174f4d3634885a0357121039ee681..947af1c46e823d60dfdc4ba7276d5049004644ba 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 7e050c00be0e746e05021e47969579c37105032d..5aacfe28cb4aa3553181a67602541a42b2e2d80b 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 d071fe9c043295d560203769afd292020dd5ae8c..b9f562df9d0d0f054df570e031f893a2e73a2fbb 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 daebf53fc6e71bda7d4405329ad60332f8f3ced9..8c5c9752dc154e6fedd5aee441579f6ed2c1b00e 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 a0e1d7beb7f7c329cbe47f9c15c77462a35ff269..90e40073913e912443a475a98d91da529c2d6d5d 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 6def1296dcb8ea9e1da4c33db036df46e7f0acf5..39932109adafa6d1915671cd2f750119d1e1015a 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 19d30e2e139902455e599b46265064d3211c085e..8f3f982e92c8d2125bfe89699b354c6404fa84f6 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 034e7b9dbe8c720a7942b3e9f0c79883cb48bff7..024ddf5812a5a9d5584cc206d4f733fb83b3aca1 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 6bc41c01ae204e04393a1c296ec3c7e497de7673..8cfa8e89622795655249156d104f2cfb9650d0c1 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 e97fcb0acb19ea5b67ae1db365b6d8f3b6976495..73851cdc0adac5f34625beb05211dd4eb2128132 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 7b10bdc6b5cbcc12fb748b48eb96f5525a165fb0..7dd8b729dc59729aedf627afe79e390988405c09 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 91be2ab087131e1bf71e890d8ec9d6660593684d..7742312ef4c8be5a8f213ee36f0a53e8d9223b4d 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 7daab77b17d85242a87aa08500a2d0606ea19ad4..8fa56d7bdf5af9bbca3b26e75d3c4e3f06ab8b61 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 a42a986e60aff81e994c9b343228d97536b908a7..1c207a3d06aa749694fa3a1cf7c1e94dea588c0a 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 d8c1ec3e4be3c083abfce247dcc058ee9841fd4c..241b32ef67a3ec2c0dbad5263af347c42ae0fcc2 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 49dbe81c369834fa186ae4afc3802b7e38b5ac93..4827ed138f6995181838e63f7c3ddc565a5398da 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 84e102598f3e8afbba85020c1d476e1ceeaa8a5a..29273f2baa2929a6f39f25ec0921a8d17b7b9a02 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 69a2f5d1a79653fe7afd06a122c90ec6f983f2d2..e898f769bdd0be67bec4c6f330ed214670dd423d 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 d242949878e6e5fd2569297adf739bece6d4b590..13ed485ae3753fb7c54929206ddbc8b0811d5d40 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 24d85dccc6ffb2fe473b3ba3dde0158f5f66c9de..26d5c7270255896cbcc718d5164382f4c4045f14 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 8d1c5b58f0673b32d00f67a177a9c09feba0d48d..53694dd0aca9c3b141fc557a15f94578d7a01b06 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 18db4f2700c70424a50a39404b0c1a46eb02a977..c53fc025ac936d80f1ff72a2e5fe0907c30b46f3 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 43a380fc76e3e8613c0e7557554352b561a47594..07cb402eef3094b6d84ca6e9e2d10b22d5a4cc46 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 081ef7bf45e12abb318b15aa71eeffd7fe80af51..26c2c90e97bd1897b8c2b1998cc0634b5b218943 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 f8e0f0423c64b8aee7fcc9a89cedc6daf3e077e0..10f97e5195240f442f5681383cc43cb919eec48f 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 3c0629bd900dd8977a8273db3b503cc2de5a6c08..ccc50bb7065c20a071bd1eba8e843791637b0feb 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 1197b87226025a7aa108517b44f1877fd83e6d82..c41e1121cfe27739a28c48fd490b6f006733f533 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 47c37ffa1fdaf49a7bd9ae074d7c11739d219fd7..fe78713f24196d3919fac9f1ad5b1e2faafe7cbf 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 a12e3848809e44d1fd78957937f3236ea178e4bf..fbc0e019163edcec8db08434d5aba276b609fa49 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 27ce08598a3a955c5331782ff51649427c672bda..6c3696d533d33d8fdaf6fbac05755bf325948ba9 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 9fa412769e82e1b774709361b6709ba54c150ccf..f4c85b729f4bec511c50ef70d86b9b276d99cf1c 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 706521fccad627f3c3fdce421dfba060d987611b..0f4041e8bd949e3e501ab1c6b852d1cae2549c5f 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 4a143b4059170b36127c106eabcfbb8f5455fcca..ce001cecaf9e1eaed9e67c8000a9fc29edc6e9a2 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 b232b098005fb386d9714cf59354a5abdc520986..97d699a0df944597842be814cd507392754e88f2 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 2ac4ccdf835a4d3f67a896d51d4d0d2a8b7f0af7..1a3482b40222f0367918ea15599eafa077d2f594 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 ad7c64dc1ea0544f4b725a1a37a5d24f4ee93e76..2545624453f8e128e9e9e5771c95e58aa9dee3b0 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 c2f461b6e5a5e84d650bf1dfd1a9226f3c623f76..75090edcbea8bc460a22d35713ba5f1e79d5d5a9 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 7c54fed79fdc874734ac1dd4489a822d0101eaad..9351a81b51a52b0c34a5430cb6b9db0984394d42 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 bb8d11ab860dfa2437fe16839826e8303a3012d5..58b2b03f4f9a8bcd602063f41fd56f63438acb26 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 7bec4443857b1c5197d403461f8215d9c64c273f..e8a5d056a2488ae1ea2fad347d85e2a40b90ee2e 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 d92750f64aacc34c101d0cbd3dbce1fe200e24b6..f336ef8933746dd3be113efe9539da65c14d6e89 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 6b18ea9c5b91bd42a7888146a0e31b053f25b8d6..70c9d4b60108a4054de6047961e320dcb657a241 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 77574d9d5b9ca0152cd5709dab8620d4e7bae99b..b32d9143429234edff7c774c69a9fb86001eea00 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 83aaea95b88ed4b8f8de572d70f4dd04ea803627..93ccc486f8a436473c20b745f9d890937b107526 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 37e3d52a5f388e409a21ab96c7d9b247af0231ef..abd8f41670e0650f79d6dbd2982ddbabf5ce04c1 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 ca24a41cd333363b236fac4f129a867337cbfae0..942d225b84b39dc85492cb596a7fe3e027e0c7ed 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 fcebe8e81d23b09fe04cc546871b45f821d693a3..df092a8a48fc4f0aa3c52946d4ae16a91206a830 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 6f4779ac7265cd6f7d491b247142b0fb74ce1050..03a9b9aeb0a808949cf38693ac1cb646265a05ec 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 760a4c5474a7db68a9d9b53e297187ece19a8758..7b947c8dc012e7088ff9721cdedb885a9c75f20c 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 aba59f86c996acdceb00d4ba26030a7ea47b6d8e..dd315c2f989797dcde3bfefed0a249cee7d86c48 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 304609dadd1a2fd3e2466190d4410850762886eb..63ecbe7fe49414d0b1efb2f3ba541f11099a731f 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 14e0ef1ad7e6843096c03e5ada34b93471a043be..aff1a8272949226caa3af3cbe8961da15d5eb5be 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 d10b6163a3c7e2abfb8efa2c9133dee8b5bd814a..0e39081ee4cd7c0a75c2cde7131ed3825aa6d6fd 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 fb0c35cfb4c67db5678ce420b2257f6bda869c2d..bf8e377ae8adcbc100d3ffe6a754f940382b8f81 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 b2454fcafd6a6c425f69f397f82adfa5385ad1f6..346e2c66aa2154646a2ecfd5b6148423bd71d6cc 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 3373b8b98f5b0f3252861aaa68195dc53d41cf06..ded98354293546b755b874f99d8e90b3dad3c136 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 56167839d0fce299ea5719e21c4482dcb88b0d64..f730009a6155d750e78af5493cd616fe978a6121 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 4ace0221b654187ea6c94a49c01edc6a4612bc22..bfcdba9c4fac4f5a338fd226fe4dc2195a016de7 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 fed15301ef501ba86e98ffd6620e3e5b4abbc7b7..f8148d9ca969d7ec9fafd6b6c545fed9dd4b4156 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 d49927f491f96ef7c8df6aaceca0dee51e5a71a5..ed2e1ff54f761bd8c91f369bd8acd255a4aab6bf 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 89590644b47da33de9751f2c0f8ad7da37091381..7cc01541c010f3acbba365486cf33533bf2def61 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 21dc8281696aa9fd0c02416eb5a869ed052e82ac..5846c83ba154d3fd927e9f2c4df51e2d39f891a2 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 b1bbe6d7247c7cdaccd08c6f41b7daef11bc0edb..896fc5ce400a490c241e5f97d5b45562f7d6fdb1 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 186c864b7466b96f087ee34b59c44a9cbfd05dc9..8f46900b951755a46d22946da67c5b669d5c2554 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 ab8028d695311f89d70b25bbe0caa72975d34ad7..2b1021932ca1690723d1cf6fd1ee28f7c0208643 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 d3fd4cd13b7883089b734b9b28818a6d54b840d0..b3d96a30974f94a92f5fd4126544161dcfac0d90 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 41e27984f45cb61231337c7a2deddffbd94bcfb4..a590adb3daa5b73226028cd7849790dbc17c3a90 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 f5ef4f54b63efc63e315d9564c343b0db897273f..2a01bcebfeecf93cbbc903dcd0eb70cb1585dc48 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 79592b1f44e2b406f8047911d6f3393ce0e59951..ec825d433f11b1fcb0b818e17dc244095eb9ace5 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 4501cec93bef1b62aa818cb3b0e2b79b1d7e0272..24299214bcc101a7a5004f35142add80db968ce6 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 c341eb9fe20955173ebda5fe254099fb4f05df26..1bea0f5f8b02931aca9c2d6e1066260692ece1d3 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 fb8f301d2e0010ab89161b37f194d594d9c17598..292ff426af9ee340e0f5b457146333227d90f48f 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 47c9b81ef58ffef8825c61e4b73a9386c65f2db4..eef248adbdf01b31857ddc66d417d91b2fe500a3 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 61981c28ce62fad3768c87138d646118ba0f85fd..8850cd72418c34dc35bd88896f4d22c55203d3ec 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 902fe5957ec566db02922fc3609a5cb15a024d44..2273bebfaed7e334d4ef71134bab231b4eed5d8d 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 1ca519e17bc8a5e48355c4aae65fa22a6e1db800..422b35f680b150478c017137ce78837dfc72b750 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 4c246e7e92e3257c028f290e4db1333a363b3473..adb95a931f74c8a4322168e696aa1d9e350855a4 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 6b4c2632af4593d689b1d0aab336f9f4812939fa..fee793ab86be35e4bf749ffe15272708ab65d3f1 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 1940a9c0a7600b931fe8334d933046f161979c2d..a09907eca5e4e2cfa2385047ff1a10a340408f59 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 e062c6b1f35a6f544ad9281ae1be0066d3debd6c..0cf44c78428138d3295755dafafac273e347dbf8 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 b41ca8678e686537dd729bde81346faf625132fa..8d692fefd48a079bf2dac13506072c45e6c54394 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 58f82da80bd14e7184115de402cb5a852ac11536..88a0e146d1c1e3440db83a6ec6b4557b15104091 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 e8d103921f30ebcc954c2372c5a23e5b90e8fd5e..f18e59ea6806908a66a3f01e8899e31ef17d8005 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 2c339e02f54d5d0d80ece00fe2b8e838616dd03e..75ed9c009c32fc82ef55ed8805dd6db27e8e3393 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 9e70443e95f92887128dce943fcc895d73c1785b..ee1c6f6fb65fc2df204326b6897cd0a9ff0001db 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 a8acbae7a1e6fd9efa0c4bdf324b4d33b0a7d03e..d69dec7791913db0293a0a4a269b36f66406937f 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 7b49dcbd8bc99e71c598eba99776fde2bafb8ba8..e00edf825eface08103d498971d90c62c7708b05 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 146b504403d3cd0cec502a2459dbbe177c6cfbcd..1e5523304c60d57b6972173a2f6e8088fc9f0ccc 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 4e1052f99fbc64a4d6d6d69d802ac73d57489749..e2a427c3be17fcc23f1c6298fea70504203e9f05 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 3b80df1f3ef01878d217ead531759b3c76667760..9d50b5fdf55432cee5ff41942059bf7ed8ba2633 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 1797ce98c13f3e2a7263e4d9da10b38a3d2cb3f1..a966f19ae0bd42d23ce05b16e32210f8059425c7 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 829a07f42b22a7208a60292bb5b67bf10480c307..15969f08ab4041b1d448b0410c2f6371a3f03ed1 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 4de9d7ba36924d916c2f3d7b09c7c6253cb7e419..0d883e92aa1e254b94af9a670189b08e0905feea 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 44ff58e7b579e3f4c45544bd980a3aa795fc7072..3ecd6d979bf3f40eedfcc73b1907a70d1213b2e6 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 e6b41139cf472c36cf9664a3b9bf371088b2547d..81bbabdb4747a871c9be30e7016391c4ee94438d 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 018f5debe8ab7bb47ac7e375abbc9cc4766a0ae1..b44007e66f854567d4ba1083876b9e68c405d8bf 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 7572b2df4b1c3f514de0984241adc16eb715f46b..9164047209e6ffece736b34197bb23a4cba3b4cd 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 b0512dfcbea8d6ebd08223056843f213d5323e9e..ef733f877dc7f022b0930888139191cb8bc8dae9 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 3ec40aa17300eb78a8713bc678abb189005349a4..9d6600c962fa215a859fc74fab200733363335dd 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 2b55283075a5e85cfbb0f475af1862e2b66cfe7f..6746295d7aafa5c1f03199e4b5ba9bed09648678 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 d6ad9947745b7f88f8c0e738f534d36f91b75905..ee97f5ac1f82c9175bb788e921b33cfa45296d91 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 dad111bcd745658593a016fe8049a1376ec70206..caa9cbf5b67e00ab8ce0a1da11c603ba736f28a8 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 ae0827d093fd5ab5778b20fab305068fd42e9232..43049b91dd04cbce5754f5c24660da2a9906a50c 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 ded4df2eb6ca716c6707231cbbfdd9c33f769411..29676938034cd2a57c319301c1383397b82e1736 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 7d37a03fb4df3125e1e0aa6a97521d2e1170dd3c..f5045bee0193a92e56b42809881256bc69b1012f 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 5ed475658a830a6f2804cdbe7211fbcb883cc0af..ef87f816ffbf1fde03d0320a332d9da6243df808 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 469df35b05d4dad3a07c58c2fc21a6da167cd4c1..c09fa398a2d8178d4b41716d9a7f3440c8fe749f 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 fa9942715b23cd6a65c351499d963d8325a4051c..cbc9a3f93bf28572329cc0b89051cb322695a1b3 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 68f428f48304c6fa21b9ef7637fea0a98a41f11c..30ea538050bf434c1f758ab6540de540cfbdd5f2 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 193e6be178c457802e1d8b5416cb057b6c38c7be..6131eec2cacb9ff06fb927fc1eb78f87e089ddbc 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 c335da96e473ec6750d92bcab33486c9ad9f8898..fae4e038a42b1864ad970da9591f51438592628a 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 778bfa40ce083208113a0f0fc206c7a349e714bc..40005a709e1ac1ecc4cd5a121d4a20380ee3e433 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 7d59f51e57f8cc328913e3c64440452c841c4a9d..4c1f4607c61c68312626f32712eb5d839b7dc626 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 705c226431345641d963f33baa62ba2e8924a05c..bb76d9a47fec36c1c09a1b89ba802a8755b60753 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 a84d753e7fe061dc9279895deb7c61c091366b23..921fcec9541d246352382073ea071b0e3d07a08a 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 edbc41e5098d24619bf5274cad4ea4c273fb9206..d9d8efb8fbd80eced8f7d7034fafc1303723eb2a 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 d9f53797dda11c29557a81471c6f0df5da1303de..1c5099ac208dbe4b5f97dd10ec394fa07bf6fd2c 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 3e74c103ccc4e670fb3d2a4d7c8f12155a70e832..61dbf207c4960e8fe2ac0b4a4e332f451a470912 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 a381405fee32e0aa59e1428d63cb88b3c781dcb7..ba4dfd47c2f5a23fe51f6d0b03e59985e3034172 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 4fc40f2378b4a69c994acf94f91deefc307ef91f..6cc9ff8635726d913ce19583a62ab60bf2c3e2ec 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 eb24e0a11fc320c8f3f905233d566486cffbb070..f0d01317f6e778e3859c9facddc609b8ee182205 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 4de22fbf23159abcefca9ef7003bacce426b9cc0..63caf83b0d21edd487ff9aa1179589f5894790e6 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 c73d4dc3f48f747ee8fcca383a10588823c1ac42..6b1ce13f24458e85dbbc090dc707914d07a833a6 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 9e3455ec19bceae4dd21e9371b077b55877e4f9d..d0ac034172328a5cae79bedcd2fcc248e8644c1b 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 5fb84253e3dfecdba068aec60d592ca4ed6dcef9..3edd50eb0c5fc79924ec1bb334403191c996f7d4 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 3b32af7c462c4cf77797efc820d9bf6f03aefb50..1bd637791d6e0e4608a8ccae459bea1b8f4c006f 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 a8944d0ec7fc0626acfe68946e6e825a13f76815..cb49cef30f68c10872445de75ed1637ce3287f20 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 9f81b58e93d53b567e1e6ed51593ee96113dc32e..ec58a15e5116647719269e7ed5ae0aff284ef924 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 66ed1100bf58e6f8484b8c0b2b0e4c7c178077f1..5a4e9bb31841f00029b0eea2682cf2710b9105b3 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 418946b0673106576ebe909975accf0c7cf6e9e6..427275e3cc63645f2c9d438cab8caefda06c47ec 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 1f01cd205567d824deef8fdf0ccd34d090056d84..f30a454d4c1a14c357edb7a263647a59b5708efa 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 0407944a096bcd4732dc7d2a88180d15b3c060ba..6873968597b0d293f1ec37395dfab9a73bfdf09d 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 90b65807c4f466e7a3ebf824c36bcad747ed8d9a..9b7bbad9aa19bf493102132de3068b6a9ce14e55 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 3882c275b5ff129302cb478fd7e432ba3eb04425..2a1c1789ddafe18b5289c38c43408852beae5445 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 716d4d0a9bc72f012098730a184e4bc3b1dd4daf..5652277ae879271d40ededfda70ad6536fa499f4 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 5b46b0c2d3a44ac078fddf723d36cb0d75b7b34f..9e7804a5014ec2a45895aa3d387d7d91aa4269c7 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 70abb24a3e47ed4a21fdf679e63938280e992173..80f7c0ef1e2b3e0fbb6572441b865ec55ee3e0d9 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 6e9e4f68f2ba1399bbfe2a533560ead99db4d5de..da637be1e6939344a4988ee080f21567b802f0a6 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 a4e53ff9e313f245709e7b637847dfe4e25fd8a0..6bf19d5ce3ff342c89776d72360e83cc35594e8d 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 56e48c696e7d6a7865f3cce6417068fd72758af6..8804605fa8e532aae4780a48b893f918d43ab41e 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 bc8e1b67fee444132d1d933c7c847e39dc1a7def..3afdfa3e97e5e0e8ab198a658884c31cd1545203 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 ad6ca08a599f6a0262a373d3326fbf1be013ac2e..eb06a1b8326afc11292ffb7ad89cb2d106f3ac77 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 2c6c5b4e3d2b3d07be0e7842244179669c877217..3a6c9dd3bc967cfacd09a34f546daa936af0cba5 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 61363ec442ca323bc64daadd5d650ddbaf8301f6..a7a8f7e49837cc35650f0c97f1360c33c8445d08 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 0f3626e7163379bde53c9467328235373a121b68..cfd3a949f178550413337490d21c12c01eaf9350 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 c87b803e78a689c35b5d0a7a6aef2a2ec1e6d44f..8dd576007cc5229b85dd929acd8e664f11f81000 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 30a1832f4de6ad7f08f6d9a34ed710d41470e5c2..8129a8537848863a994bc69846991b5dc8afe3a5 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 2fa2c973e5e6f1c33e10957ba4015895d591e7f9..251ff34236f99d71ecea4dfdc7183671518ddf2e 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 96356f99ef435362cece2d173a534a40f9a8f3ba..22d49be2283b8cce30b33c6b9f0d3b49ad131282 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 55a9d3bd02d8ff4b16982361666dc7ace9d74801..e9fccefa814c4f9538e48839a78be95055da99dc 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 4311350e04f77358354fcd8edb1b57b5c7346661..0de988b0a3abee69f1e0d95cfe2337b2155ecc0d 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 ce151dc34fe4f71f035e75769bf6c053471ec097..78a02d6a0378c183ef3a2edf28cc77e4d6dc086a 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 10b94cbeab1a47a6a984c4e29a42a1692b6d3f0b..a6e0997d126e9e9c44195e45da178aae41fac717 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 7d54956a36ece6cf593cf72213a55ad305641126..d1189fc0b8b019d6fd663d4a13775f0f2fc03d40 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 7887cc6d14a6b45a29f09534dc26f3618652e6b3..b50ae414d25109c60546de5b28524fa029c61189 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 c01efb480aadc4b423decd8574419e515124d91b..fa7fa16eb228dab63e2eb95254ff6cc7499b7037 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 5fc26bead6f481b3494078f6eca98a0bf217f073..fcd4ff2fb6f4f396853d4a7cd0e47b984b420780 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 49a3601fff31b5e642b765e4368f014d1e0bea7b..8a2ae11ba79277defe2835eb0da5e02cf35ae64b 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 ce3c4102666f8382e5df0aac2bc1cfd241987e13..12b645dae20b9972763d2a40475515d44a17ee53 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