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 #include "ipc_callbacks/rs_isurface_occlusion_change_callback_ipc_interface_code_access_verifier.h"
17 
18 namespace OHOS {
19 namespace Rosen {
20 RSISurfaceOcclusionChangeCallbackInterfaceCodeAccessVerifier::
RSISurfaceOcclusionChangeCallbackInterfaceCodeAccessVerifier()21     RSISurfaceOcclusionChangeCallbackInterfaceCodeAccessVerifier()
22 {
23     CheckCodeUnderlyingTypeStandardized<CodeEnumType>(codeEnumTypeName_);
24 }
25 
IsExclusiveVerificationPassed(CodeUnderlyingType code)26 bool RSISurfaceOcclusionChangeCallbackInterfaceCodeAccessVerifier::IsExclusiveVerificationPassed(
27     CodeUnderlyingType code)
28 {
29     bool hasPermission = true;
30     switch (code) {
31         case static_cast<CodeUnderlyingType>(CodeEnumType::ON_SURFACE_OCCLUSION_VISIBLE_CHANGED): {
32             /* to implement access interception */
33             break;
34         }
35         default: {
36             break;
37         }
38     }
39     return hasPermission;
40 }
41 } // namespace Rosen
42 } // namespace OHOS
43