From d1cc827f230078a4a1a2dc995cb9b32e99c0f53a Mon Sep 17 00:00:00 2001 From: zuojiangjiang Date: Mon, 21 Mar 2022 22:13:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=86=85=E6=BA=90=E6=A3=80=E8=A7=86=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E4=BF=AE=E6=94=B9=EF=BC=8C=20=E5=A2=9E=E5=8A=A0OAT?= =?UTF-8?q?=E6=96=87=E4=BB=B6=20Signed-off-by:=20zuojiangjiang=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- OAT.xml | 69 +++++++++++++++++++ frameworks/common/concurrent_map.h | 2 +- .../include/idevice_status_change_listener.h | 2 +- .../include/ikvstore_data_service.h | 2 +- .../distributeddatafwk/include/inner_types.h | 4 +- .../distributeddatafwk/include/itypes_util.h | 3 +- .../device_status_change_listener_client.cpp | 2 +- .../idevice_status_change_listener_impl.cpp | 2 +- .../distributeddatafwk/src/itypes_util.cpp | 3 +- .../src/kvstore_death_recipient_impl.cpp | 2 +- .../src/kvstore_death_recipient_impl.h | 2 +- .../src/kvstore_resultset_client.cpp | 2 +- .../src/kvstore_sync_callback_client.cpp | 2 +- .../distributeddatafwk/src/sync_observer.cpp | 2 +- .../distributeddatafwk/src/sync_observer.h | 2 +- .../test/unittest/blob_test.cpp | 2 +- ...stributed_kv_data_manager_encrypt_test.cpp | 2 +- .../unittest/local_subscribe_store_test.cpp | 1 - .../unittest/single_kvstore_client_test.cpp | 23 +++---- .../innerkitsimpl/rdb/include/irdb_service.h | 2 +- .../innerkitsimpl/rdb/include/rdb_manager.h | 2 +- .../innerkitsimpl/rdb/include/rdb_notifier.h | 2 +- .../innerkitsimpl/rdb/include/rdb_service.h | 2 +- .../innerkitsimpl/rdb/include/rdb_types.h | 2 +- .../innerkitsimpl/rdb/src/rdb_manager.cpp | 2 +- .../rdb/src/rdb_manager_impl.cpp | 2 +- .../innerkitsimpl/rdb/src/rdb_manager_impl.h | 2 +- .../innerkitsimpl/rdb/src/rdb_notifier.cpp | 2 +- .../rdb/src/rdb_service_proxy.cpp | 2 +- .../innerkitsimpl/rdb/src/rdb_service_proxy.h | 2 +- .../include/js_const_properties.h | 2 +- .../include/js_device_kv_store.h | 4 +- .../distributeddata/include/js_field_node.h | 4 +- .../distributeddata/include/js_kv_manager.h | 2 +- .../distributeddata/include/js_kv_store.h | 2 +- .../include/js_kv_store_resultset.h | 3 +- .../distributeddata/include/js_observer.h | 4 +- .../distributeddata/include/js_query.h | 2 +- .../distributeddata/include/js_schema.h | 4 +- .../include/js_single_kv_store.h | 4 +- .../distributeddata/include/js_util.h | 2 +- .../distributeddata/include/napi_queue.h | 2 +- .../distributeddata/include/uv_queue.h | 2 +- .../src/js_const_properties.cpp | 2 +- .../distributeddata/src/js_field_node.cpp | 2 +- .../distributeddata/src/js_kv_manager.cpp | 2 +- .../src/js_kv_store_resultset.cpp | 2 +- .../distributeddata/src/js_observer.cpp | 2 +- .../distributeddata/src/js_query.cpp | 2 +- .../distributeddata/src/js_schema.cpp | 2 +- .../distributeddata/src/js_util.cpp | 8 +-- .../distributeddata/src/uv_queue.cpp | 2 +- .../distributeddata/include/single_kvstore.h | 2 +- .../adapter/autils/src/directory_utils.cpp | 2 +- .../test/unittest/kv_scheduler_test.cpp | 2 +- .../unittest/kv_store_thread_pool_test.cpp | 2 +- .../broadcaster/src/broadcast_sender.cpp | 2 +- .../broadcaster/src/broadcast_sender_impl.cpp | 2 +- .../broadcaster/src/broadcast_sender_impl.h | 2 +- .../adapter/communicator/src/data_buffer.cpp | 2 +- .../adapter/communicator/src/data_buffer.h | 4 +- .../communicator/src/softbus_adapter.h | 2 +- .../adapter/dfx/src/dds_trace.cpp | 2 +- .../src/fault/communication_fault_impl.cpp | 2 +- .../dfx/src/fault/runtime_fault_impl.cpp | 2 +- .../dfx/src/fault/service_fault_impl.cpp | 2 +- .../adapter/dfx/src/reporter.cpp | 2 +- .../dfx/src/statistic/statistic_reporter.cpp | 2 +- .../src/statistic/traffic_statistic_impl.cpp | 2 +- .../src/statistic/visit_statistic_impl.cpp | 2 +- .../unittest/distributeddata_dfx_mst_test.cpp | 2 +- .../unittest/distributeddata_dfx_ut_test.cpp | 4 +- .../adapter/include/autils/constant.h | 1 - .../adapter/include/autils/directory_utils.h | 2 +- .../adapter/include/autils/kv_scheduler.h | 2 +- .../include/autils/platform_specific.h | 2 +- .../adapter/include/autils/time_utils.h | 2 +- .../include/broadcaster/broadcast_sender.h | 2 +- .../adapter/include/dfx/dds_trace.h | 2 +- .../permission/src/meida_lib_checker.cpp | 4 +- .../permission/src/meida_lib_checker.h | 4 +- .../app/src/device_change_listener_impl.cpp | 2 +- .../app/src/device_change_listener_impl.h | 2 +- .../app/src/device_kvstore_impl.cpp | 2 +- .../app/src/device_kvstore_impl.h | 2 +- .../app/src/device_kvstore_observer_impl.cpp | 2 +- .../app/src/device_kvstore_observer_impl.h | 2 +- .../app/src/device_kvstore_resultset_impl.cpp | 2 +- .../app/src/device_kvstore_resultset_impl.h | 2 +- .../kvstore_flowctrl_manager.cpp | 4 +- .../kvstore_flowctrl_manager.h | 4 +- .../app/src/kvstore_account_observer.cpp | 2 +- .../app/src/kvstore_app_accessor.cpp | 2 +- .../app/src/kvstore_app_accessor.h | 2 +- .../app/src/kvstore_data_service.cpp | 2 +- .../app/src/kvstore_device_listener.cpp | 2 +- .../app/src/kvstore_resultset_impl.cpp | 2 +- .../app/src/security/security.cpp | 2 +- .../app/src/uninstaller/uninstaller.cpp | 2 +- .../app/src/uninstaller/uninstaller.h | 2 +- .../app/src/uninstaller/uninstaller_impl.cpp | 2 +- .../app/src/uninstaller/uninstaller_impl.h | 2 +- .../app/test/unittest/rdb_service_impl.h | 2 +- .../framework/checker/checker_manager.cpp | 4 +- .../checker/default/bundle_checker.cpp | 4 +- .../checker/default/system_checker.cpp | 4 +- .../framework/eventcenter/event.cpp | 4 +- .../framework/eventcenter/event_center.cpp | 4 +- .../include/checker/checker_manager.h | 4 +- .../include/checker/default/bundle_checker.h | 4 +- .../include/checker/default/system_checker.h | 4 +- .../framework/include/eventcenter/event.h | 4 +- .../include/eventcenter/event_center.h | 4 +- .../framework/include/metadata/meta_data.h | 4 +- .../include/metadata/secret_key_meta_data.h | 4 +- .../include/serializable/serializable.h | 6 +- .../framework/include/utils/anonymous.h | 4 +- .../framework/include/utils/block_integer.h | 2 +- .../framework/include/utils/constant.h | 1 - .../framework/include/utils/crypto.h | 4 +- .../metadata/capability_meta_data.cpp | 2 +- .../framework/metadata/meta_data.cpp | 4 +- .../metadata/secret_key_meta_data.cpp | 4 +- .../framework/metadata/store_meta_data.cpp | 2 +- .../framework/metadata/strategy_meta_data.cpp | 2 +- .../framework/test/checker_manager_test.cpp | 2 +- .../framework/test/event_center_test.cpp | 2 +- .../framework/utils/anonymous.cpp | 4 +- .../framework/utils/block_integer.cpp | 2 +- .../framework/utils/crypto.cpp | 4 +- .../service/bootstrap/include/bootstrap.h | 4 +- .../service/bootstrap/src/bootstrap.cpp | 2 +- .../service/config/include/config_factory.h | 6 +- .../config/include/model/checker_config.h | 4 +- .../config/include/model/component_config.h | 4 +- .../config/include/model/directory_config.h | 4 +- .../config/include/model/global_config.h | 4 +- .../config/include/model/network_config.h | 4 +- .../config/include/model/protocol_config.h | 4 +- .../service/config/src/config_factory.cpp | 4 +- .../config/src/model/checker_config.cpp | 2 +- .../config/src/model/component_config.cpp | 4 +- .../config/src/model/directory_config.cpp | 4 +- .../config/src/model/global_config.cpp | 2 +- .../config/src/model/network_config.cpp | 2 +- .../config/src/model/protocol_config.cpp | 4 +- .../directory/include/directory_manager.h | 2 +- .../directory/include/kvstore_context.h | 2 +- .../directory/src/directory_manager.cpp | 2 +- .../service/kvdb/executor_factory.cpp | 2 +- .../service/rdb/rdb_service_impl.cpp | 2 +- .../service/rdb/rdb_service_impl.h | 2 +- .../service/rdb/rdb_service_stub.cpp | 2 +- .../service/rdb/rdb_service_stub.h | 2 +- .../service/rdb/rdb_store_observer_impl.cpp | 2 +- .../service/rdb/rdb_store_observer_impl.h | 2 +- .../service/rdb/rdb_syncer.cpp | 4 +- .../service/rdb/rdb_syncer.h | 2 +- .../service/test/config_factory_test.cpp | 2 +- 159 files changed, 283 insertions(+), 221 deletions(-) create mode 100644 OAT.xml diff --git a/OAT.xml b/OAT.xml new file mode 100644 index 000000000..f50b452b4 --- /dev/null +++ b/OAT.xml @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + diff --git a/frameworks/common/concurrent_map.h b/frameworks/common/concurrent_map.h index 58dc0e92c..3c4d85ae3 100644 --- a/frameworks/common/concurrent_map.h +++ b/frameworks/common/concurrent_map.h @@ -226,5 +226,5 @@ private: mutable std::recursive_mutex mutex_; std::map<_Key, _Tp> entries_; }; -} +} // namespace OHOS #endif // OHOS_DISTRIBUTED_DATA_FRAMEWORKS_COMMON_CONCURRENT_MAP_H diff --git a/frameworks/innerkitsimpl/distributeddatafwk/include/idevice_status_change_listener.h b/frameworks/innerkitsimpl/distributeddatafwk/include/idevice_status_change_listener.h index fe0df5542..ca6cf4f46 100644 --- a/frameworks/innerkitsimpl/distributeddatafwk/include/idevice_status_change_listener.h +++ b/frameworks/innerkitsimpl/distributeddatafwk/include/idevice_status_change_listener.h @@ -45,4 +45,4 @@ private: } // namespace DistributedKv } // namespace OHOS -#endif // DEV_IDEVICE_STATUS_CHANGE_LISTENER_H \ No newline at end of file +#endif // DEV_IDEVICE_STATUS_CHANGE_LISTENER_H diff --git a/frameworks/innerkitsimpl/distributeddatafwk/include/ikvstore_data_service.h b/frameworks/innerkitsimpl/distributeddatafwk/include/ikvstore_data_service.h index 60fcad4e8..34f583d72 100644 --- a/frameworks/innerkitsimpl/distributeddatafwk/include/ikvstore_data_service.h +++ b/frameworks/innerkitsimpl/distributeddatafwk/include/ikvstore_data_service.h @@ -178,6 +178,6 @@ public: private: static inline BrokerDelegator delegator_; }; -} +} // namespace OHOS::DistributedKv #endif // I_KV_STORE_DATA_SERVICE_H diff --git a/frameworks/innerkitsimpl/distributeddatafwk/include/inner_types.h b/frameworks/innerkitsimpl/distributeddatafwk/include/inner_types.h index 192338f77..439da20d8 100644 --- a/frameworks/innerkitsimpl/distributeddatafwk/include/inner_types.h +++ b/frameworks/innerkitsimpl/distributeddatafwk/include/inner_types.h @@ -23,6 +23,6 @@ enum class InnerStatus { DECREASE_REFCOUNT, ERROR, }; -} -} +} // namespace DistributedKv +} // namespace OHOS #endif diff --git a/frameworks/innerkitsimpl/distributeddatafwk/include/itypes_util.h b/frameworks/innerkitsimpl/distributeddatafwk/include/itypes_util.h index 1bca607e6..9c8ca5f97 100644 --- a/frameworks/innerkitsimpl/distributeddatafwk/include/itypes_util.h +++ b/frameworks/innerkitsimpl/distributeddatafwk/include/itypes_util.h @@ -170,6 +170,5 @@ private: template static std::list Convert2List(std::vector &&entries); }; -} +} // namespace OHOS::DistributedKv #endif - diff --git a/frameworks/innerkitsimpl/distributeddatafwk/src/device_status_change_listener_client.cpp b/frameworks/innerkitsimpl/distributeddatafwk/src/device_status_change_listener_client.cpp index 19e32019b..c59f94bb6 100644 --- a/frameworks/innerkitsimpl/distributeddatafwk/src/device_status_change_listener_client.cpp +++ b/frameworks/innerkitsimpl/distributeddatafwk/src/device_status_change_listener_client.cpp @@ -27,4 +27,4 @@ void DeviceStatusChangeListenerClient::OnChange(const DeviceInfo &results, const listener_->OnDeviceChanged(results, type); } } -} \ No newline at end of file +} // namespace OHOS::DistributedKv diff --git a/frameworks/innerkitsimpl/distributeddatafwk/src/idevice_status_change_listener_impl.cpp b/frameworks/innerkitsimpl/distributeddatafwk/src/idevice_status_change_listener_impl.cpp index 2bb53ec31..5e29fa91f 100644 --- a/frameworks/innerkitsimpl/distributeddatafwk/src/idevice_status_change_listener_impl.cpp +++ b/frameworks/innerkitsimpl/distributeddatafwk/src/idevice_status_change_listener_impl.cpp @@ -73,4 +73,4 @@ int DeviceStatusChangeListenerStub::OnRemoteRequest(uint32_t code, MessageParcel } } } // namespace DistributedKv -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/frameworks/innerkitsimpl/distributeddatafwk/src/itypes_util.cpp b/frameworks/innerkitsimpl/distributeddatafwk/src/itypes_util.cpp index 2f084d300..adab87f9d 100644 --- a/frameworks/innerkitsimpl/distributeddatafwk/src/itypes_util.cpp +++ b/frameworks/innerkitsimpl/distributeddatafwk/src/itypes_util.cpp @@ -431,5 +431,4 @@ bool ITypesUtil::WriteVector(Parcel &parcel, const std::vector &val, bool (Pa } return true; } -} - +} // namespace OHOS::DistributedKv diff --git a/frameworks/innerkitsimpl/distributeddatafwk/src/kvstore_death_recipient_impl.cpp b/frameworks/innerkitsimpl/distributeddatafwk/src/kvstore_death_recipient_impl.cpp index 2587be1e2..b9c4dd052 100644 --- a/frameworks/innerkitsimpl/distributeddatafwk/src/kvstore_death_recipient_impl.cpp +++ b/frameworks/innerkitsimpl/distributeddatafwk/src/kvstore_death_recipient_impl.cpp @@ -42,4 +42,4 @@ void KvStoreDeathRecipientImpl::OnRemoteDied() } } } // namespace DistributedKv -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/frameworks/innerkitsimpl/distributeddatafwk/src/kvstore_death_recipient_impl.h b/frameworks/innerkitsimpl/distributeddatafwk/src/kvstore_death_recipient_impl.h index a8deafec2..284a2149d 100644 --- a/frameworks/innerkitsimpl/distributeddatafwk/src/kvstore_death_recipient_impl.h +++ b/frameworks/innerkitsimpl/distributeddatafwk/src/kvstore_death_recipient_impl.h @@ -33,4 +33,4 @@ friend struct KvStoreDeathRecipientImplCompare; } // namespace DistributedKv } // namespace OHOS -#endif // KVSTORE_DEATH_RECIPIENT_IMPL_H \ No newline at end of file +#endif // KVSTORE_DEATH_RECIPIENT_IMPL_H diff --git a/frameworks/innerkitsimpl/distributeddatafwk/src/kvstore_resultset_client.cpp b/frameworks/innerkitsimpl/distributeddatafwk/src/kvstore_resultset_client.cpp index 61c4707aa..da5a26e72 100644 --- a/frameworks/innerkitsimpl/distributeddatafwk/src/kvstore_resultset_client.cpp +++ b/frameworks/innerkitsimpl/distributeddatafwk/src/kvstore_resultset_client.cpp @@ -110,4 +110,4 @@ sptr KvStoreResultSetClient::GetKvStoreResultSetProxy() const { return kvStoreResultSetProxy_; } -} // namespace OHOS::DistributedKv \ No newline at end of file +} // namespace OHOS::DistributedKv diff --git a/frameworks/innerkitsimpl/distributeddatafwk/src/kvstore_sync_callback_client.cpp b/frameworks/innerkitsimpl/distributeddatafwk/src/kvstore_sync_callback_client.cpp index 028362ba5..ee5cd80cf 100644 --- a/frameworks/innerkitsimpl/distributeddatafwk/src/kvstore_sync_callback_client.cpp +++ b/frameworks/innerkitsimpl/distributeddatafwk/src/kvstore_sync_callback_client.cpp @@ -50,4 +50,4 @@ void KvStoreSyncCallbackClient::DeleteSyncCallback(uint64_t sequenceId) syncCallbackInfo_.Erase(sequenceId); } } // namespace DistributedKv -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/frameworks/innerkitsimpl/distributeddatafwk/src/sync_observer.cpp b/frameworks/innerkitsimpl/distributeddatafwk/src/sync_observer.cpp index 7ea7c1f25..8b578e74a 100644 --- a/frameworks/innerkitsimpl/distributeddatafwk/src/sync_observer.cpp +++ b/frameworks/innerkitsimpl/distributeddatafwk/src/sync_observer.cpp @@ -47,4 +47,4 @@ void SyncObserver::SyncCompleted(const std::mapSyncCompleted(results); } } -} +} // namespace OHOS::DistributedKv diff --git a/frameworks/innerkitsimpl/distributeddatafwk/src/sync_observer.h b/frameworks/innerkitsimpl/distributeddatafwk/src/sync_observer.h index d077eefa2..cd2f2365d 100644 --- a/frameworks/innerkitsimpl/distributeddatafwk/src/sync_observer.h +++ b/frameworks/innerkitsimpl/distributeddatafwk/src/sync_observer.h @@ -40,5 +40,5 @@ private: std::recursive_mutex mutex_; std::vector> callbacks_; }; -} +} // namespace OHOS::DistributedKv #endif // DISTRIBUTEDDATAMGR_DATAMGR_SYNC_OBSERVER_H diff --git a/frameworks/innerkitsimpl/distributeddatafwk/test/unittest/blob_test.cpp b/frameworks/innerkitsimpl/distributeddatafwk/test/unittest/blob_test.cpp index dd3a46634..25d101b2e 100644 --- a/frameworks/innerkitsimpl/distributeddatafwk/test/unittest/blob_test.cpp +++ b/frameworks/innerkitsimpl/distributeddatafwk/test/unittest/blob_test.cpp @@ -248,4 +248,4 @@ HWTEST_F(BlobTest, Operator003, TestSize.Level0) EXPECT_EQ(blob1 == blob2, false); EXPECT_EQ(blob1.Empty(), true); EXPECT_EQ(blob2.ToString(), "1234"); -} \ No newline at end of file +} diff --git a/frameworks/innerkitsimpl/distributeddatafwk/test/unittest/distributed_kv_data_manager_encrypt_test.cpp b/frameworks/innerkitsimpl/distributeddatafwk/test/unittest/distributed_kv_data_manager_encrypt_test.cpp index 2129f49bb..59a80d3a1 100644 --- a/frameworks/innerkitsimpl/distributeddatafwk/test/unittest/distributed_kv_data_manager_encrypt_test.cpp +++ b/frameworks/innerkitsimpl/distributeddatafwk/test/unittest/distributed_kv_data_manager_encrypt_test.cpp @@ -129,4 +129,4 @@ HWTEST_F(DistributedKvDataManagerEncryptTest, kvstore_ddm_createEncryptedStore_0 EXPECT_EQ(value, valueRet) << "value and valueRet are not equal"; kvStorePtr->ReleaseKvStoreSnapshot(snapshot); -} \ No newline at end of file +} diff --git a/frameworks/innerkitsimpl/distributeddatafwk/test/unittest/local_subscribe_store_test.cpp b/frameworks/innerkitsimpl/distributeddatafwk/test/unittest/local_subscribe_store_test.cpp index 22ef5f8ee..cd79e1362 100644 --- a/frameworks/innerkitsimpl/distributeddatafwk/test/unittest/local_subscribe_store_test.cpp +++ b/frameworks/innerkitsimpl/distributeddatafwk/test/unittest/local_subscribe_store_test.cpp @@ -2342,4 +2342,3 @@ HWTEST_F(LocalSubscribeStoreTest, ChangeNotificationMarshalling001, TestSize.Lev EXPECT_EQ(changeOut->IsClear(), false); delete changeOut; } - diff --git a/frameworks/innerkitsimpl/distributeddatafwk/test/unittest/single_kvstore_client_test.cpp b/frameworks/innerkitsimpl/distributeddatafwk/test/unittest/single_kvstore_client_test.cpp index 846d227d7..7f6b8f7cc 100644 --- a/frameworks/innerkitsimpl/distributeddatafwk/test/unittest/single_kvstore_client_test.cpp +++ b/frameworks/innerkitsimpl/distributeddatafwk/test/unittest/single_kvstore_client_test.cpp @@ -165,7 +165,7 @@ void KvStoreSyncCallbackTestImpl::SyncCompleted(const std::map(); auto subStatus = singleKvStorePtr->SubscribeKvStore(SubscribeType::SUBSCRIBE_TYPE_ALL, observer); @@ -285,7 +285,7 @@ HWTEST_F(SingleKvStoreClientTest, Subscribe001 ,TestSize.Level1) * @tc.require: SR000DORPS AR000DPRQ7 AR000DDPRPL * @tc.author: hongbo */ -HWTEST_F(SingleKvStoreClientTest, SyncCallback001 ,TestSize.Level1) +HWTEST_F(SingleKvStoreClientTest, SyncCallback001, TestSize.Level1) { EXPECT_NE(singleKvStorePtr, nullptr) << "kvStorePtr is null."; @@ -313,7 +313,7 @@ HWTEST_F(SingleKvStoreClientTest, SyncCallback001 ,TestSize.Level1) * @tc.require: SR000DORPS AR000DPRQ7 AR000DDPRPL * @tc.author: hongbo */ -HWTEST_F(SingleKvStoreClientTest, RemoveDeviceData001 ,TestSize.Level1) +HWTEST_F(SingleKvStoreClientTest, RemoveDeviceData001, TestSize.Level1) { EXPECT_NE(singleKvStorePtr, nullptr) << "kvStorePtr is null."; @@ -338,7 +338,7 @@ HWTEST_F(SingleKvStoreClientTest, RemoveDeviceData001 ,TestSize.Level1) * @tc.require: SR000DORPS AR000DPRQ7 AR000DDPRPL * @tc.author: hongbo */ -HWTEST_F(SingleKvStoreClientTest, SyncData001 ,TestSize.Level1) +HWTEST_F(SingleKvStoreClientTest, SyncData001, TestSize.Level1) { EXPECT_NE(singleKvStorePtr, nullptr) << "kvStorePtr is null."; std::string deviceId = "no_exist_device_id"; @@ -354,7 +354,7 @@ HWTEST_F(SingleKvStoreClientTest, SyncData001 ,TestSize.Level1) * @tc.require: AR000DPSF1 * @tc.author: YangLeda */ -HWTEST_F(SingleKvStoreClientTest, TestSchemaStoreC001 ,TestSize.Level1) +HWTEST_F(SingleKvStoreClientTest, TestSchemaStoreC001, TestSize.Level1) { std::shared_ptr schemaSingleKvStorePtr; DistributedKvDataManager manager; @@ -384,7 +384,7 @@ HWTEST_F(SingleKvStoreClientTest, TestSchemaStoreC001 ,TestSize.Level1) * @tc.require: SR000DOGQE AR000DPUAN * @tc.author: wangtao */ -HWTEST_F(SingleKvStoreClientTest, SyncData002 ,TestSize.Level1) +HWTEST_F(SingleKvStoreClientTest, SyncData002, TestSize.Level1) { EXPECT_NE(singleKvStorePtr, nullptr) << "kvStorePtr is null."; std::string deviceId = "no_exist_device_id"; @@ -401,7 +401,7 @@ HWTEST_F(SingleKvStoreClientTest, SyncData002 ,TestSize.Level1) * @tc.require: SR000DOGQE AR000DPUAO * @tc.author: wangtao */ -HWTEST_F(SingleKvStoreClientTest, SetSync001 ,TestSize.Level1) +HWTEST_F(SingleKvStoreClientTest, SetSync001, TestSize.Level1) { EXPECT_NE(singleKvStorePtr, nullptr) << "kvStorePtr is null."; KvSyncParam syncParam{ 500 }; // 500ms @@ -420,7 +420,7 @@ HWTEST_F(SingleKvStoreClientTest, SetSync001 ,TestSize.Level1) * @tc.require: SR000DOGQE AR000DPUAO * @tc.author: wangtao */ -HWTEST_F(SingleKvStoreClientTest, SetSync002 ,TestSize.Level1) +HWTEST_F(SingleKvStoreClientTest, SetSync002, TestSize.Level1) { EXPECT_NE(singleKvStorePtr, nullptr) << "kvStorePtr is null."; KvSyncParam syncParam2{ 50 }; // 50ms @@ -1104,4 +1104,3 @@ HWTEST_F(SingleKvStoreClientTest, UnSubscribeWithQuery001, TestSize.Level1) auto unSubscribeStatus = singleKvStorePtr->UnsubscribeWithQuery(deviceIds, dataQuery); EXPECT_NE(unSubscribeStatus, Status::SUCCESS) << "sync device should not return success"; } - diff --git a/frameworks/innerkitsimpl/rdb/include/irdb_service.h b/frameworks/innerkitsimpl/rdb/include/irdb_service.h index e6b945411..86c6563b7 100644 --- a/frameworks/innerkitsimpl/rdb/include/irdb_service.h +++ b/frameworks/innerkitsimpl/rdb/include/irdb_service.h @@ -51,5 +51,5 @@ protected: virtual int32_t DoUnSubscribe(const RdbSyncerParam& param) = 0; }; -} +} // namespace OHOS::DistributedRdb #endif diff --git a/frameworks/innerkitsimpl/rdb/include/rdb_manager.h b/frameworks/innerkitsimpl/rdb/include/rdb_manager.h index ad02e41e6..a34dc828a 100644 --- a/frameworks/innerkitsimpl/rdb/include/rdb_manager.h +++ b/frameworks/innerkitsimpl/rdb/include/rdb_manager.h @@ -28,5 +28,5 @@ class RdbManager { public: static std::shared_ptr GetRdbService(const RdbSyncerParam& param); }; -} +} // namespace OHOS::DistributedRdb #endif diff --git a/frameworks/innerkitsimpl/rdb/include/rdb_notifier.h b/frameworks/innerkitsimpl/rdb/include/rdb_notifier.h index 81aa43373..7b9c8737a 100644 --- a/frameworks/innerkitsimpl/rdb/include/rdb_notifier.h +++ b/frameworks/innerkitsimpl/rdb/include/rdb_notifier.h @@ -79,5 +79,5 @@ private: RdbSyncCompleteNotifier completeNotifier_; RdbDataChangeNotifier changeNotifier_; }; -} +} // namespace OHOS::DistributedRdb #endif diff --git a/frameworks/innerkitsimpl/rdb/include/rdb_service.h b/frameworks/innerkitsimpl/rdb/include/rdb_service.h index b5dff6d33..968dd3c77 100644 --- a/frameworks/innerkitsimpl/rdb/include/rdb_service.h +++ b/frameworks/innerkitsimpl/rdb/include/rdb_service.h @@ -38,5 +38,5 @@ public: virtual int32_t UnSubscribe(const RdbSyncerParam& param, const SubscribeOption& option, RdbStoreObserver *observer) = 0; }; -} +} // namespace OHOS::DistributedRdb #endif diff --git a/frameworks/innerkitsimpl/rdb/include/rdb_types.h b/frameworks/innerkitsimpl/rdb/include/rdb_types.h index 6874093c0..6c3fce51c 100644 --- a/frameworks/innerkitsimpl/rdb/include/rdb_types.h +++ b/frameworks/innerkitsimpl/rdb/include/rdb_types.h @@ -102,5 +102,5 @@ public: struct DropOption { }; -} +} // namespace OHOS::DistributedRdb #endif diff --git a/frameworks/innerkitsimpl/rdb/src/rdb_manager.cpp b/frameworks/innerkitsimpl/rdb/src/rdb_manager.cpp index bf0fdb212..76bddfc3e 100644 --- a/frameworks/innerkitsimpl/rdb/src/rdb_manager.cpp +++ b/frameworks/innerkitsimpl/rdb/src/rdb_manager.cpp @@ -21,4 +21,4 @@ std::shared_ptr RdbManager::GetRdbService(const RdbSyncerParam& para { return RdbManagerImpl::GetInstance().GetRdbService(param); } -} \ No newline at end of file +} // namespace OHOS::DistributedRdb diff --git a/frameworks/innerkitsimpl/rdb/src/rdb_manager_impl.cpp b/frameworks/innerkitsimpl/rdb/src/rdb_manager_impl.cpp index 1be079979..45948b6f0 100644 --- a/frameworks/innerkitsimpl/rdb/src/rdb_manager_impl.cpp +++ b/frameworks/innerkitsimpl/rdb/src/rdb_manager_impl.cpp @@ -145,4 +145,4 @@ void RdbManagerImpl::ResetServiceHandle() distributedDataMgr_ = nullptr; rdbService_ = nullptr; } -} +} // namespace OHOS::DistributedRdb diff --git a/frameworks/innerkitsimpl/rdb/src/rdb_manager_impl.h b/frameworks/innerkitsimpl/rdb/src/rdb_manager_impl.h index 5285e1a96..dc8ae2fe4 100644 --- a/frameworks/innerkitsimpl/rdb/src/rdb_manager_impl.h +++ b/frameworks/innerkitsimpl/rdb/src/rdb_manager_impl.h @@ -71,5 +71,5 @@ private: std::shared_ptr rdbService_; std::string bundleName_; }; -} +} // namespace OHOS::DistributedRdb #endif diff --git a/frameworks/innerkitsimpl/rdb/src/rdb_notifier.cpp b/frameworks/innerkitsimpl/rdb/src/rdb_notifier.cpp index dba5a48a5..dbabe9289 100644 --- a/frameworks/innerkitsimpl/rdb/src/rdb_notifier.cpp +++ b/frameworks/innerkitsimpl/rdb/src/rdb_notifier.cpp @@ -164,4 +164,4 @@ int32_t RdbNotifierStub::OnChange(const std::string& storeName, const std::vecto } return RDB_OK; } -} \ No newline at end of file +} // namespace OHOS::DistributedRdb diff --git a/frameworks/innerkitsimpl/rdb/src/rdb_service_proxy.cpp b/frameworks/innerkitsimpl/rdb/src/rdb_service_proxy.cpp index 899882932..1b5ab5bb3 100644 --- a/frameworks/innerkitsimpl/rdb/src/rdb_service_proxy.cpp +++ b/frameworks/innerkitsimpl/rdb/src/rdb_service_proxy.cpp @@ -375,4 +375,4 @@ void RdbServiceProxy::ImportObservers(ObserverMap &observers) return false; }); } -} \ No newline at end of file +} // namespace OHOS::DistributedRdb diff --git a/frameworks/innerkitsimpl/rdb/src/rdb_service_proxy.h b/frameworks/innerkitsimpl/rdb/src/rdb_service_proxy.h index 468fb5a13..2745d32bc 100644 --- a/frameworks/innerkitsimpl/rdb/src/rdb_service_proxy.h +++ b/frameworks/innerkitsimpl/rdb/src/rdb_service_proxy.h @@ -83,5 +83,5 @@ private: static inline BrokerDelegator delegator_; }; -} +} // namespace OHOS::DistributedRdb #endif diff --git a/frameworks/jskitsimpl/distributeddata/include/js_const_properties.h b/frameworks/jskitsimpl/distributeddata/include/js_const_properties.h index 68e31db76..367261d95 100644 --- a/frameworks/jskitsimpl/distributeddata/include/js_const_properties.h +++ b/frameworks/jskitsimpl/distributeddata/include/js_const_properties.h @@ -22,6 +22,6 @@ namespace OHOS::DistributedData { napi_status InitConstProperties(napi_env env, napi_value exports); -} +} // namespace OHOS::DistributedData #endif // OHOS_JS_CONST_PROPERTIES_H diff --git a/frameworks/jskitsimpl/distributeddata/include/js_device_kv_store.h b/frameworks/jskitsimpl/distributeddata/include/js_device_kv_store.h index aa016aeb9..649c79cf2 100644 --- a/frameworks/jskitsimpl/distributeddata/include/js_device_kv_store.h +++ b/frameworks/jskitsimpl/distributeddata/include/js_device_kv_store.h @@ -21,7 +21,7 @@ namespace OHOS::DistributedData { class JsDeviceKVStore : public JsKVStore { public: - JsDeviceKVStore(const std::string& storeId); + explicit JsDeviceKVStore(const std::string& storeId); ~JsDeviceKVStore() = default; static napi_value Constructor(napi_env env); @@ -39,5 +39,5 @@ private: static napi_value OnEvent(napi_env env, napi_callback_info info); static napi_value OffEvent(napi_env env, napi_callback_info info); }; -} +} // namespace OHOS::DistributedData #endif // OHOS_DEVICE_KV_STORE_H diff --git a/frameworks/jskitsimpl/distributeddata/include/js_field_node.h b/frameworks/jskitsimpl/distributeddata/include/js_field_node.h index cbe69aea7..dc016569c 100644 --- a/frameworks/jskitsimpl/distributeddata/include/js_field_node.h +++ b/frameworks/jskitsimpl/distributeddata/include/js_field_node.h @@ -23,7 +23,7 @@ namespace OHOS::DistributedData { class JsFieldNode { public: using json = nlohmann::json; - JsFieldNode(const std::string& fName); + explicit JsFieldNode(const std::string& fName); ~JsFieldNode() = default; std::string GetFieldName(); @@ -58,5 +58,5 @@ private: bool isWithDefaultValue = false; bool isNullable = false; }; -} +} // namespace OHOS::DistributedData #endif // OHOS_FIELD_NODE_H diff --git a/frameworks/jskitsimpl/distributeddata/include/js_kv_manager.h b/frameworks/jskitsimpl/distributeddata/include/js_kv_manager.h index 0710af836..a13417cec 100644 --- a/frameworks/jskitsimpl/distributeddata/include/js_kv_manager.h +++ b/frameworks/jskitsimpl/distributeddata/include/js_kv_manager.h @@ -55,5 +55,5 @@ private: std::list> deathRecipient_ {}; std::shared_ptr uvQueue_; }; -} +} // namespace OHOS::DistributedData #endif // OHOS_KV_MANAGER_H diff --git a/frameworks/jskitsimpl/distributeddata/include/js_kv_store.h b/frameworks/jskitsimpl/distributeddata/include/js_kv_store.h index 545a0f6bc..9560698ad 100644 --- a/frameworks/jskitsimpl/distributeddata/include/js_kv_store.h +++ b/frameworks/jskitsimpl/distributeddata/include/js_kv_store.h @@ -35,7 +35,7 @@ enum { */ class JsKVStore { public: - JsKVStore(const std::string& storeId); + explicit JsKVStore(const std::string& storeId); virtual ~JsKVStore(); void SetNative(std::shared_ptr& kvStore); diff --git a/frameworks/jskitsimpl/distributeddata/include/js_kv_store_resultset.h b/frameworks/jskitsimpl/distributeddata/include/js_kv_store_resultset.h index 19d042a49..e23fe9784 100644 --- a/frameworks/jskitsimpl/distributeddata/include/js_kv_store_resultset.h +++ b/frameworks/jskitsimpl/distributeddata/include/js_kv_store_resultset.h @@ -46,6 +46,5 @@ private: std::shared_ptr resultSet_ = nullptr; }; -} +} // namespace OHOS::DistributedData #endif // OHOS_KV_STORE_RESELTSET_H - diff --git a/frameworks/jskitsimpl/distributeddata/include/js_observer.h b/frameworks/jskitsimpl/distributeddata/include/js_observer.h index 98cb0794f..10c1028bb 100644 --- a/frameworks/jskitsimpl/distributeddata/include/js_observer.h +++ b/frameworks/jskitsimpl/distributeddata/include/js_observer.h @@ -30,5 +30,5 @@ private: std::shared_ptr uvQueue_; napi_ref callback_; }; -} -#endif // OHOS_JS_OBSERVER_H \ No newline at end of file +} // namespace OHOS::DistributedData +#endif // OHOS_JS_OBSERVER_H diff --git a/frameworks/jskitsimpl/distributeddata/include/js_query.h b/frameworks/jskitsimpl/distributeddata/include/js_query.h index 6600c1370..b4f273726 100644 --- a/frameworks/jskitsimpl/distributeddata/include/js_query.h +++ b/frameworks/jskitsimpl/distributeddata/include/js_query.h @@ -62,5 +62,5 @@ private: private: DistributedKv::DataQuery query_; }; -} +} // namespace OHOS::DistributedData #endif // OHOS_QUERY_H diff --git a/frameworks/jskitsimpl/distributeddata/include/js_schema.h b/frameworks/jskitsimpl/distributeddata/include/js_schema.h index 2396bf8ab..3099924c6 100644 --- a/frameworks/jskitsimpl/distributeddata/include/js_schema.h +++ b/frameworks/jskitsimpl/distributeddata/include/js_schema.h @@ -23,7 +23,7 @@ namespace OHOS::DistributedData { class JsSchema { public: - JsSchema(napi_env env); + explicit JsSchema(napi_env env); ~JsSchema(); static napi_value Constructor(napi_env env); @@ -59,5 +59,5 @@ private: uint32_t mode = SCHEMA_MODE_SLOPPY; uint32_t skip = 0; }; -} +} // namespace OHOS::DistributedData #endif // OHOS_SCHEMA_H diff --git a/frameworks/jskitsimpl/distributeddata/include/js_single_kv_store.h b/frameworks/jskitsimpl/distributeddata/include/js_single_kv_store.h index cff7d9b9e..979c535e4 100644 --- a/frameworks/jskitsimpl/distributeddata/include/js_single_kv_store.h +++ b/frameworks/jskitsimpl/distributeddata/include/js_single_kv_store.h @@ -21,7 +21,7 @@ namespace OHOS::DistributedData { class JsSingleKVStore : public JsKVStore { public: - JsSingleKVStore(const std::string& storeId); + explicit JsSingleKVStore(const std::string& storeId); ~JsSingleKVStore() = default; static napi_value Constructor(napi_env env); @@ -40,5 +40,5 @@ private: static napi_value SetSyncParam(napi_env env, napi_callback_info info); static napi_value GetSecurityLevel(napi_env env, napi_callback_info info); }; -} +} // namespace OHOS::DistributedData #endif // OHOS_SINGLE_KV_STORE_H diff --git a/frameworks/jskitsimpl/distributeddata/include/js_util.h b/frameworks/jskitsimpl/distributeddata/include/js_util.h index e1c593439..1c4489424 100644 --- a/frameworks/jskitsimpl/distributeddata/include/js_util.h +++ b/frameworks/jskitsimpl/distributeddata/include/js_util.h @@ -173,5 +173,5 @@ private: TUPLE_SIZE }; }; -} +} // namespace OHOS::DistributedData #endif // OHOS_JS_UTIL_H diff --git a/frameworks/jskitsimpl/distributeddata/include/napi_queue.h b/frameworks/jskitsimpl/distributeddata/include/napi_queue.h index c51509aac..f401df12d 100644 --- a/frameworks/jskitsimpl/distributeddata/include/napi_queue.h +++ b/frameworks/jskitsimpl/distributeddata/include/napi_queue.h @@ -112,5 +112,5 @@ private: }; static void GenerateOutput(ContextBase* ctxt); }; -} +} // namespace OHOS::DistributedData #endif // OHOS_NAPI_QUEUE_H diff --git a/frameworks/jskitsimpl/distributeddata/include/uv_queue.h b/frameworks/jskitsimpl/distributeddata/include/uv_queue.h index 16c1f2230..659cf065c 100644 --- a/frameworks/jskitsimpl/distributeddata/include/uv_queue.h +++ b/frameworks/jskitsimpl/distributeddata/include/uv_queue.h @@ -39,5 +39,5 @@ private: napi_env env_ = nullptr; uv_loop_s* loop_ = nullptr; }; -} +} // namespace OHOS::DistributedData #endif // OHOS_UV_QUEUE_H diff --git a/frameworks/jskitsimpl/distributeddata/src/js_const_properties.cpp b/frameworks/jskitsimpl/distributeddata/src/js_const_properties.cpp index c559973e9..fab7bb3b2 100644 --- a/frameworks/jskitsimpl/distributeddata/src/js_const_properties.cpp +++ b/frameworks/jskitsimpl/distributeddata/src/js_const_properties.cpp @@ -140,4 +140,4 @@ napi_status InitConstProperties(napi_env env, napi_value exports) return napi_define_properties(env, exports, count, properties); } -} \ No newline at end of file +} // namespace OHOS::DistributedData diff --git a/frameworks/jskitsimpl/distributeddata/src/js_field_node.cpp b/frameworks/jskitsimpl/distributeddata/src/js_field_node.cpp index c18072280..53dd7b4ed 100644 --- a/frameworks/jskitsimpl/distributeddata/src/js_field_node.cpp +++ b/frameworks/jskitsimpl/distributeddata/src/js_field_node.cpp @@ -274,4 +274,4 @@ std::string JsFieldNode::Dump() }; return jsNode.dump(); } -} +} // namespace OHOS::DistributedData diff --git a/frameworks/jskitsimpl/distributeddata/src/js_kv_manager.cpp b/frameworks/jskitsimpl/distributeddata/src/js_kv_manager.cpp index 8759ac81d..27488d96d 100644 --- a/frameworks/jskitsimpl/distributeddata/src/js_kv_manager.cpp +++ b/frameworks/jskitsimpl/distributeddata/src/js_kv_manager.cpp @@ -373,4 +373,4 @@ void JsKVManager::DeathRecipient::OnRemoteDied() { AsyncCall(); } -} +} // namespace OHOS::DistributedData diff --git a/frameworks/jskitsimpl/distributeddata/src/js_kv_store_resultset.cpp b/frameworks/jskitsimpl/distributeddata/src/js_kv_store_resultset.cpp index 4605d44c7..b50278c6f 100644 --- a/frameworks/jskitsimpl/distributeddata/src/js_kv_store_resultset.cpp +++ b/frameworks/jskitsimpl/distributeddata/src/js_kv_store_resultset.cpp @@ -271,4 +271,4 @@ napi_value JsKVStoreResultSet::GetEntry(napi_env env, napi_callback_info info) / NAPI_ASSERT(env, ctxt->status == napi_ok, "GetEntry failed!"); return ctxt->output; } -} // \ No newline at end of file +} // namespace OHOS::DistributedData diff --git a/frameworks/jskitsimpl/distributeddata/src/js_observer.cpp b/frameworks/jskitsimpl/distributeddata/src/js_observer.cpp index 394abf37d..6407e8a95 100644 --- a/frameworks/jskitsimpl/distributeddata/src/js_observer.cpp +++ b/frameworks/jskitsimpl/distributeddata/src/js_observer.cpp @@ -57,4 +57,4 @@ void JSObserver::AsyncCall(UvQueue::NapiArgsGenerator genArgs) return callback; }, genArgs); } -} \ No newline at end of file +} // namespace OHOS::DistributedData diff --git a/frameworks/jskitsimpl/distributeddata/src/js_query.cpp b/frameworks/jskitsimpl/distributeddata/src/js_query.cpp index 7f59047ed..621f16301 100644 --- a/frameworks/jskitsimpl/distributeddata/src/js_query.cpp +++ b/frameworks/jskitsimpl/distributeddata/src/js_query.cpp @@ -664,4 +664,4 @@ napi_value JsQuery::GetSqlLike(napi_env env, napi_callback_info info) JSUtil::SetValue(env, query.ToString(), ctxt->output); return ctxt->output; } -} // \ No newline at end of file +} // namespace OHOS::DistributedData diff --git a/frameworks/jskitsimpl/distributeddata/src/js_schema.cpp b/frameworks/jskitsimpl/distributeddata/src/js_schema.cpp index 5a457bb06..9e50c95d5 100644 --- a/frameworks/jskitsimpl/distributeddata/src/js_schema.cpp +++ b/frameworks/jskitsimpl/distributeddata/src/js_schema.cpp @@ -235,4 +235,4 @@ std::string JsSchema::Dump() }; return js.dump(); } -} +} // namespace OHOS::DistributedData diff --git a/frameworks/jskitsimpl/distributeddata/src/js_util.cpp b/frameworks/jskitsimpl/distributeddata/src/js_util.cpp index 30addf604..22da1bbd2 100644 --- a/frameworks/jskitsimpl/distributeddata/src/js_util.cpp +++ b/frameworks/jskitsimpl/distributeddata/src/js_util.cpp @@ -737,7 +737,7 @@ napi_status JSUtil::GetValue(napi_env env, napi_value in, std::list& in, napi_value& out) { - ZLOGD("napi_value <- std::list %{public}u", static_cast(in.size())); + ZLOGD("napi_value <- std::list %{public}d", static_cast(in.size())); napi_status status = napi_create_array_with_length(env, in.size(), &out); CHECK_RETURN(status == napi_ok, "create array failed!", status); int index = 0; @@ -777,7 +777,7 @@ napi_status JSUtil::GetValue(napi_env env, napi_value in, std::vector& in, napi_value& out) { - ZLOGD("napi_value <- std::vector %{public}u", static_cast(in.size())); + ZLOGD("napi_value <- std::vector %{public}d", static_cast(in.size())); napi_status status = napi_create_array_with_length(env, in.size(), &out); CHECK_RETURN(status == napi_ok, "create array failed!", status); int index = 0; @@ -818,7 +818,7 @@ napi_status JSUtil::GetValue(napi_env env, napi_value in, std::vector& in, napi_value& out) { - ZLOGD("napi_value <- std::vector %{public}u", static_cast(in.size())); + ZLOGD("napi_value <- std::vector %{public}d", static_cast(in.size())); napi_status status = napi_create_array_with_length(env, in.size(), &out); CHECK_RETURN((status == napi_ok), "create_array failed!", status); int index = 0; @@ -995,4 +995,4 @@ bool JSUtil::Equals(napi_env env, napi_value value, napi_ref copy) napi_strict_equals(env, value, copyValue, &isEquals); return isEquals; } -} // OHOS::DistributedData +} // namespace OHOS::DistributedData diff --git a/frameworks/jskitsimpl/distributeddata/src/uv_queue.cpp b/frameworks/jskitsimpl/distributeddata/src/uv_queue.cpp index 8a58d08c0..a41eb3857 100644 --- a/frameworks/jskitsimpl/distributeddata/src/uv_queue.cpp +++ b/frameworks/jskitsimpl/distributeddata/src/uv_queue.cpp @@ -79,4 +79,4 @@ napi_env UvQueue::GetEnv() { return env_; } -} +} // namespace OHOS::DistributedData diff --git a/interfaces/innerkits/distributeddata/include/single_kvstore.h b/interfaces/innerkits/distributeddata/include/single_kvstore.h index e816575c3..20b7dd86d 100644 --- a/interfaces/innerkits/distributeddata/include/single_kvstore.h +++ b/interfaces/innerkits/distributeddata/include/single_kvstore.h @@ -218,6 +218,6 @@ protected: // Status of this control operation. KVSTORE_API virtual Status Control(KvControlCmd cmd, const KvParam &inputParam, KvParam &output) = 0; }; -} // namespace AppDistributedKv +} // namespace DistributedKv } // namespace OHOS #endif // SINGLE_KV_STORE_H diff --git a/services/distributeddataservice/adapter/autils/src/directory_utils.cpp b/services/distributeddataservice/adapter/autils/src/directory_utils.cpp index 333a4b175..d0d76828f 100644 --- a/services/distributeddataservice/adapter/autils/src/directory_utils.cpp +++ b/services/distributeddataservice/adapter/autils/src/directory_utils.cpp @@ -161,4 +161,4 @@ std::string DirectoryUtils::IncludeDelimiterAtPathTail(const std::string &path) return path; } } // namespace DistributedKv -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/services/distributeddataservice/adapter/autils/test/unittest/kv_scheduler_test.cpp b/services/distributeddataservice/adapter/autils/test/unittest/kv_scheduler_test.cpp index 6b80cd333..359ffff85 100644 --- a/services/distributeddataservice/adapter/autils/test/unittest/kv_scheduler_test.cpp +++ b/services/distributeddataservice/adapter/autils/test/unittest/kv_scheduler_test.cpp @@ -106,4 +106,4 @@ HWTEST_F(KvSchedulerTest, KvSchedulerTest003, TestSize.Level1) }); std::this_thread::sleep_for(std::chrono::seconds(5)); EXPECT_EQ(a, 3) << "KvSchedulerTest KvSchedulerTest003 failed"; -} \ No newline at end of file +} diff --git a/services/distributeddataservice/adapter/autils/test/unittest/kv_store_thread_pool_test.cpp b/services/distributeddataservice/adapter/autils/test/unittest/kv_store_thread_pool_test.cpp index 24a6e7af1..221a790f2 100644 --- a/services/distributeddataservice/adapter/autils/test/unittest/kv_store_thread_pool_test.cpp +++ b/services/distributeddataservice/adapter/autils/test/unittest/kv_store_thread_pool_test.cpp @@ -127,4 +127,4 @@ HWTEST_F(KvStoreThreadPoolTest, TestApplyTask003, TestSize.Level1) EXPECT_EQ(var, 0); pool->Stop(); EXPECT_EQ(var, 8); -} \ No newline at end of file +} diff --git a/services/distributeddataservice/adapter/broadcaster/src/broadcast_sender.cpp b/services/distributeddataservice/adapter/broadcaster/src/broadcast_sender.cpp index e350d933d..095ba4b31 100644 --- a/services/distributeddataservice/adapter/broadcaster/src/broadcast_sender.cpp +++ b/services/distributeddataservice/adapter/broadcaster/src/broadcast_sender.cpp @@ -30,4 +30,4 @@ std::shared_ptr BroadcastSender::GetInstance() } return instance_; } -} +} // namespace OHOS::DistributedKv diff --git a/services/distributeddataservice/adapter/broadcaster/src/broadcast_sender_impl.cpp b/services/distributeddataservice/adapter/broadcaster/src/broadcast_sender_impl.cpp index b3fe7cdb2..f454f7aec 100644 --- a/services/distributeddataservice/adapter/broadcaster/src/broadcast_sender_impl.cpp +++ b/services/distributeddataservice/adapter/broadcaster/src/broadcast_sender_impl.cpp @@ -60,4 +60,4 @@ void BroadcastSenderImpl::SendEvent(const EventParams ¶ms) CommonEventManager::UnSubscribeCommonEvent(subscriberPtr); ZLOGI("SendEvent result:%{public}d.", result); } -} +} // namespace OHOS::DistributedKv diff --git a/services/distributeddataservice/adapter/broadcaster/src/broadcast_sender_impl.h b/services/distributeddataservice/adapter/broadcaster/src/broadcast_sender_impl.h index 10e07b6bb..5365396f6 100644 --- a/services/distributeddataservice/adapter/broadcaster/src/broadcast_sender_impl.h +++ b/services/distributeddataservice/adapter/broadcaster/src/broadcast_sender_impl.h @@ -26,5 +26,5 @@ private: static const inline std::string ACTION_NAME = "DistributedDataMgrStarter"; static const inline std::string PKG_NAME = "pkgName"; }; -} +} // namespace OHOS::DistributedKv #endif // BROADCAST_SENDER_IMPL_H diff --git a/services/distributeddataservice/adapter/communicator/src/data_buffer.cpp b/services/distributeddataservice/adapter/communicator/src/data_buffer.cpp index d15638598..7f4060c89 100644 --- a/services/distributeddataservice/adapter/communicator/src/data_buffer.cpp +++ b/services/distributeddataservice/adapter/communicator/src/data_buffer.cpp @@ -72,4 +72,4 @@ size_t DataBuffer::GetBufUsed() const return used_; } } // namespace AppDistributedKv -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/services/distributeddataservice/adapter/communicator/src/data_buffer.h b/services/distributeddataservice/adapter/communicator/src/data_buffer.h index de86a6f92..1a7627c10 100644 --- a/services/distributeddataservice/adapter/communicator/src/data_buffer.h +++ b/services/distributeddataservice/adapter/communicator/src/data_buffer.h @@ -68,6 +68,6 @@ union Head { HeaderInfo headerInfo; uint8_t headArray[DataBuffer::HEADER_LEN]; } __attribute__((packed)); -} -} +} // namespace AppDistributedKv +} // namespace OHOS #endif // DISTRIBUTEDDATAMGR_DATA_BUFFER_H diff --git a/services/distributeddataservice/adapter/communicator/src/softbus_adapter.h b/services/distributeddataservice/adapter/communicator/src/softbus_adapter.h index a8ec66db2..149dccf8d 100644 --- a/services/distributeddataservice/adapter/communicator/src/softbus_adapter.h +++ b/services/distributeddataservice/adapter/communicator/src/softbus_adapter.h @@ -156,4 +156,4 @@ private: }; } // namespace AppDistributedKv } // namespace OHOS -#endif /* DISTRIBUTEDDATAFWK_SRC_SOFTBUS_ADAPTER_H */ \ No newline at end of file +#endif /* DISTRIBUTEDDATAFWK_SRC_SOFTBUS_ADAPTER_H */ diff --git a/services/distributeddataservice/adapter/dfx/src/dds_trace.cpp b/services/distributeddataservice/adapter/dfx/src/dds_trace.cpp index bf8b93a4d..9e376a025 100644 --- a/services/distributeddataservice/adapter/dfx/src/dds_trace.cpp +++ b/services/distributeddataservice/adapter/dfx/src/dds_trace.cpp @@ -109,5 +109,5 @@ bool DdsTrace::SetBytraceEnable() ZLOGD("success, current tag is true"); return true; } -} // namespace OHOS } // namespace DistributedKv +} // namespace OHOS diff --git a/services/distributeddataservice/adapter/dfx/src/fault/communication_fault_impl.cpp b/services/distributeddataservice/adapter/dfx/src/fault/communication_fault_impl.cpp index 3e945cf7f..d98dc5d88 100644 --- a/services/distributeddataservice/adapter/dfx/src/fault/communication_fault_impl.cpp +++ b/services/distributeddataservice/adapter/dfx/src/fault/communication_fault_impl.cpp @@ -23,4 +23,4 @@ ReportStatus CommunicationFaultImpl::Report(const FaultMsg &msg) return ReportStatus::SUCCESS; } } // namespace DistributedKv -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/services/distributeddataservice/adapter/dfx/src/fault/runtime_fault_impl.cpp b/services/distributeddataservice/adapter/dfx/src/fault/runtime_fault_impl.cpp index d58aa2509..115adf509 100644 --- a/services/distributeddataservice/adapter/dfx/src/fault/runtime_fault_impl.cpp +++ b/services/distributeddataservice/adapter/dfx/src/fault/runtime_fault_impl.cpp @@ -23,4 +23,4 @@ ReportStatus RuntimeFaultImpl::Report(const FaultMsg &msg) return ReportStatus::SUCCESS; } } // namespace DistributedKv -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/services/distributeddataservice/adapter/dfx/src/fault/service_fault_impl.cpp b/services/distributeddataservice/adapter/dfx/src/fault/service_fault_impl.cpp index 10a4c61d9..8ab53e982 100644 --- a/services/distributeddataservice/adapter/dfx/src/fault/service_fault_impl.cpp +++ b/services/distributeddataservice/adapter/dfx/src/fault/service_fault_impl.cpp @@ -23,4 +23,4 @@ ReportStatus ServiceFaultImpl::Report(const OHOS::DistributedKv::FaultMsg &msg) return ReportStatus::SUCCESS; } } // namespace DistributedKv -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/services/distributeddataservice/adapter/dfx/src/reporter.cpp b/services/distributeddataservice/adapter/dfx/src/reporter.cpp index 1b26eff3c..2258777ee 100644 --- a/services/distributeddataservice/adapter/dfx/src/reporter.cpp +++ b/services/distributeddataservice/adapter/dfx/src/reporter.cpp @@ -80,4 +80,4 @@ StatisticReporter* Reporter::ApiPerformanceStatistic() return &apiPerformanceStat; } } // namespace DistributedKv -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/services/distributeddataservice/adapter/dfx/src/statistic/statistic_reporter.cpp b/services/distributeddataservice/adapter/dfx/src/statistic/statistic_reporter.cpp index 70caebd36..4b71247b7 100644 --- a/services/distributeddataservice/adapter/dfx/src/statistic/statistic_reporter.cpp +++ b/services/distributeddataservice/adapter/dfx/src/statistic/statistic_reporter.cpp @@ -18,4 +18,4 @@ namespace OHOS { namespace DistributedKv { } // namespace DistributedKv -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/services/distributeddataservice/adapter/dfx/src/statistic/traffic_statistic_impl.cpp b/services/distributeddataservice/adapter/dfx/src/statistic/traffic_statistic_impl.cpp index 7907a5662..93a410509 100644 --- a/services/distributeddataservice/adapter/dfx/src/statistic/traffic_statistic_impl.cpp +++ b/services/distributeddataservice/adapter/dfx/src/statistic/traffic_statistic_impl.cpp @@ -23,4 +23,4 @@ ReportStatus TrafficStatisticImpl::Report(const TrafficStat &stat) return ReportStatus::SUCCESS; } } // namespace DistributedKv -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/services/distributeddataservice/adapter/dfx/src/statistic/visit_statistic_impl.cpp b/services/distributeddataservice/adapter/dfx/src/statistic/visit_statistic_impl.cpp index 584464522..603f9fb30 100644 --- a/services/distributeddataservice/adapter/dfx/src/statistic/visit_statistic_impl.cpp +++ b/services/distributeddataservice/adapter/dfx/src/statistic/visit_statistic_impl.cpp @@ -23,4 +23,4 @@ ReportStatus VisitStatisticImpl::Report(const VisitStat &stat) return ReportStatus::SUCCESS; } } // namespace DistributedKv -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/services/distributeddataservice/adapter/dfx/test/unittest/distributeddata_dfx_mst_test.cpp b/services/distributeddataservice/adapter/dfx/test/unittest/distributeddata_dfx_mst_test.cpp index 4c08dae0f..071da5f53 100644 --- a/services/distributeddataservice/adapter/dfx/test/unittest/distributeddata_dfx_mst_test.cpp +++ b/services/distributeddataservice/adapter/dfx/test/unittest/distributeddata_dfx_mst_test.cpp @@ -54,7 +54,7 @@ HWTEST_F(DistributedataDfxMSTTest, Dfx001, TestSize.Level0) */ auto comFault = Reporter::GetInstance()->CommunicationFault(); EXPECT_NE(nullptr, comFault); - struct FaultMsg msg{.faultType= FaultType::SERVICE_FAULT, .moduleName = "comm", .interfaceName = "sendData", + struct FaultMsg msg{.faultType = FaultType::SERVICE_FAULT, .moduleName = "comm", .interfaceName = "sendData", .errorType = Fault::CF_CREATE_SESSION}; auto repStatus = comFault->Report(msg); EXPECT_TRUE(repStatus == ReportStatus::SUCCESS); diff --git a/services/distributeddataservice/adapter/dfx/test/unittest/distributeddata_dfx_ut_test.cpp b/services/distributeddataservice/adapter/dfx/test/unittest/distributeddata_dfx_ut_test.cpp index fe6d99095..9fc383172 100644 --- a/services/distributeddataservice/adapter/dfx/test/unittest/distributeddata_dfx_ut_test.cpp +++ b/services/distributeddataservice/adapter/dfx/test/unittest/distributeddata_dfx_ut_test.cpp @@ -62,7 +62,7 @@ HWTEST_F(DistributedataDfxUTTest, Dfx001, TestSize.Level0) */ auto comFault = Reporter::GetInstance()->CommunicationFault(); EXPECT_NE(nullptr, comFault); - struct FaultMsg msg{.faultType= FaultType::SERVICE_FAULT, .moduleName = "comm", .interfaceName = "sendData", + struct FaultMsg msg{.faultType = FaultType::SERVICE_FAULT, .moduleName = "comm", .interfaceName = "sendData", .errorType = Fault::CF_CREATE_SESSION}; auto repStatus = comFault->Report(msg); EXPECT_TRUE(repStatus == ReportStatus::SUCCESS); @@ -97,7 +97,7 @@ HWTEST_F(DistributedataDfxUTTest, Dfx002, TestSize.Level0) */ auto dbFault = Reporter::GetInstance()->DatabaseFault(); EXPECT_NE(nullptr, dbFault); - struct FaultMsg msg{.faultType= FaultType::SERVICE_FAULT, .moduleName = "database", + struct FaultMsg msg{.faultType = FaultType::SERVICE_FAULT, .moduleName = "database", .interfaceName = "getKvStore", .errorType = Fault::DF_DB_DAMAGE}; auto repStatus = dbFault->Report(msg); diff --git a/services/distributeddataservice/adapter/include/autils/constant.h b/services/distributeddataservice/adapter/include/autils/constant.h index efeaa381d..1d9748940 100644 --- a/services/distributeddataservice/adapter/include/autils/constant.h +++ b/services/distributeddataservice/adapter/include/autils/constant.h @@ -182,4 +182,3 @@ T Constant::TrimCopy(T s) } // namespace DistributedKv } // namespace OHOS #endif // KV_DATASERVICE_CONSTANT_H - diff --git a/services/distributeddataservice/adapter/include/autils/directory_utils.h b/services/distributeddataservice/adapter/include/autils/directory_utils.h index ced19ca79..67ba84dda 100644 --- a/services/distributeddataservice/adapter/include/autils/directory_utils.h +++ b/services/distributeddataservice/adapter/include/autils/directory_utils.h @@ -47,4 +47,4 @@ private: }; } // namespace DistributedKv } // namespace OHOS -#endif // DIRECTORY_UTILS_H \ No newline at end of file +#endif // DIRECTORY_UTILS_H diff --git a/services/distributeddataservice/adapter/include/autils/kv_scheduler.h b/services/distributeddataservice/adapter/include/autils/kv_scheduler.h index cd9186efa..7977061d4 100644 --- a/services/distributeddataservice/adapter/include/autils/kv_scheduler.h +++ b/services/distributeddataservice/adapter/include/autils/kv_scheduler.h @@ -51,5 +51,5 @@ private: std::unique_ptr thread_; std::condition_variable condition_; }; -} // namespace DistributedKv::OHOS +} // namespace OHOS::DistributedKv #endif // KV_SCHEDULER_H diff --git a/services/distributeddataservice/adapter/include/autils/platform_specific.h b/services/distributeddataservice/adapter/include/autils/platform_specific.h index c98b734b4..6634dbf40 100644 --- a/services/distributeddataservice/adapter/include/autils/platform_specific.h +++ b/services/distributeddataservice/adapter/include/autils/platform_specific.h @@ -22,4 +22,4 @@ #define OS_OHOS #endif -#endif // PLATFORM_SPECIFIC_H \ No newline at end of file +#endif // PLATFORM_SPECIFIC_H diff --git a/services/distributeddataservice/adapter/include/autils/time_utils.h b/services/distributeddataservice/adapter/include/autils/time_utils.h index bfa87ba77..a67f12f7c 100644 --- a/services/distributeddataservice/adapter/include/autils/time_utils.h +++ b/services/distributeddataservice/adapter/include/autils/time_utils.h @@ -35,4 +35,4 @@ public: }; } // namespace DistributedKv } // namespace OHOS -#endif \ No newline at end of file +#endif diff --git a/services/distributeddataservice/adapter/include/broadcaster/broadcast_sender.h b/services/distributeddataservice/adapter/include/broadcaster/broadcast_sender.h index 4e3b39e2f..a9e6f9948 100644 --- a/services/distributeddataservice/adapter/include/broadcaster/broadcast_sender.h +++ b/services/distributeddataservice/adapter/include/broadcaster/broadcast_sender.h @@ -37,5 +37,5 @@ private: static std::mutex mutex_; static std::shared_ptr instance_; }; -} +} // namespace OHOS::DistributedKv #endif // BROADCAST_SENDER_H diff --git a/services/distributeddataservice/adapter/include/dfx/dds_trace.h b/services/distributeddataservice/adapter/include/dfx/dds_trace.h index f78d50c1e..acbefc6f9 100644 --- a/services/distributeddataservice/adapter/include/dfx/dds_trace.h +++ b/services/distributeddataservice/adapter/include/dfx/dds_trace.h @@ -47,6 +47,6 @@ private: uint32_t traceCount{ 0 }; bool isSendToHiview{ false }; }; -} // namespace OHOS } // namespace DistributedKv +} // namespace OHOS #endif diff --git a/services/distributeddataservice/adapter/permission/src/meida_lib_checker.cpp b/services/distributeddataservice/adapter/permission/src/meida_lib_checker.cpp index eb63f84fe..b263674df 100644 --- a/services/distributeddataservice/adapter/permission/src/meida_lib_checker.cpp +++ b/services/distributeddataservice/adapter/permission/src/meida_lib_checker.cpp @@ -74,5 +74,5 @@ bool MeidaLibChecker::IsValid(pid_t uid, const std::string &bundleName) return true; } -} -} \ No newline at end of file +} // namespace DistributedData +} // namespace OHOS \ No newline at end of file diff --git a/services/distributeddataservice/adapter/permission/src/meida_lib_checker.h b/services/distributeddataservice/adapter/permission/src/meida_lib_checker.h index 491d1fd89..3f39ee0b0 100644 --- a/services/distributeddataservice/adapter/permission/src/meida_lib_checker.h +++ b/services/distributeddataservice/adapter/permission/src/meida_lib_checker.h @@ -32,7 +32,7 @@ private: static constexpr pid_t SYSTEM_UID = 10000; std::map trusts_; }; -} -} +} // namespace DistributedData +} // namespace OHOS #endif // OHOS_DISTRIBUTED_DATA_SERVICES_DISTRIBUTEDDATASERVICE_ADAPTER_PERMISSION_SRC_MEIDA_LIB_CHECKER_H diff --git a/services/distributeddataservice/app/src/device_change_listener_impl.cpp b/services/distributeddataservice/app/src/device_change_listener_impl.cpp index 5c2034416..6f39d5d63 100644 --- a/services/distributeddataservice/app/src/device_change_listener_impl.cpp +++ b/services/distributeddataservice/app/src/device_change_listener_impl.cpp @@ -41,4 +41,4 @@ AppDistributedKv::ChangeLevelType DeviceChangeListenerImpl::GetChangeLevelType() { return AppDistributedKv::ChangeLevelType::MIN; } -} +} // namespace OHOS::DistributedKv diff --git a/services/distributeddataservice/app/src/device_change_listener_impl.h b/services/distributeddataservice/app/src/device_change_listener_impl.h index 4b27f2e9e..c5030249f 100644 --- a/services/distributeddataservice/app/src/device_change_listener_impl.h +++ b/services/distributeddataservice/app/src/device_change_listener_impl.h @@ -32,5 +32,5 @@ public: private: std::map> &observers_; }; -} +} // namespace OHOS::DistributedKv #endif // DEV_DEVICE_CHANGE_LISTENER_IMPL_H diff --git a/services/distributeddataservice/app/src/device_kvstore_impl.cpp b/services/distributeddataservice/app/src/device_kvstore_impl.cpp index 18440f667..89be429c8 100644 --- a/services/distributeddataservice/app/src/device_kvstore_impl.cpp +++ b/services/distributeddataservice/app/src/device_kvstore_impl.cpp @@ -238,4 +238,4 @@ KvStoreResultSetImpl *DeviceKvStoreImpl::CreateResultSet( { return new (std::nothrow) DeviceKvStoreResultSetImpl(resultSet, prix); } -} +} // namespace OHOS::DistributedKv diff --git a/services/distributeddataservice/app/src/device_kvstore_impl.h b/services/distributeddataservice/app/src/device_kvstore_impl.h index e00b3b5e5..dad190462 100644 --- a/services/distributeddataservice/app/src/device_kvstore_impl.h +++ b/services/distributeddataservice/app/src/device_kvstore_impl.h @@ -49,5 +49,5 @@ private: void DeletePrefixAndSuffix(const Key &in, std::vector &out); static std::string localDeviceId_; }; -} +} // namespace OHOS::DistributedKv #endif // DEVICE_KVSTORE_IMPL_H diff --git a/services/distributeddataservice/app/src/device_kvstore_observer_impl.cpp b/services/distributeddataservice/app/src/device_kvstore_observer_impl.cpp index 97934ea17..27c7d9c01 100644 --- a/services/distributeddataservice/app/src/device_kvstore_observer_impl.cpp +++ b/services/distributeddataservice/app/src/device_kvstore_observer_impl.cpp @@ -81,4 +81,4 @@ void DeviceKvStoreObserverImpl::Transfer(const std::list & output.push_back(tmpEntry); } } -} \ No newline at end of file +} // namespace OHOS::DistributedKv \ No newline at end of file diff --git a/services/distributeddataservice/app/src/device_kvstore_observer_impl.h b/services/distributeddataservice/app/src/device_kvstore_observer_impl.h index 0147caf1c..4d2e14172 100644 --- a/services/distributeddataservice/app/src/device_kvstore_observer_impl.h +++ b/services/distributeddataservice/app/src/device_kvstore_observer_impl.h @@ -29,5 +29,5 @@ private: std::string localDeviceId_; sptr observerProxy_; }; -} +} // namespace OHOS::DistributedKv #endif // DEVICE_KVSTORE_OBSERVER_IMPL_H diff --git a/services/distributeddataservice/app/src/device_kvstore_resultset_impl.cpp b/services/distributeddataservice/app/src/device_kvstore_resultset_impl.cpp index fac7e84b7..d267f9390 100644 --- a/services/distributeddataservice/app/src/device_kvstore_resultset_impl.cpp +++ b/services/distributeddataservice/app/src/device_kvstore_resultset_impl.cpp @@ -49,4 +49,4 @@ Status DeviceKvStoreResultSetImpl::GetEntry(Entry &entry) ZLOGD("RS end."); return Status::SUCCESS; } -} \ No newline at end of file +} // namespace OHOS::DistributedKv \ No newline at end of file diff --git a/services/distributeddataservice/app/src/device_kvstore_resultset_impl.h b/services/distributeddataservice/app/src/device_kvstore_resultset_impl.h index 06e62c168..3e91852b3 100644 --- a/services/distributeddataservice/app/src/device_kvstore_resultset_impl.h +++ b/services/distributeddataservice/app/src/device_kvstore_resultset_impl.h @@ -24,6 +24,6 @@ public: explicit DeviceKvStoreResultSetImpl(DistributedDB::KvStoreResultSet *resultSet, DistributedDB::Key keyPrefix = {}); Status GetEntry(Entry &entry) override; }; -} +} // namespace OHOS::DistributedKv #endif // DEVICE_KVSTORE_RESULTSET_IMPL_H diff --git a/services/distributeddataservice/app/src/flowctrl_manager/kvstore_flowctrl_manager.cpp b/services/distributeddataservice/app/src/flowctrl_manager/kvstore_flowctrl_manager.cpp index 178b5bf0d..8065027e1 100644 --- a/services/distributeddataservice/app/src/flowctrl_manager/kvstore_flowctrl_manager.cpp +++ b/services/distributeddataservice/app/src/flowctrl_manager/kvstore_flowctrl_manager.cpp @@ -70,5 +70,5 @@ bool KvStoreFlowCtrlManager::IsTokenEnoughSlice(TokenBucket &tokenBucket, uint64 return tokenBucket.leftNumInTokenBucket >= 1; } } -} -} +} // namespace DistributedKv +} // namespace OHOS diff --git a/services/distributeddataservice/app/src/flowctrl_manager/kvstore_flowctrl_manager.h b/services/distributeddataservice/app/src/flowctrl_manager/kvstore_flowctrl_manager.h index 2967ad7e2..d83fdd7c6 100644 --- a/services/distributeddataservice/app/src/flowctrl_manager/kvstore_flowctrl_manager.h +++ b/services/distributeddataservice/app/src/flowctrl_manager/kvstore_flowctrl_manager.h @@ -55,7 +55,7 @@ private: TokenBucket sustainedTokenBucket_; // token bucket to deal with sustained events. }; -} -} +} // namespace DistributedKv +} // namespace OHOS #endif // FOUNDATION_KVSTORE_FLOW_CTRL_MANAGER_H diff --git a/services/distributeddataservice/app/src/kvstore_account_observer.cpp b/services/distributeddataservice/app/src/kvstore_account_observer.cpp index ae25f382f..f82582255 100644 --- a/services/distributeddataservice/app/src/kvstore_account_observer.cpp +++ b/services/distributeddataservice/app/src/kvstore_account_observer.cpp @@ -35,4 +35,4 @@ void KvStoreAccountObserver::OnAccountChanged(const AccountEventInfo &eventInfo) ZLOGI("account event %d, end.", eventInfo.status); } } // namespace DistributedKv -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/services/distributeddataservice/app/src/kvstore_app_accessor.cpp b/services/distributeddataservice/app/src/kvstore_app_accessor.cpp index 40af4e48d..27d8637c7 100644 --- a/services/distributeddataservice/app/src/kvstore_app_accessor.cpp +++ b/services/distributeddataservice/app/src/kvstore_app_accessor.cpp @@ -120,4 +120,4 @@ void KvStoreAppAccessor::OnCallback(const std::string &userId, const std::string ZLOGD("AppId:%s is closed.", appId.c_str()); } } -} +} // namespace OHOS::DistributedKv diff --git a/services/distributeddataservice/app/src/kvstore_app_accessor.h b/services/distributeddataservice/app/src/kvstore_app_accessor.h index 481da44a5..da83162a6 100644 --- a/services/distributeddataservice/app/src/kvstore_app_accessor.h +++ b/services/distributeddataservice/app/src/kvstore_app_accessor.h @@ -44,5 +44,5 @@ public: private: KvStoreAppAccessor(); }; -} +} // namespace OHOS::DistributedKv #endif // KVSTORE_APP_ACCESSOR_H diff --git a/services/distributeddataservice/app/src/kvstore_data_service.cpp b/services/distributeddataservice/app/src/kvstore_data_service.cpp index 40b0c5f8e..ee44cd23a 100644 --- a/services/distributeddataservice/app/src/kvstore_data_service.cpp +++ b/services/distributeddataservice/app/src/kvstore_data_service.cpp @@ -1387,4 +1387,4 @@ void DbMetaCallbackDelegateMgr::GetKvStoreKeys(std::vector &dbStats) } delegate_->CloseKvStore(kvStoreNbDelegatePtr); } -} // namespace OHOS::DistributedKv \ No newline at end of file +} // namespace OHOS::DistributedKv diff --git a/services/distributeddataservice/app/src/kvstore_device_listener.cpp b/services/distributeddataservice/app/src/kvstore_device_listener.cpp index 2462c7da6..ab3e5f6fc 100644 --- a/services/distributeddataservice/app/src/kvstore_device_listener.cpp +++ b/services/distributeddataservice/app/src/kvstore_device_listener.cpp @@ -34,4 +34,4 @@ KvStoreDeviceListener::KvStoreDeviceListener(KvStoreDataService &kvStoreDataServ : kvStoreDataService_(kvStoreDataService) { } -} // namespace OHOS::DistributedKv \ No newline at end of file +} // namespace OHOS::DistributedKv diff --git a/services/distributeddataservice/app/src/kvstore_resultset_impl.cpp b/services/distributeddataservice/app/src/kvstore_resultset_impl.cpp index 6d474a404..785623aa1 100644 --- a/services/distributeddataservice/app/src/kvstore_resultset_impl.cpp +++ b/services/distributeddataservice/app/src/kvstore_resultset_impl.cpp @@ -218,4 +218,4 @@ Status KvStoreResultSetImpl::MigrateKvStore(DistributedDB::KvStoreNbDelegate *kv return Status::SUCCESS; } -} // namespace OHOS::DistributedKv \ No newline at end of file +} // namespace OHOS::DistributedKv diff --git a/services/distributeddataservice/app/src/security/security.cpp b/services/distributeddataservice/app/src/security/security.cpp index e2a9533ed..d8ab0419c 100644 --- a/services/distributeddataservice/app/src/security/security.cpp +++ b/services/distributeddataservice/app/src/security/security.cpp @@ -257,4 +257,4 @@ DBStatus Security::GetDirSecurityOption(const std::string &filePath, SecurityOpt ZLOGI("the filePath is a directory!"); return DBStatus::NOT_SUPPORT; } -} +} // namespace OHOS::DistributedKv diff --git a/services/distributeddataservice/app/src/uninstaller/uninstaller.cpp b/services/distributeddataservice/app/src/uninstaller/uninstaller.cpp index 5cdf855f9..905004bb0 100644 --- a/services/distributeddataservice/app/src/uninstaller/uninstaller.cpp +++ b/services/distributeddataservice/app/src/uninstaller/uninstaller.cpp @@ -22,4 +22,4 @@ Uninstaller &Uninstaller::GetInstance() static UninstallerImpl uninstaller; return uninstaller; } -} +} // namespace OHOS::DistributedKv diff --git a/services/distributeddataservice/app/src/uninstaller/uninstaller.h b/services/distributeddataservice/app/src/uninstaller/uninstaller.h index b575a2ef3..c8eccf1cc 100644 --- a/services/distributeddataservice/app/src/uninstaller/uninstaller.h +++ b/services/distributeddataservice/app/src/uninstaller/uninstaller.h @@ -30,5 +30,5 @@ public: KVSTORE_API virtual ~Uninstaller() {}; KVSTORE_API static Uninstaller &GetInstance(); }; -} +} // namespace OHOS::DistributedKv #endif // DISTRIBUTEDDATAMGR_UNINSTALLER_H diff --git a/services/distributeddataservice/app/src/uninstaller/uninstaller_impl.cpp b/services/distributeddataservice/app/src/uninstaller/uninstaller_impl.cpp index a12e49682..b2b87fcf5 100644 --- a/services/distributeddataservice/app/src/uninstaller/uninstaller_impl.cpp +++ b/services/distributeddataservice/app/src/uninstaller/uninstaller_impl.cpp @@ -124,4 +124,4 @@ Status UninstallerImpl::Init(KvStoreDataService *kvStoreDataService) th.detach(); return Status::SUCCESS; } -} +} // namespace OHOS::DistributedKv diff --git a/services/distributeddataservice/app/src/uninstaller/uninstaller_impl.h b/services/distributeddataservice/app/src/uninstaller/uninstaller_impl.h index 0a05df79b..fbd792b5c 100644 --- a/services/distributeddataservice/app/src/uninstaller/uninstaller_impl.h +++ b/services/distributeddataservice/app/src/uninstaller/uninstaller_impl.h @@ -42,5 +42,5 @@ public: private: std::shared_ptr subscriber_ {}; }; -} +} // namespace OHOS::DistributedKv #endif // DISTRIBUTEDDATAMGR_UNINSTALLER_IMPL_H diff --git a/services/distributeddataservice/app/test/unittest/rdb_service_impl.h b/services/distributeddataservice/app/test/unittest/rdb_service_impl.h index 4c35172fa..27d0319f4 100644 --- a/services/distributeddataservice/app/test/unittest/rdb_service_impl.h +++ b/services/distributeddataservice/app/test/unittest/rdb_service_impl.h @@ -35,5 +35,5 @@ public: return 0; } }; -} +} // namespace OHOS::DistributedRdb #endif diff --git a/services/distributeddataservice/framework/checker/checker_manager.cpp b/services/distributeddataservice/framework/checker/checker_manager.cpp index f0a7c316a..8fc87f6a5 100644 --- a/services/distributeddataservice/framework/checker/checker_manager.cpp +++ b/services/distributeddataservice/framework/checker/checker_manager.cpp @@ -94,5 +94,5 @@ CheckerManager::Checker *CheckerManager::GetChecker(const std::string &checker) } return it->second; } -} -} \ No newline at end of file +} // namespace DistributedData +} // namespace OHOS \ No newline at end of file diff --git a/services/distributeddataservice/framework/checker/default/bundle_checker.cpp b/services/distributeddataservice/framework/checker/default/bundle_checker.cpp index 48e9daa1f..1c355e1e3 100644 --- a/services/distributeddataservice/framework/checker/default/bundle_checker.cpp +++ b/services/distributeddataservice/framework/checker/default/bundle_checker.cpp @@ -89,5 +89,5 @@ bool BundleChecker::IsValid(pid_t uid, const std::string &bundleName) auto bundleInfo = std::make_unique(); return bmsClient.GetBundleInfo(bundle, BundleFlag::GET_BUNDLE_DEFAULT, *bundleInfo, Constants::ANY_USERID); } -} -} \ No newline at end of file +} // namespace DistributedData +} // namespace OHOS \ No newline at end of file diff --git a/services/distributeddataservice/framework/checker/default/system_checker.cpp b/services/distributeddataservice/framework/checker/default/system_checker.cpp index 84ce58d0e..f66f89e13 100644 --- a/services/distributeddataservice/framework/checker/default/system_checker.cpp +++ b/services/distributeddataservice/framework/checker/default/system_checker.cpp @@ -53,5 +53,5 @@ bool SystemChecker::IsValid(pid_t uid, const std::string &bundleName) { return (uid < SYSTEM_UID && uid != CheckerManager::INVALID_UID); } -} -} \ No newline at end of file +} // namespace DistributedData +} // namespace OHOS \ No newline at end of file diff --git a/services/distributeddataservice/framework/eventcenter/event.cpp b/services/distributeddataservice/framework/eventcenter/event.cpp index 19bda662b..17842fec2 100644 --- a/services/distributeddataservice/framework/eventcenter/event.cpp +++ b/services/distributeddataservice/framework/eventcenter/event.cpp @@ -26,5 +26,5 @@ int32_t Event::GetEventId() const { return evtId_; } -} -} \ No newline at end of file +} // namespace DistributedData +} // namespace OHOS \ No newline at end of file diff --git a/services/distributeddataservice/framework/eventcenter/event_center.cpp b/services/distributeddataservice/framework/eventcenter/event_center.cpp index 2dd0bd147..f91ec09ba 100644 --- a/services/distributeddataservice/framework/eventcenter/event_center.cpp +++ b/services/distributeddataservice/framework/eventcenter/event_center.cpp @@ -141,6 +141,6 @@ void EventCenter::AsyncQueue::AddHandler(int32_t evtId, std::function checkers_; ConcurrentMap> getters_; }; -} -} +} // namespace DistributedData +} // namespace OHOS #endif // OHOS_DISTRIBUTED_DATA_SERVICES_FRAMEWORK_CHECKER_CHECKER_MANAGER_H diff --git a/services/distributeddataservice/framework/include/checker/default/bundle_checker.h b/services/distributeddataservice/framework/include/checker/default/bundle_checker.h index 91eefe491..3e4a10210 100644 --- a/services/distributeddataservice/framework/include/checker/default/bundle_checker.h +++ b/services/distributeddataservice/framework/include/checker/default/bundle_checker.h @@ -31,6 +31,6 @@ private: static constexpr pid_t SYSTEM_UID = 10000; std::map trusts_; }; -} -} +} // namespace DistributedData +} // namespace OHOS #endif // OHOS_DISTRIBUTED_DATA_SERVICES_FRAMEWORK_CHECKER_BUNDLE_CHECKER_H diff --git a/services/distributeddataservice/framework/include/checker/default/system_checker.h b/services/distributeddataservice/framework/include/checker/default/system_checker.h index 29c9ccbf2..4ac610312 100644 --- a/services/distributeddataservice/framework/include/checker/default/system_checker.h +++ b/services/distributeddataservice/framework/include/checker/default/system_checker.h @@ -32,6 +32,6 @@ private: std::map trusts_; static SystemChecker instance_; }; -} -} +} // namespace DistributedData +} // namespace OHOS #endif // OHOS_DISTRIBUTED_DATA_SERVICES_FRAMEWORK_SYSTEM_CHECKER_H diff --git a/services/distributeddataservice/framework/include/eventcenter/event.h b/services/distributeddataservice/framework/include/eventcenter/event.h index 92d9cecde..150d48feb 100644 --- a/services/distributeddataservice/framework/include/eventcenter/event.h +++ b/services/distributeddataservice/framework/include/eventcenter/event.h @@ -35,6 +35,6 @@ public: private: int32_t evtId_; }; -} -} +} // namespace DistributedData +} // namespace OHOS #endif // OHOS_DISTRIBUTED_DATA_SERVICES_FRAMEWORK_EVENTCENTER_EVENT_H diff --git a/services/distributeddataservice/framework/include/eventcenter/event_center.h b/services/distributeddataservice/framework/include/eventcenter/event_center.h index fb418f6d9..b9eb2f0d1 100644 --- a/services/distributeddataservice/framework/include/eventcenter/event_center.h +++ b/services/distributeddataservice/framework/include/eventcenter/event_center.h @@ -62,6 +62,6 @@ private: ConcurrentMap>> observers_; static thread_local AsyncQueue *asyncQueue_; }; -} -} +} // namespace DistributedData +} // namespace OHOS #endif // OHOS_DISTRIBUTED_DATA_SERVICES_FRAMEWORK_EVENTCENTER_EVENT_CENTER_H diff --git a/services/distributeddataservice/framework/include/metadata/meta_data.h b/services/distributeddataservice/framework/include/metadata/meta_data.h index 8059e0c58..0bc7685c1 100644 --- a/services/distributeddataservice/framework/include/metadata/meta_data.h +++ b/services/distributeddataservice/framework/include/metadata/meta_data.h @@ -27,6 +27,6 @@ struct MetaData final : public Serializable { bool Marshal(json &node) const override; bool Unmarshal(const json &node) override; }; -} -} +} // namespace DistributedData +} // namespace OHOS #endif // OHOS_DISTRIBUTED_DATA_SERVICES_FRAMEWORK_METADATA_META_DATA_H diff --git a/services/distributeddataservice/framework/include/metadata/secret_key_meta_data.h b/services/distributeddataservice/framework/include/metadata/secret_key_meta_data.h index 768c2ce6a..39d100003 100644 --- a/services/distributeddataservice/framework/include/metadata/secret_key_meta_data.h +++ b/services/distributeddataservice/framework/include/metadata/secret_key_meta_data.h @@ -27,6 +27,6 @@ struct SecretKeyMetaData final : public Serializable { API_EXPORT bool Marshal(json &node) const override; API_EXPORT bool Unmarshal(const json &node) override; }; -} -} +} // namespace DistributedData +} // namespace OHOS #endif // OHOS_DISTRIBUTED_DATA_SERVICES_FRAMEWORK_METADATA_SECRET_KEY_META_DATA_H diff --git a/services/distributeddataservice/framework/include/serializable/serializable.h b/services/distributeddataservice/framework/include/serializable/serializable.h index 6387e19aa..0d772cc11 100644 --- a/services/distributeddataservice/framework/include/serializable/serializable.h +++ b/services/distributeddataservice/framework/include/serializable/serializable.h @@ -30,7 +30,7 @@ namespace DistributedData { struct Serializable { public: using json = nlohmann::json; - using size_type= nlohmann::json::size_type; + using size_type = nlohmann::json::size_type; using error_handler_t = nlohmann::detail::error_handler_t; API_EXPORT json Marshall() const; template @@ -112,6 +112,6 @@ protected: API_EXPORT static const json &GetSubNode(const json &node, const std::string &name); }; -} -} +} // namespace DistributedData +} // namespace OHOS #endif // OHOS_DISTRIBUTED_DATA_FRAMEWORKS_COMMON_SERIALIZABLE_H diff --git a/services/distributeddataservice/framework/include/utils/anonymous.h b/services/distributeddataservice/framework/include/utils/anonymous.h index ce5a97069..bf34e8c8d 100644 --- a/services/distributeddataservice/framework/include/utils/anonymous.h +++ b/services/distributeddataservice/framework/include/utils/anonymous.h @@ -23,6 +23,6 @@ class Anonymous { public: API_EXPORT static std::string Change(const std::string &name); }; -} -} +} // namespace DistributedData +} // namespace OHOS #endif // OHOS_DISTRIBUTED_DATA_SERVICES_FRAMEWORK_UTILS_ANONYMOUS_H diff --git a/services/distributeddataservice/framework/include/utils/block_integer.h b/services/distributeddataservice/framework/include/utils/block_integer.h index ca8733cc3..032e2f0ce 100644 --- a/services/distributeddataservice/framework/include/utils/block_integer.h +++ b/services/distributeddataservice/framework/include/utils/block_integer.h @@ -44,5 +44,5 @@ private: int interval_ = 0; int value_ = 0; }; -} +} // namespace OHOS::DistributedData #endif // OHOS_DISTRIBUTED_DATA_SERVICES_FRAMEWORK_UTILS_BLOCK_INTEGER_H diff --git a/services/distributeddataservice/framework/include/utils/constant.h b/services/distributeddataservice/framework/include/utils/constant.h index 244b1aecc..4d29f7656 100644 --- a/services/distributeddataservice/framework/include/utils/constant.h +++ b/services/distributeddataservice/framework/include/utils/constant.h @@ -182,4 +182,3 @@ T Constant::TrimCopy(T s) } // namespace DistributedKv } // namespace OHOS #endif // KV_DATASERVICE_CONSTANT_H - diff --git a/services/distributeddataservice/framework/include/utils/crypto.h b/services/distributeddataservice/framework/include/utils/crypto.h index d84266204..e0644a758 100644 --- a/services/distributeddataservice/framework/include/utils/crypto.h +++ b/services/distributeddataservice/framework/include/utils/crypto.h @@ -26,6 +26,6 @@ public: API_EXPORT static std::string Sha256(const void *data, size_t size, bool isUpper = false); API_EXPORT static std::vector Random(int32_t len); }; -} -} +} // namespace DistributedData +} // namespace OHOS #endif // OHOS_DISTRIBUTED_DATA_SERVICES_FRAMEWORK_UTILS_CRYPTO_H diff --git a/services/distributeddataservice/framework/metadata/capability_meta_data.cpp b/services/distributeddataservice/framework/metadata/capability_meta_data.cpp index 624c0b7a9..ae9f204a4 100644 --- a/services/distributeddataservice/framework/metadata/capability_meta_data.cpp +++ b/services/distributeddataservice/framework/metadata/capability_meta_data.cpp @@ -39,4 +39,4 @@ std::vector CapMetaRow::GetKeyFor(const std::string &key) std::string str = Constant::Concatenate({ KEY_PREFIX, Constant::KEY_SEPARATOR, key }); return { str.begin(), str.end() }; } -} // namespace OHOS::DistributedData \ No newline at end of file +} // namespace OHOS::DistributedData diff --git a/services/distributeddataservice/framework/metadata/meta_data.cpp b/services/distributeddataservice/framework/metadata/meta_data.cpp index 090ca2d3c..e1ba68e12 100644 --- a/services/distributeddataservice/framework/metadata/meta_data.cpp +++ b/services/distributeddataservice/framework/metadata/meta_data.cpp @@ -30,5 +30,5 @@ bool MetaData::Unmarshal(const json &node) GetValue(node, GET_NAME(secretKeyMetaData), secretKeyMetaData); return true; } -} -} \ No newline at end of file +} // namespace DistributedData +} // namespace OHOS diff --git a/services/distributeddataservice/framework/metadata/secret_key_meta_data.cpp b/services/distributeddataservice/framework/metadata/secret_key_meta_data.cpp index 9ea3a7e32..35e173785 100644 --- a/services/distributeddataservice/framework/metadata/secret_key_meta_data.cpp +++ b/services/distributeddataservice/framework/metadata/secret_key_meta_data.cpp @@ -36,5 +36,5 @@ bool SecretKeyMetaData::Unmarshal(const json &node) GetValue(node, GET_NAME(kvStoreType), kvStoreType); return true; } -} -} \ No newline at end of file +} // namespace DistributedData +} // namespace OHOS diff --git a/services/distributeddataservice/framework/metadata/store_meta_data.cpp b/services/distributeddataservice/framework/metadata/store_meta_data.cpp index 3069a3a91..8eef8dfc9 100644 --- a/services/distributeddataservice/framework/metadata/store_meta_data.cpp +++ b/services/distributeddataservice/framework/metadata/store_meta_data.cpp @@ -87,4 +87,4 @@ std::vector SecretMetaRow::GetKeyFor(const std::string &key) return { str.begin(), str.end() }; } } // namespace DistributedData -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/services/distributeddataservice/framework/metadata/strategy_meta_data.cpp b/services/distributeddataservice/framework/metadata/strategy_meta_data.cpp index 2cb49d40e..b2f14c155 100644 --- a/services/distributeddataservice/framework/metadata/strategy_meta_data.cpp +++ b/services/distributeddataservice/framework/metadata/strategy_meta_data.cpp @@ -40,4 +40,4 @@ StrategyMeta::StrategyMeta(const std::string &devId, const std::string &devAccId : devId(devId), devAccId(devAccId), grpId(grpId), bundleName(bundleName), storeId(storeId) { } -} // namespace OHOS::DistributedData \ No newline at end of file +} // namespace OHOS::DistributedData diff --git a/services/distributeddataservice/framework/test/checker_manager_test.cpp b/services/distributeddataservice/framework/test/checker_manager_test.cpp index b858eaabd..8e9273b68 100644 --- a/services/distributeddataservice/framework/test/checker_manager_test.cpp +++ b/services/distributeddataservice/framework/test/checker_manager_test.cpp @@ -93,4 +93,4 @@ HWTEST_F(CheckerManagerTest, BundleChecker, TestSize.Level0) ASSERT_EQ(Crypto::Sha256("ohos.test.demo"), CheckerManager::GetInstance().GetAppId("ohos.test.demo", 100000)); ASSERT_TRUE(CheckerManager::GetInstance().IsValid("ohos.test.demo", 100000)); -} \ No newline at end of file +} diff --git a/services/distributeddataservice/framework/test/event_center_test.cpp b/services/distributeddataservice/framework/test/event_center_test.cpp index 11c318c16..647cb6b05 100644 --- a/services/distributeddataservice/framework/test/event_center_test.cpp +++ b/services/distributeddataservice/framework/test/event_center_test.cpp @@ -151,4 +151,4 @@ HWTEST_F(EventCenterTest, ImmediatelyASyncEvent, TestSize.Level2) EventCenter::GetInstance().PostEvent(std::make_unique()); ASSERT_EQ(currEvent_, TEST_EVT_END); ASSERT_EQ(waitEvent_, TEST_EVT_UNKNOWN); -} \ No newline at end of file +} diff --git a/services/distributeddataservice/framework/utils/anonymous.cpp b/services/distributeddataservice/framework/utils/anonymous.cpp index c3f13c89c..3ebab2546 100644 --- a/services/distributeddataservice/framework/utils/anonymous.cpp +++ b/services/distributeddataservice/framework/utils/anonymous.cpp @@ -33,5 +33,5 @@ std::string Anonymous::Change(const std::string &name) return (name.substr(0, HEAD_SIZE) + REPLACE_CHAIN + name.substr(name.length() - END_SIZE, END_SIZE)); } -} -} \ No newline at end of file +} // namespace DistributedData +} // namespace OHOS diff --git a/services/distributeddataservice/framework/utils/block_integer.cpp b/services/distributeddataservice/framework/utils/block_integer.cpp index 536e525ff..d57413e92 100644 --- a/services/distributeddataservice/framework/utils/block_integer.cpp +++ b/services/distributeddataservice/framework/utils/block_integer.cpp @@ -37,4 +37,4 @@ BlockInteger &BlockInteger::operator=(int value) value_ = value; return *this; } -} \ No newline at end of file +} // namespace OHOS::DistributedData diff --git a/services/distributeddataservice/framework/utils/crypto.cpp b/services/distributeddataservice/framework/utils/crypto.cpp index 93be84859..e55381439 100644 --- a/services/distributeddataservice/framework/utils/crypto.cpp +++ b/services/distributeddataservice/framework/utils/crypto.cpp @@ -53,5 +53,5 @@ std::string Crypto::Sha256(const void *data, size_t size, bool isUpper) hash[SHA256_DIGEST_LENGTH * 2] = 0; return reinterpret_cast(hash); } -} -} \ No newline at end of file +} // namespace DistributedData +} // namespace OHOS diff --git a/services/distributeddataservice/service/bootstrap/include/bootstrap.h b/services/distributeddataservice/service/bootstrap/include/bootstrap.h index 0d6f16063..8af35ae18 100644 --- a/services/distributeddataservice/service/bootstrap/include/bootstrap.h +++ b/services/distributeddataservice/service/bootstrap/include/bootstrap.h @@ -31,6 +31,6 @@ private: static constexpr const char *DEFAULT_LABEL = "distributeddata"; using Constructor = void(*)(const char *); }; -} -} +} // namespace DistributedData +} // namespace OHOS #endif // OHOS_DISTRIBUTED_DATA_SERVICES_BOOTSTRAP_BOOTSTRAP_H diff --git a/services/distributeddataservice/service/bootstrap/src/bootstrap.cpp b/services/distributeddataservice/service/bootstrap/src/bootstrap.cpp index 2d467d682..1a2a45f99 100644 --- a/services/distributeddataservice/service/bootstrap/src/bootstrap.cpp +++ b/services/distributeddataservice/service/bootstrap/src/bootstrap.cpp @@ -84,4 +84,4 @@ void Bootstrap::LoadDirectory() DirectoryManager::GetInstance().SetCurrentVersion(global->directory->currentStrategyVersion); } } // namespace DistributedData -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/services/distributeddataservice/service/config/include/config_factory.h b/services/distributeddataservice/service/config/include/config_factory.h index deb6f8b5f..7d3a4fc8c 100644 --- a/services/distributeddataservice/service/config/include/config_factory.h +++ b/services/distributeddataservice/service/config/include/config_factory.h @@ -37,6 +37,6 @@ private: GlobalConfig config_; bool isInited = false; }; -} -} -#endif // OHOS_DISTRIBUTED_DATA_SERVICES_CONFIG_CONFIG_FACTORY_H \ No newline at end of file +} // namespace DistributedData +} // namespace OHOS +#endif // OHOS_DISTRIBUTED_DATA_SERVICES_CONFIG_CONFIG_FACTORY_H diff --git a/services/distributeddataservice/service/config/include/model/checker_config.h b/services/distributeddataservice/service/config/include/model/checker_config.h index 883d2d102..6967f3c19 100644 --- a/services/distributeddataservice/service/config/include/model/checker_config.h +++ b/services/distributeddataservice/service/config/include/model/checker_config.h @@ -30,6 +30,6 @@ public: bool Marshal(json &node) const override; bool Unmarshal(const json &node) override; }; -} -} +} // namespace DistributedData +} // namespace OHOS #endif // OHOS_DISTRIBUTED_DATA_SERVICES_CONFIG_MODEL_CHECKER_CONFIG_H diff --git a/services/distributeddataservice/service/config/include/model/component_config.h b/services/distributeddataservice/service/config/include/model/component_config.h index ed9df6c75..7904a000c 100644 --- a/services/distributeddataservice/service/config/include/model/component_config.h +++ b/services/distributeddataservice/service/config/include/model/component_config.h @@ -28,6 +28,6 @@ public: bool Marshal(json &node) const override; bool Unmarshal(const json &node) override; }; -} -} +} // namespace DistributedData +} // namespace OHOS #endif // OHOS_DISTRIBUTED_DATA_SERVICES_CONFIG_MODEL_COMPONENT_CONFIG_H diff --git a/services/distributeddataservice/service/config/include/model/directory_config.h b/services/distributeddataservice/service/config/include/model/directory_config.h index 7476cd96f..1244eb622 100644 --- a/services/distributeddataservice/service/config/include/model/directory_config.h +++ b/services/distributeddataservice/service/config/include/model/directory_config.h @@ -30,6 +30,6 @@ public: bool Marshal(json &node) const override; bool Unmarshal(const json &node) override; }; -} -} +} // namespace DistributedData +} // namespace OHOS #endif // OHOS_DISTRIBUTED_DATA_SERVICES_CONFIG_MODEL_DIRECTORY_CONFIG_H diff --git a/services/distributeddataservice/service/config/include/model/global_config.h b/services/distributeddataservice/service/config/include/model/global_config.h index a88f19eca..903d0d4d7 100644 --- a/services/distributeddataservice/service/config/include/model/global_config.h +++ b/services/distributeddataservice/service/config/include/model/global_config.h @@ -35,6 +35,6 @@ public: bool Marshal(json &node) const override; bool Unmarshal(const json &node) override; }; -} -} +} // namespace DistributedData +} // namespace OHOS #endif // OHOS_DISTRIBUTED_DATA_SERVICES_CONFIG_MODEL_GLOBAL_CONFIG_H diff --git a/services/distributeddataservice/service/config/include/model/network_config.h b/services/distributeddataservice/service/config/include/model/network_config.h index fbcb02a45..74f5e2a4b 100644 --- a/services/distributeddataservice/service/config/include/model/network_config.h +++ b/services/distributeddataservice/service/config/include/model/network_config.h @@ -28,6 +28,6 @@ public: bool Marshal(json &node) const override; bool Unmarshal(const json &node) override; }; -} -} +} // namespace DistributedData +} // namespace OHOS #endif // OHOS_DISTRIBUTED_DATA_SERVICES_CONFIG_MODEL_NETWORK_CONFIG_H diff --git a/services/distributeddataservice/service/config/include/model/protocol_config.h b/services/distributeddataservice/service/config/include/model/protocol_config.h index 383fb6759..cb93d9713 100644 --- a/services/distributeddataservice/service/config/include/model/protocol_config.h +++ b/services/distributeddataservice/service/config/include/model/protocol_config.h @@ -26,6 +26,6 @@ public: bool Marshal(json &node) const override; bool Unmarshal(const json &node) override; }; -} -} +} // namespace DistributedData +} // namespace OHOS #endif // OHOS_DISTRIBUTED_DATA_SERVICES_CONFIG_MODEL_PROTOCOL_CONFIG_H diff --git a/services/distributeddataservice/service/config/src/config_factory.cpp b/services/distributeddataservice/service/config/src/config_factory.cpp index 796b2cecb..117c495ba 100644 --- a/services/distributeddataservice/service/config/src/config_factory.cpp +++ b/services/distributeddataservice/service/config/src/config_factory.cpp @@ -67,5 +67,5 @@ GlobalConfig *ConfigFactory::GetGlobalConfig() { return &config_; } -} -} \ No newline at end of file +} // namespace DistributedData +} // namespace OHOS diff --git a/services/distributeddataservice/service/config/src/model/checker_config.cpp b/services/distributeddataservice/service/config/src/model/checker_config.cpp index 35fb58b14..e646d58d9 100644 --- a/services/distributeddataservice/service/config/src/model/checker_config.cpp +++ b/services/distributeddataservice/service/config/src/model/checker_config.cpp @@ -50,4 +50,4 @@ bool CheckerConfig::Unmarshal(const json &node) return true; } } // namespace DistributedData -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/services/distributeddataservice/service/config/src/model/component_config.cpp b/services/distributeddataservice/service/config/src/model/component_config.cpp index 9fed56bb1..3810ece2b 100644 --- a/services/distributeddataservice/service/config/src/model/component_config.cpp +++ b/services/distributeddataservice/service/config/src/model/component_config.cpp @@ -40,5 +40,5 @@ bool ComponentConfig::Unmarshal(const json &node) } return true; } -} -} \ No newline at end of file +} // namespace DistributedData +} // namespace OHOS diff --git a/services/distributeddataservice/service/config/src/model/directory_config.cpp b/services/distributeddataservice/service/config/src/model/directory_config.cpp index 97152be9a..bd8eb3856 100644 --- a/services/distributeddataservice/service/config/src/model/directory_config.cpp +++ b/services/distributeddataservice/service/config/src/model/directory_config.cpp @@ -48,5 +48,5 @@ bool DirectoryConfig::Unmarshal(const json &node) ret = GetValue(node, GET_NAME(strategy), strategy) && ret; return ret; } -} -} \ No newline at end of file +} // namespace DistributedData +} // namespace OHOS diff --git a/services/distributeddataservice/service/config/src/model/global_config.cpp b/services/distributeddataservice/service/config/src/model/global_config.cpp index 8f91037ea..cac81e9d6 100644 --- a/services/distributeddataservice/service/config/src/model/global_config.cpp +++ b/services/distributeddataservice/service/config/src/model/global_config.cpp @@ -42,4 +42,4 @@ bool GlobalConfig::Unmarshal(const json &node) return true; } } // namespace DistributedData -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/services/distributeddataservice/service/config/src/model/network_config.cpp b/services/distributeddataservice/service/config/src/model/network_config.cpp index 20c0049fe..a8ce21aba 100644 --- a/services/distributeddataservice/service/config/src/model/network_config.cpp +++ b/services/distributeddataservice/service/config/src/model/network_config.cpp @@ -34,4 +34,4 @@ bool NetworkConfig::Unmarshal(const json &node) return true; } } // namespace DistributedData -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/services/distributeddataservice/service/config/src/model/protocol_config.cpp b/services/distributeddataservice/service/config/src/model/protocol_config.cpp index 8e5161e95..f7e0422b3 100644 --- a/services/distributeddataservice/service/config/src/model/protocol_config.cpp +++ b/services/distributeddataservice/service/config/src/model/protocol_config.cpp @@ -31,5 +31,5 @@ bool ProtocolConfig::Unmarshal(const json &node) GetValue(node, GET_NAME(transport), transport); return true; } -} -} \ No newline at end of file +} // namespace DistributedData +} // namespace OHOS diff --git a/services/distributeddataservice/service/directory/include/directory_manager.h b/services/distributeddataservice/service/directory/include/directory_manager.h index 3227244e8..bc1ad5964 100644 --- a/services/distributeddataservice/service/directory/include/directory_manager.h +++ b/services/distributeddataservice/service/directory/include/directory_manager.h @@ -90,5 +90,5 @@ private: std::map patterns_; std::string version_; }; -} // namespace OHOS::DistributedKv +} // namespace OHOS::DistributedData #endif // DISTRIBUTEDDATAMGR_DIRECTORY_MANAGER_H diff --git a/services/distributeddataservice/service/directory/include/kvstore_context.h b/services/distributeddataservice/service/directory/include/kvstore_context.h index a60f43bb1..f312d57bb 100644 --- a/services/distributeddataservice/service/directory/include/kvstore_context.h +++ b/services/distributeddataservice/service/directory/include/kvstore_context.h @@ -24,4 +24,4 @@ struct ClientContext { std::string dataDir {}; }; } // namespace OHOS::DistributedData -#endif // DISTRIBUTEDDATAMGR_KVSTORE_CONTEXT_H \ No newline at end of file +#endif // DISTRIBUTEDDATAMGR_KVSTORE_CONTEXT_H diff --git a/services/distributeddataservice/service/directory/src/directory_manager.cpp b/services/distributeddataservice/service/directory/src/directory_manager.cpp index 628092b20..9c2610b8a 100644 --- a/services/distributeddataservice/service/directory/src/directory_manager.cpp +++ b/services/distributeddataservice/service/directory/src/directory_manager.cpp @@ -125,4 +125,4 @@ void DirectoryManager::SetCurrentVersion(const std::string &version) { version_ = version; } -} // namespace OHOS::DistributedData \ No newline at end of file +} // namespace OHOS::DistributedData diff --git a/services/distributeddataservice/service/kvdb/executor_factory.cpp b/services/distributeddataservice/service/kvdb/executor_factory.cpp index 25cc2b707..9c1be978d 100644 --- a/services/distributeddataservice/service/kvdb/executor_factory.cpp +++ b/services/distributeddataservice/service/kvdb/executor_factory.cpp @@ -43,4 +43,4 @@ ExecutorFactory::~ExecutorFactory() threadPool_ = nullptr; } } -} // namespace OHOS::DistributedData \ No newline at end of file +} // namespace OHOS::DistributedData diff --git a/services/distributeddataservice/service/rdb/rdb_service_impl.cpp b/services/distributeddataservice/service/rdb/rdb_service_impl.cpp index 1a98804fe..60b540a4f 100644 --- a/services/distributeddataservice/service/rdb/rdb_service_impl.cpp +++ b/services/distributeddataservice/service/rdb/rdb_service_impl.cpp @@ -314,4 +314,4 @@ int32_t RdbServiceImpl::DoUnSubscribe(const RdbSyncerParam& param) identifiers_.Erase(identifier); return RDB_OK; } -} \ No newline at end of file +} // namespace OHOS::DistributedRdb diff --git a/services/distributeddataservice/service/rdb/rdb_service_impl.h b/services/distributeddataservice/service/rdb/rdb_service_impl.h index 1014ae330..aff616f9d 100644 --- a/services/distributeddataservice/service/rdb/rdb_service_impl.h +++ b/services/distributeddataservice/service/rdb/rdb_service_impl.h @@ -90,5 +90,5 @@ private: static constexpr int32_t MAX_SYNCER_PER_PROCESS = 10; static constexpr int32_t SYNCER_TIMEOUT = 60 * 1000; // ms }; -} +} // namespace OHOS::DistributedRdb #endif diff --git a/services/distributeddataservice/service/rdb/rdb_service_stub.cpp b/services/distributeddataservice/service/rdb/rdb_service_stub.cpp index 1de876eea..dbb9835ff 100644 --- a/services/distributeddataservice/service/rdb/rdb_service_stub.cpp +++ b/services/distributeddataservice/service/rdb/rdb_service_stub.cpp @@ -189,4 +189,4 @@ int RdbServiceStub::OnRemoteRequest(uint32_t code, MessageParcel& data, MessageP } return IPCObjectStub::OnRemoteRequest(code, data, reply, option); } -} \ No newline at end of file +} // namespace OHOS::DistributedRdb diff --git a/services/distributeddataservice/service/rdb/rdb_service_stub.h b/services/distributeddataservice/service/rdb/rdb_service_stub.h index a6c1e6217..76a5f3a46 100644 --- a/services/distributeddataservice/service/rdb/rdb_service_stub.h +++ b/services/distributeddataservice/service/rdb/rdb_service_stub.h @@ -71,5 +71,5 @@ private: [RDB_SERVICE_CMD_UNSUBSCRIBE] = &RdbServiceStub::OnRemoteDoUnSubscribe, }; }; -} +} // namespace OHOS::DistributedRdb #endif diff --git a/services/distributeddataservice/service/rdb/rdb_store_observer_impl.cpp b/services/distributeddataservice/service/rdb/rdb_store_observer_impl.cpp index bc5a16f56..036eedb8d 100644 --- a/services/distributeddataservice/service/rdb/rdb_store_observer_impl.cpp +++ b/services/distributeddataservice/service/rdb/rdb_store_observer_impl.cpp @@ -38,4 +38,4 @@ void RdbStoreObserverImpl::OnChange(const DistributedDB::StoreChangedData &data) owner_->OnDataChange(pid_, data); } } -} +} // namespace OHOS::DistributedRdb diff --git a/services/distributeddataservice/service/rdb/rdb_store_observer_impl.h b/services/distributeddataservice/service/rdb/rdb_store_observer_impl.h index 87615d1d5..e0043f5f9 100644 --- a/services/distributeddataservice/service/rdb/rdb_store_observer_impl.h +++ b/services/distributeddataservice/service/rdb/rdb_store_observer_impl.h @@ -33,5 +33,5 @@ private: pid_t pid_ {}; RdbServiceImpl* owner_ {}; }; -} +} // namespace OHOS::DistributedRdb #endif diff --git a/services/distributeddataservice/service/rdb/rdb_syncer.cpp b/services/distributeddataservice/service/rdb/rdb_syncer.cpp index a1813e3b2..89436bf71 100644 --- a/services/distributeddataservice/service/rdb/rdb_syncer.cpp +++ b/services/distributeddataservice/service/rdb/rdb_syncer.cpp @@ -108,7 +108,7 @@ int32_t RdbSyncer::Init(pid_t pid, pid_t uid) int32_t RdbSyncer::CreateMetaData() { DistributedKv::KvStoreMetaData meta; - meta.kvStoreType =static_cast(RDB_DEVICE_COLLABORATION); + meta.kvStoreType = static_cast(RDB_DEVICE_COLLABORATION); meta.appId = GetAppId(); meta.appType = "harmony"; meta.bundleName = GetBundleName(); @@ -332,4 +332,4 @@ int32_t RdbSyncer::DoAsync(const SyncOption &option, const RdbPredicates &predic callback(result); }, false); } -} \ No newline at end of file +} // namespace OHOS::DistributedRdb diff --git a/services/distributeddataservice/service/rdb/rdb_syncer.h b/services/distributeddataservice/service/rdb/rdb_syncer.h index 23039ed1a..7d2195063 100644 --- a/services/distributeddataservice/service/rdb/rdb_syncer.h +++ b/services/distributeddataservice/service/rdb/rdb_syncer.h @@ -96,5 +96,5 @@ private: static constexpr int DECIMAL_BASE = 10; }; -} +} // namespace OHOS::DistributedRdb #endif diff --git a/services/distributeddataservice/service/test/config_factory_test.cpp b/services/distributeddataservice/service/test/config_factory_test.cpp index 362dcdcd7..0ea7e8b40 100644 --- a/services/distributeddataservice/service/test/config_factory_test.cpp +++ b/services/distributeddataservice/service/test/config_factory_test.cpp @@ -116,4 +116,4 @@ HWTEST_F(ConfigFactoryTest, NetworkConfig, TestSize.Level0) ASSERT_EQ(networks->protocols[0].name, "OHOS softbus"); ASSERT_EQ(networks->protocols[0].address, "ohos.distributeddata"); ASSERT_EQ(networks->protocols[0].transport, "softbus"); -} \ No newline at end of file +}