From a32ca9adf67982dddc178e78306bc81e91cbae38 Mon Sep 17 00:00:00 2001 From: zuojiangjiang Date: Thu, 10 Mar 2022 14:32:14 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=86=85=E6=BA=90=E6=A3=80=E8=A7=86?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9=20Signed-off-by:=20zuojian?= =?UTF-8?q?gjiang=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... distributed-datamgr-subsystem-architecture.png} | Bin ...73\237_\346\236\266\346\236\204\345\233\276.png" | Bin .../include/ikvstore_data_service.h | 2 +- .../src/ikvstore_data_service.cpp | 6 +++--- .../test/unittest/app_conflict_test.cpp | 2 +- .../app_distributed_kv_data_manager_test.cpp | 6 +++--- .../test/unittest/app_distributed_kv_store_test.cpp | 2 +- frameworks/innerkitsimpl/rdb/src/rdb_notifier.cpp | 2 +- .../include/app_kvstore_observer.h | 2 +- .../innerkits/distributeddata/include/kvstore.h | 2 +- .../innerkits/distributeddata/include/types.h | 2 +- .../app/src/single_kvstore_impl.cpp | 2 +- 12 files changed, 14 insertions(+), 14 deletions(-) rename figures/{en-us_image_0000001162536643.png => distributed-datamgr-subsystem-architecture.png} (100%) rename figures/zh-cn_image_0000001162536643.png => "figures/\345\210\206\345\270\203\345\274\217\346\225\260\346\215\256\347\256\241\347\220\206\345\255\220\347\263\273\347\273\237_\346\236\266\346\236\204\345\233\276.png" (100%) diff --git a/figures/en-us_image_0000001162536643.png b/figures/distributed-datamgr-subsystem-architecture.png similarity index 100% rename from figures/en-us_image_0000001162536643.png rename to figures/distributed-datamgr-subsystem-architecture.png diff --git a/figures/zh-cn_image_0000001162536643.png "b/figures/\345\210\206\345\270\203\345\274\217\346\225\260\346\215\256\347\256\241\347\220\206\345\255\220\347\263\273\347\273\237_\346\236\266\346\236\204\345\233\276.png" similarity index 100% rename from figures/zh-cn_image_0000001162536643.png rename to "figures/\345\210\206\345\270\203\345\274\217\346\225\260\346\215\256\347\256\241\347\220\206\345\255\220\347\263\273\347\273\237_\346\236\266\346\236\204\345\233\276.png" diff --git a/frameworks/innerkitsimpl/distributeddatafwk/include/ikvstore_data_service.h b/frameworks/innerkitsimpl/distributeddatafwk/include/ikvstore_data_service.h index a58f7742a..60fcad4e8 100755 --- a/frameworks/innerkitsimpl/distributeddatafwk/include/ikvstore_data_service.h +++ b/frameworks/innerkitsimpl/distributeddatafwk/include/ikvstore_data_service.h @@ -40,7 +40,7 @@ namespace OHOS::DistributedKv { struct OptionsIpc { bool createIfMissing; bool encrypt; - bool persistant; + bool persistent; bool backup; bool autoSync; int securityLevel; diff --git a/frameworks/innerkitsimpl/distributeddatafwk/src/ikvstore_data_service.cpp b/frameworks/innerkitsimpl/distributeddatafwk/src/ikvstore_data_service.cpp index 18cd0fee4..54e8398e0 100755 --- a/frameworks/innerkitsimpl/distributeddatafwk/src/ikvstore_data_service.cpp +++ b/frameworks/innerkitsimpl/distributeddatafwk/src/ikvstore_data_service.cpp @@ -49,7 +49,7 @@ Status KvStoreDataServiceProxy::GetKvStore(const Options &options, const AppId & OptionsIpc optionsIpc; optionsIpc.createIfMissing = options.createIfMissing; optionsIpc.encrypt = options.encrypt; - optionsIpc.persistant = options.persistant; + optionsIpc.persistent = options.persistent; optionsIpc.backup = options.backup; optionsIpc.autoSync = options.autoSync; optionsIpc.securityLevel = options.securityLevel; @@ -101,7 +101,7 @@ Status KvStoreDataServiceProxy::GetSingleKvStore(const Options &options, const A OptionsIpc optionsIpc; optionsIpc.createIfMissing = options.createIfMissing; optionsIpc.encrypt = options.encrypt; - optionsIpc.persistant = options.persistant; + optionsIpc.persistent = options.persistent; optionsIpc.backup = options.backup; optionsIpc.autoSync = options.autoSync; optionsIpc.securityLevel = options.securityLevel; @@ -430,7 +430,7 @@ int32_t KvStoreDataServiceStub::GetKvStoreOnRemote(MessageParcel &data, MessageP Options options; options.createIfMissing = optionsIpc.createIfMissing; options.encrypt = optionsIpc.encrypt; - options.persistant = optionsIpc.persistant; + options.persistent = optionsIpc.persistent; options.backup = optionsIpc.backup; options.autoSync = optionsIpc.autoSync; options.securityLevel = optionsIpc.securityLevel; diff --git a/frameworks/innerkitsimpl/distributeddatafwk/test/unittest/app_conflict_test.cpp b/frameworks/innerkitsimpl/distributeddatafwk/test/unittest/app_conflict_test.cpp index aaa929001..51dda6eb7 100755 --- a/frameworks/innerkitsimpl/distributeddatafwk/test/unittest/app_conflict_test.cpp +++ b/frameworks/innerkitsimpl/distributeddatafwk/test/unittest/app_conflict_test.cpp @@ -112,7 +112,7 @@ void AppConflictTest::SetUp(void) Options options; options.createIfMissing = true; options.encrypt = false; // not supported yet. - options.persistant = true; // not supported yet. + options.persistent = true; // not supported yet. std::string appId = "odmf"; // define app name. std::string storeId = "conflictdb"; // define kvstore(database) name. diff --git a/frameworks/innerkitsimpl/distributeddatafwk/test/unittest/app_distributed_kv_data_manager_test.cpp b/frameworks/innerkitsimpl/distributeddatafwk/test/unittest/app_distributed_kv_data_manager_test.cpp index 83005769c..09bf43187 100755 --- a/frameworks/innerkitsimpl/distributeddatafwk/test/unittest/app_distributed_kv_data_manager_test.cpp +++ b/frameworks/innerkitsimpl/distributeddatafwk/test/unittest/app_distributed_kv_data_manager_test.cpp @@ -63,11 +63,11 @@ void AppDistributedKvDataManagerTest::SetUpTestCase(void) { create.createIfMissing = true; create.encrypt = false; - create.persistant = true; + create.persistent = true; noCreate.createIfMissing = false; noCreate.encrypt = false; - noCreate.persistant = true; + noCreate.persistent = true; appId = "com.ohos.nb.service"; std::string dataDir = "data/misc_ce/0/com.ohos.nb.service"; @@ -325,7 +325,7 @@ HWTEST_F(AppDistributedKvDataManagerTest, AppManagerDeleteKvStore001, TestSize.L /** * @tc.name: AppManagerDeleteKvStore002 - * @tc.desc: Delete a opened KvStore, and the callback should return ILLEGAL_STATE. + * @tc.desc: Delete an opened KvStore, and the callback should return ILLEGAL_STATE. * @tc.type: FUNC * @tc.require: AR000CCPOJ * @tc.author: liqiao diff --git a/frameworks/innerkitsimpl/distributeddatafwk/test/unittest/app_distributed_kv_store_test.cpp b/frameworks/innerkitsimpl/distributeddatafwk/test/unittest/app_distributed_kv_store_test.cpp index 338b5ae79..36091ec71 100755 --- a/frameworks/innerkitsimpl/distributeddatafwk/test/unittest/app_distributed_kv_store_test.cpp +++ b/frameworks/innerkitsimpl/distributeddatafwk/test/unittest/app_distributed_kv_store_test.cpp @@ -76,7 +76,7 @@ void AppDistributedKvStoreTest::SetUpTestCase(void) syncWrite.local = false; options.createIfMissing = true; options.encrypt = false; - options.persistant = true; + options.persistent = true; } void AppDistributedKvStoreTest::TearDownTestCase(void) diff --git a/frameworks/innerkitsimpl/rdb/src/rdb_notifier.cpp b/frameworks/innerkitsimpl/rdb/src/rdb_notifier.cpp index 0893214aa..dba5a48a5 100644 --- a/frameworks/innerkitsimpl/rdb/src/rdb_notifier.cpp +++ b/frameworks/innerkitsimpl/rdb/src/rdb_notifier.cpp @@ -151,7 +151,7 @@ int32_t RdbNotifierStub::OnChangeInner(MessageParcel &data, MessageParcel &reply } std::vector devices; if (!data.ReadStringVector(&devices)) { - ZLOGE("read devices faield"); + ZLOGE("read devices failed"); return RDB_ERROR; } return OnChange(storeName, devices); diff --git a/interfaces/innerkits/app_distributeddata/include/app_kvstore_observer.h b/interfaces/innerkits/app_distributeddata/include/app_kvstore_observer.h index b536e5056..94b91d6d4 100644 --- a/interfaces/innerkits/app_distributeddata/include/app_kvstore_observer.h +++ b/interfaces/innerkits/app_distributeddata/include/app_kvstore_observer.h @@ -20,7 +20,7 @@ namespace OHOS { namespace AppDistributedKv { -// This is a abstract classes. Client needs to implement this class by self. +// This is an abstract classes. Client needs to implement this class by self. class AppKvStoreObserver { public: KVSTORE_API AppKvStoreObserver() = default; diff --git a/interfaces/innerkits/distributeddata/include/kvstore.h b/interfaces/innerkits/distributeddata/include/kvstore.h index 6d4505682..5f74f659c 100644 --- a/interfaces/innerkits/distributeddata/include/kvstore.h +++ b/interfaces/innerkits/distributeddata/include/kvstore.h @@ -72,7 +72,7 @@ public: // delete a list of entries in the kvstore, // delete key not exist still return success, // key length should not be greater than 256, and can not be empty. - // if keys contains invaid key, all delete will fail. + // if keys contains invalid key, all delete will fail. // keys memory size should not be greater than IPC transport limit, and can not be empty. KVSTORE_API virtual Status DeleteBatch(const std::vector &keys) = 0; diff --git a/interfaces/innerkits/distributeddata/include/types.h b/interfaces/innerkits/distributeddata/include/types.h index 66a70b9fc..28f644f7b 100755 --- a/interfaces/innerkits/distributeddata/include/types.h +++ b/interfaces/innerkits/distributeddata/include/types.h @@ -264,7 +264,7 @@ enum class DeviceFilterStrategy { struct Options { bool createIfMissing = true; bool encrypt = false; - bool persistant = false; + bool persistent = false; bool backup = true; bool autoSync = true; int securityLevel = SecurityLevel::NO_LABEL; diff --git a/services/distributeddataservice/app/src/single_kvstore_impl.cpp b/services/distributeddataservice/app/src/single_kvstore_impl.cpp index a81e90dec..3fd750615 100755 --- a/services/distributeddataservice/app/src/single_kvstore_impl.cpp +++ b/services/distributeddataservice/app/src/single_kvstore_impl.cpp @@ -1603,7 +1603,7 @@ void SingleKvStoreImpl::OnDump(int fd) const dprintf(fd, "%s backup : %d\n", prefix.c_str(), static_cast(options_.backup)); dprintf(fd, "%s encrypt : %d\n", prefix.c_str(), static_cast(options_.encrypt)); dprintf(fd, "%s autoSync : %d\n", prefix.c_str(), static_cast(options_.autoSync)); - dprintf(fd, "%s persistant : %d\n", prefix.c_str(), static_cast(options_.persistant)); + dprintf(fd, "%s persistent : %d\n", prefix.c_str(), static_cast(options_.persistent)); dprintf(fd, "%s kvStoreType : %d\n", prefix.c_str(), static_cast(options_.kvStoreType)); dprintf(fd, "%s createIfMissing : %d\n", prefix.c_str(), static_cast(options_.createIfMissing)); dprintf(fd, "%s schema : %s\n", prefix.c_str(), options_.schema.c_str()); -- Gitee From 24a92e0c78717dcfe368d26fba61966f8b90cd72 Mon Sep 17 00:00:00 2001 From: zuojiangjiang Date: Thu, 10 Mar 2022 15:44:35 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=86=85=E6=BA=90=E6=A3=80=E8=A7=86?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9=20Signed-off-by:=20zuojian?= =?UTF-8?q?gjiang=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/app_distributed_kv_data_manager_impl.cpp | 2 +- .../distributeddatafwk/src/ikvstore_data_service.cpp | 2 +- interfaces/innerkits/app_distributeddata/include/app_types.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frameworks/innerkitsimpl/distributeddatafwk/src/app_distributed_kv_data_manager_impl.cpp b/frameworks/innerkitsimpl/distributeddatafwk/src/app_distributed_kv_data_manager_impl.cpp index a464c22ee..afa655fa4 100755 --- a/frameworks/innerkitsimpl/distributeddatafwk/src/app_distributed_kv_data_manager_impl.cpp +++ b/frameworks/innerkitsimpl/distributeddatafwk/src/app_distributed_kv_data_manager_impl.cpp @@ -141,7 +141,7 @@ Status AppDistributedKvDataManagerImpl::GetKvStore( Status status = Status::ERROR; DistributedDB::KvStoreNbDelegate::Option dbOption; dbOption.createIfNecessary = options.createIfMissing; - dbOption.isMemoryDb = !options.persistant; + dbOption.isMemoryDb = !options.persistent; dbOption.secOption = ConvertSecurityLevel(options.securityLevel); kvStoreDelegateManager_->GetKvStore( trimmedStoreId, dbOption, diff --git a/frameworks/innerkitsimpl/distributeddatafwk/src/ikvstore_data_service.cpp b/frameworks/innerkitsimpl/distributeddatafwk/src/ikvstore_data_service.cpp index 54e8398e0..068c6a147 100755 --- a/frameworks/innerkitsimpl/distributeddatafwk/src/ikvstore_data_service.cpp +++ b/frameworks/innerkitsimpl/distributeddatafwk/src/ikvstore_data_service.cpp @@ -549,7 +549,7 @@ int32_t KvStoreDataServiceStub::GetSingleKvStoreOnRemote(MessageParcel &data, Me Options options; options.createIfMissing = optionsIpc.createIfMissing; options.encrypt = optionsIpc.encrypt; - options.persistant = optionsIpc.persistant; + options.persistent = optionsIpc.persistent; options.backup = optionsIpc.backup; options.autoSync = optionsIpc.autoSync; options.securityLevel = optionsIpc.securityLevel; diff --git a/interfaces/innerkits/app_distributeddata/include/app_types.h b/interfaces/innerkits/app_distributeddata/include/app_types.h index c36bd26f0..abe748384 100755 --- a/interfaces/innerkits/app_distributeddata/include/app_types.h +++ b/interfaces/innerkits/app_distributeddata/include/app_types.h @@ -130,7 +130,7 @@ enum SecurityLevel : int { struct Options { bool createIfMissing = false; bool encrypt = false; - bool persistant = false; + bool persistent = false; int conflictResolvePolicy = LAST_WIN; int securityLevel = SecurityLevel::NO_LABEL; }; -- Gitee