• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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/surface_capture_callback_ipc_interface_code_access_verifier.h"
17 
18 namespace OHOS {
19 namespace Rosen {
RSISurfaceCaptureCallbackInterfaceCodeAccessVerifier()20 RSISurfaceCaptureCallbackInterfaceCodeAccessVerifier::RSISurfaceCaptureCallbackInterfaceCodeAccessVerifier()
21 {
22 #ifdef ENABLE_IPC_SECURITY
23     CheckCodeUnderlyingTypeStandardized<CodeEnumType>(codeEnumTypeName_);
24 #endif
25 }
26 
InitializeAccessMap()27 void RSISurfaceCaptureCallbackInterfaceCodeAccessVerifier::InitializeAccessMap()
28 {
29 #ifdef ENABLE_IPC_SECURITY
30     // next: specify the initialization of accessMap_ here
31     accessMap_ = {};
32 #endif
33 }
34 
IsExtraVerificationPassed(CodeUnderlyingType,const std::string &)35 bool RSISurfaceCaptureCallbackInterfaceCodeAccessVerifier::IsExtraVerificationPassed(
36     CodeUnderlyingType /* code */, const std::string& /* caller */)
37 {
38     // Since no exclusive verification rule is temporarily required by this verifier, directly return true.
39     // If any exclusive rule is required in the future, overwrite this function.
40     return true;
41 }
42 } // namespace Rosen
43 } // namespace OHOS
44