1 /* 2 * Copyright (c) 2023 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef HDI_COMPOSER_UT_H 17 #define HDI_COMPOSER_UT_H 18 19 #include <condition_variable> 20 #include <iremote_broker.h> 21 #include <mutex> 22 #include <vector> 23 24 #include "v1_2/display_composer_type.h" 25 #include "v1_0/display_buffer_type.h" 26 #include "v1_2/include/idisplay_composer_interface.h" 27 #include "display_test_utils.h" 28 #include "gtest/gtest.h" 29 30 namespace OHOS { 31 namespace HDI { 32 namespace Display { 33 namespace TEST { 34 using namespace OHOS::HDI::Display::Buffer::V1_0; 35 using namespace OHOS::HDI::Display::Composer::V1_2; 36 37 class DeathTest : public ::testing::Test { 38 public: 39 sptr<Composer::V1_2::IDisplayComposerInterface> displayComposer_; 40 }; 41 } // namespace SYSTEMTEST 42 } // namespace Display 43 } // namespace HDI 44 } // namespace OHOS 45 46 namespace OHOS { 47 class ComposerDiedRecipient : public IRemoteObject::DeathRecipient { 48 public: 49 ComposerDiedRecipient() = default; 50 virtual ~ComposerDiedRecipient() = default; 51 void OnRemoteDied(const wptr<IRemoteObject>& remote) override; 52 }; 53 } 54 #endif // HDI_DEVICE_SYSTEM_TEST_H