diff --git a/interfaces/innerkits/native_cpp/screen_sink/src/callback/dscreen_sink_load_callback.cpp b/interfaces/innerkits/native_cpp/screen_sink/src/callback/dscreen_sink_load_callback.cpp index 1c8fd77a9be04f0564a8687e66d980e92a8c5c55..d97cd61b250af9f3f57366a5787a903b6f4dda3c 100644 --- a/interfaces/innerkits/native_cpp/screen_sink/src/callback/dscreen_sink_load_callback.cpp +++ b/interfaces/innerkits/native_cpp/screen_sink/src/callback/dscreen_sink_load_callback.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -50,5 +50,5 @@ void DScreenSinkLoadCallback::OnLoadSystemAbilityFail(int32_t systemAbilityId) ReportSaFail(DSCREEN_INIT_FAIL, ERR_DH_SCREEN_SA_SINKPROXY_NOT_INIT, systemAbilityId, "dscreen sink OnLoadSystemAbilityFail."); } -} -} \ No newline at end of file +} // namespace DistributedHardware +} // namespace OHOS diff --git a/interfaces/innerkits/native_cpp/screen_source/include/callback/dscreen_source_callback.h b/interfaces/innerkits/native_cpp/screen_source/include/callback/dscreen_source_callback.h index 633c10846b633dbd9529b93fd49da92a10448cb2..11bf819a58a03ff8943eafc02f4d6e14448d26f6 100644 --- a/interfaces/innerkits/native_cpp/screen_source/include/callback/dscreen_source_callback.h +++ b/interfaces/innerkits/native_cpp/screen_source/include/callback/dscreen_source_callback.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -48,6 +48,6 @@ private: std::map> registerCallbackMap_; std::map> unregisterCallbackMap_; }; -} -} +} // namespace DistributedHardware +} // namespace OHOS #endif \ No newline at end of file diff --git a/interfaces/innerkits/native_cpp/screen_source/include/callback/dscreen_source_callback_stub.h b/interfaces/innerkits/native_cpp/screen_source/include/callback/dscreen_source_callback_stub.h index 8f140590b09915fd7f296f79215d5b57100c7ec3..4b12d02d6e0acd0c0b82ed46f353747471a81a99 100644 --- a/interfaces/innerkits/native_cpp/screen_source/include/callback/dscreen_source_callback_stub.h +++ b/interfaces/innerkits/native_cpp/screen_source/include/callback/dscreen_source_callback_stub.h @@ -42,6 +42,6 @@ private: bool CheckParams(const std::string &devId, const std::string &dhId, const std::string &reqId, const std::string &resultData) const; }; -} -} +} // namespace DistributedHardware +} // namespace OHOS #endif \ No newline at end of file diff --git a/interfaces/innerkits/native_cpp/screen_source/include/callback/dscreen_source_load_callback.h b/interfaces/innerkits/native_cpp/screen_source/include/callback/dscreen_source_load_callback.h index 50b433d505f38cd70b5d92d296ba03fd857fc4ac..c4a67cd702a211e947e72935a436b9e8fb47f255 100644 --- a/interfaces/innerkits/native_cpp/screen_source/include/callback/dscreen_source_load_callback.h +++ b/interfaces/innerkits/native_cpp/screen_source/include/callback/dscreen_source_load_callback.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -34,6 +34,6 @@ public: private: std::string params_; }; -} -} +} // namespace DistributedHardware +} // namespace OHOS #endif \ No newline at end of file diff --git a/interfaces/innerkits/native_cpp/screen_source/include/callback/idscreen_source_callback.h b/interfaces/innerkits/native_cpp/screen_source/include/callback/idscreen_source_callback.h index bebc4b0ccdf9d1cd1230a1d89bbe7b053638c09b..35ff8d7e3ac1374b55302e0a7602f3d5bebc96b9 100644 --- a/interfaces/innerkits/native_cpp/screen_source/include/callback/idscreen_source_callback.h +++ b/interfaces/innerkits/native_cpp/screen_source/include/callback/idscreen_source_callback.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -34,6 +34,6 @@ public: virtual int32_t OnNotifyUnregResult(const std::string &devId, const std::string &dhId, const std::string &reqId, int32_t status, const std::string &data) = 0; }; -} -} +} // namespace DistributedHardware +} // namespace OHOS #endif \ No newline at end of file diff --git a/interfaces/innerkits/native_cpp/screen_source/include/dscreen_source_handler.h b/interfaces/innerkits/native_cpp/screen_source/include/dscreen_source_handler.h index a5591d0280388691f1ad0a1a65225e15d210db86..d83f1f4b2ecdf53b440a498dc03a91d9a919f5c3 100644 --- a/interfaces/innerkits/native_cpp/screen_source/include/dscreen_source_handler.h +++ b/interfaces/innerkits/native_cpp/screen_source/include/dscreen_source_handler.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -70,6 +70,6 @@ __attribute__((visibility("default"))) IDistributedHardwareSource *GetSourceHard #ifdef __cplusplus } #endif -} -} +} // namespace DistributedHardware +} // namespace OHOS #endif \ No newline at end of file diff --git a/interfaces/innerkits/native_cpp/screen_source/include/dscreen_source_proxy.h b/interfaces/innerkits/native_cpp/screen_source/include/dscreen_source_proxy.h index da1880821f8985f826a693fc96615e120d68a8c7..3fabdae8640be3b3db3c810e0ff23c798ded0e4c 100644 --- a/interfaces/innerkits/native_cpp/screen_source/include/dscreen_source_proxy.h +++ b/interfaces/innerkits/native_cpp/screen_source/include/dscreen_source_proxy.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -53,6 +53,6 @@ private: bool CheckConfigParams(const std::string &devId, const std::string &dhId, const std::string &key, const std::string &value) const; }; -} -} +} // namespace DistributedHardware +} // namespace OHOS #endif diff --git a/interfaces/innerkits/native_cpp/screen_source/include/idscreen_source.h b/interfaces/innerkits/native_cpp/screen_source/include/idscreen_source.h index 79889069c50d2ab6166f66dc849d47d0919b5834..f877101df9b8a2d6fa91c296c4013ce09cd7b97d 100644 --- a/interfaces/innerkits/native_cpp/screen_source/include/idscreen_source.h +++ b/interfaces/innerkits/native_cpp/screen_source/include/idscreen_source.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -38,6 +38,6 @@ public: virtual void DScreenNotify(const std::string &devId, int32_t eventCode, const std::string &eventContent) = 0; }; -} -} +} // namespace DistributedHardware +} // namespace OHOS #endif \ No newline at end of file diff --git a/interfaces/innerkits/native_cpp/screen_source/src/callback/dscreen_source_callback.cpp b/interfaces/innerkits/native_cpp/screen_source/src/callback/dscreen_source_callback.cpp index b2ad88a0f35eb6308cdba819287e2393ccb324e1..a7707c19f8a18c7f2714929b60af28817008defc 100644 --- a/interfaces/innerkits/native_cpp/screen_source/src/callback/dscreen_source_callback.cpp +++ b/interfaces/innerkits/native_cpp/screen_source/src/callback/dscreen_source_callback.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -90,5 +90,5 @@ void DScreenSourceCallback::PopUnregisterCallback(const std::string &reqId) std::lock_guard lock(unregisterMutex_); unregisterCallbackMap_.erase(reqId); } -} -} \ No newline at end of file +} // namespace DistributedHardware +} // namespace OHOS diff --git a/interfaces/innerkits/native_cpp/screen_source/src/callback/dscreen_source_callback_stub.cpp b/interfaces/innerkits/native_cpp/screen_source/src/callback/dscreen_source_callback_stub.cpp index 3b581a94ccee458fbe3013ee1d76987f9891914a..332d06cb603df5455723d03e0c75ca74e5e9c943 100644 --- a/interfaces/innerkits/native_cpp/screen_source/src/callback/dscreen_source_callback_stub.cpp +++ b/interfaces/innerkits/native_cpp/screen_source/src/callback/dscreen_source_callback_stub.cpp @@ -100,5 +100,5 @@ bool DScreenSourceCallbackStub::CheckParams(const std::string &devId, const std: } return true; } -} -} \ No newline at end of file +} // namespace DistributedHardware +} // namespace OHOS diff --git a/interfaces/innerkits/native_cpp/screen_source/src/callback/dscreen_source_load_callback.cpp b/interfaces/innerkits/native_cpp/screen_source/src/callback/dscreen_source_load_callback.cpp index 190fdc8b36c4f0fadc2b9e7ad20e191417820c09..e5a52b87de7f150c271dad06bff9e6c4ba074b96 100644 --- a/interfaces/innerkits/native_cpp/screen_source/src/callback/dscreen_source_load_callback.cpp +++ b/interfaces/innerkits/native_cpp/screen_source/src/callback/dscreen_source_load_callback.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -46,5 +46,5 @@ void DScreenSourceLoadCallback::OnLoadSystemAbilityFail(int32_t systemAbilityId) ReportSaFail(DSCREEN_INIT_FAIL, ERR_DH_SCREEN_SA_SOURCEPROXY_NOT_INIT, systemAbilityId, "dscreen source OnLoadSystemAbilityFail."); } -} -} +} // namespace DistributedHardware +} // namespace OHOS diff --git a/interfaces/innerkits/native_cpp/screen_source/src/dscreen_source_handler.cpp b/interfaces/innerkits/native_cpp/screen_source/src/dscreen_source_handler.cpp index e1a58f1f5843b502b624c5dba6f83086c22bbf2d..8468baeda8a4b033a9e04bab20103b9b4c272a80 100644 --- a/interfaces/innerkits/native_cpp/screen_source/src/dscreen_source_handler.cpp +++ b/interfaces/innerkits/native_cpp/screen_source/src/dscreen_source_handler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -257,5 +257,5 @@ IDistributedHardwareSource *GetSourceHardwareHandler() DHLOGI("GetSourceHardwareHandler"); return &DScreenSourceHandler::GetInstance(); } -} -} \ No newline at end of file +} // namespace DistributedHardware +} // namespace OHOS diff --git a/interfaces/innerkits/native_cpp/screen_source/src/dscreen_source_proxy.cpp b/interfaces/innerkits/native_cpp/screen_source/src/dscreen_source_proxy.cpp index d8c8b415a92d4b876cd7ce087c59573b799273b5..0e35bcec182965ce365bb7f1458e0114b91d5211 100644 --- a/interfaces/innerkits/native_cpp/screen_source/src/dscreen_source_proxy.cpp +++ b/interfaces/innerkits/native_cpp/screen_source/src/dscreen_source_proxy.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -249,5 +249,5 @@ bool DScreenSourceProxy::CheckConfigParams(const std::string &devId, const std:: } return true; } -} -} +} // namespace DistributedHardware +} // namespace OHOS diff --git a/services/screenservice/test/unittest/sinkservice/dscreenservice/src/dscreen_sink_stub_test.cpp b/services/screenservice/test/unittest/sinkservice/dscreenservice/src/dscreen_sink_stub_test.cpp index 744184ddfd3229f67792ffbbf390248343d38d1b..708220bb6bc740292f6200e5b645e51d78c49312 100644 --- a/services/screenservice/test/unittest/sinkservice/dscreenservice/src/dscreen_sink_stub_test.cpp +++ b/services/screenservice/test/unittest/sinkservice/dscreenservice/src/dscreen_sink_stub_test.cpp @@ -193,7 +193,7 @@ HWTEST_F(DScreenSinkStubTest, DScreenNotify_001, TestSize.Level1) */ HWTEST_F(DScreenSinkStubTest, DScreenNotifyInner_001, TestSize.Level1) { - sptr sinkStub = new TestDScreenSinkStub(); + sptr sinkStub(new TestDScreenSinkStub()); MessageParcel data; MessageParcel reply; MessageOption option; @@ -215,7 +215,7 @@ HWTEST_F(DScreenSinkStubTest, DScreenNotifyInner_001, TestSize.Level1) */ HWTEST_F(DScreenSinkStubTest, DScreenNotifyInner_002, TestSize.Level1) { - sptr sinkStub = new TestDScreenSinkStub(); + sptr sinkStub(new TestDScreenSinkStub()); MessageParcel data; MessageParcel reply; MessageOption option; @@ -237,7 +237,7 @@ HWTEST_F(DScreenSinkStubTest, DScreenNotifyInner_002, TestSize.Level1) */ HWTEST_F(DScreenSinkStubTest, DScreenNotifyInner_003, TestSize.Level1) { - sptr sinkStub = new TestDScreenSinkStub(); + sptr sinkStub(new TestDScreenSinkStub()); MessageParcel data; MessageParcel reply; MessageOption option; @@ -259,7 +259,7 @@ HWTEST_F(DScreenSinkStubTest, DScreenNotifyInner_003, TestSize.Level1) */ HWTEST_F(DScreenSinkStubTest, DScreenNotifyInner_004, TestSize.Level1) { - sptr sinkStub = new TestDScreenSinkStub(); + sptr sinkStub(new TestDScreenSinkStub()); MessageParcel data; MessageParcel reply; MessageOption option; @@ -281,7 +281,7 @@ HWTEST_F(DScreenSinkStubTest, DScreenNotifyInner_004, TestSize.Level1) */ HWTEST_F(DScreenSinkStubTest, DScreenNotifyInner_005, TestSize.Level1) { - sptr sinkStub = new TestDScreenSinkStub(); + sptr sinkStub(new TestDScreenSinkStub()); MessageParcel data; MessageParcel reply; MessageOption option; diff --git a/services/screenservice/test/unittest/sourceservice/dscreenmgr/1.0/src/screen_manager_adapter_test.cpp b/services/screenservice/test/unittest/sourceservice/dscreenmgr/1.0/src/screen_manager_adapter_test.cpp index 77d75ecd4ce4030315c05cc7c9d9469efac0429e..127997d7d74e7ce5876595812709414960979387 100644 --- a/services/screenservice/test/unittest/sourceservice/dscreenmgr/1.0/src/screen_manager_adapter_test.cpp +++ b/services/screenservice/test/unittest/sourceservice/dscreenmgr/1.0/src/screen_manager_adapter_test.cpp @@ -136,7 +136,7 @@ HWTEST_F(DScreenManagerAdapterTest, RegisterScreenGroupListener_001, TestSize.Le */ HWTEST_F(DScreenManagerAdapterTest, RegisterScreenGroupListener_002, TestSize.Level1) { - sptr listener = new MockScreenGroupListener(); + sptr listener(new MockScreenGroupListener()); ScreenMgrAdapter::GetInstance().listenerRegistered_ = true; int32_t ret = ScreenMgrAdapter::GetInstance().RegisterScreenGroupListener(listener); EXPECT_EQ(DH_SUCCESS, ret); @@ -150,7 +150,7 @@ HWTEST_F(DScreenManagerAdapterTest, RegisterScreenGroupListener_002, TestSize.Le */ HWTEST_F(DScreenManagerAdapterTest, RegisterScreenGroupListener_003, TestSize.Level1) { - sptr listener = new MockScreenGroupListener(); + sptr listener(new MockScreenGroupListener()); ScreenMgrAdapter::GetInstance().listenerRegistered_ = false; int32_t ret = ScreenMgrAdapter::GetInstance().RegisterScreenGroupListener(listener); EXPECT_EQ(DH_SUCCESS, ret); @@ -179,7 +179,7 @@ HWTEST_F(DScreenManagerAdapterTest, UnregisterScreenGroupListener_001, TestSize. */ HWTEST_F(DScreenManagerAdapterTest, UnregisterScreenGroupListener_002, TestSize.Level1) { - sptr listener = new MockScreenGroupListener(); + sptr listener(new MockScreenGroupListener()); ScreenMgrAdapter::GetInstance().listenerRegistered_ = false; int32_t ret = ScreenMgrAdapter::GetInstance().UnregisterScreenGroupListener(listener); EXPECT_EQ(DH_SUCCESS, ret); @@ -193,7 +193,7 @@ HWTEST_F(DScreenManagerAdapterTest, UnregisterScreenGroupListener_002, TestSize. */ HWTEST_F(DScreenManagerAdapterTest, UnregisterScreenGroupListener_003, TestSize.Level1) { - sptr listener = new MockScreenGroupListener(); + sptr listener(new MockScreenGroupListener()); ScreenMgrAdapter::GetInstance().listenerRegistered_ = true; int32_t ret = ScreenMgrAdapter::GetInstance().UnregisterScreenGroupListener(listener); EXPECT_EQ(ERR_DH_SCREEN_SA_UNREGISTER_SCREENLISTENER_FAIL, ret); diff --git a/services/screentransport/screensourceprocessor/encoder/include/idscreen_dbg_itf.h b/services/screentransport/screensourceprocessor/encoder/include/idscreen_dbg_itf.h index a60aa87026cf920a8e771621daa49441486d14b1..6583fe0041dfcb1d4b923eb8825b1aa2f628910f 100644 --- a/services/screentransport/screensourceprocessor/encoder/include/idscreen_dbg_itf.h +++ b/services/screentransport/screensourceprocessor/encoder/include/idscreen_dbg_itf.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2023-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -34,6 +34,6 @@ public: }; extern "C" __attribute__((visibility("default"))) IDScreenDBGItf *GetDBGItf(); extern "C" __attribute__((visibility("default"))) IImageSetDirty *GetImageSetDirty(); -} -} +} // namespace DistributedHardware +} // namespace OHOS #endif \ No newline at end of file