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 ROSEN_RENDER_SERVICE_BASE_IBUFFER_AVAILABLE_CALLBACK_INTERFACE_CODE_ACCESS_VERIFIER_H 17 #define ROSEN_RENDER_SERVICE_BASE_IBUFFER_AVAILABLE_CALLBACK_INTERFACE_CODE_ACCESS_VERIFIER_H 18 19 #include "ipc_security/rs_ipc_interface_code_access_verifier_base.h" 20 #include "ipc_callbacks/buffer_available_callback_ipc_interface_code.h" 21 22 namespace OHOS { 23 namespace Rosen { 24 class RSIBufferAvailableCallbackInterfaceCodeAccessVerifier : public RSInterfaceCodeAccessVerifierBase { 25 public: 26 /* 27 * specify the enum class of the associated interface code (i.e. CodeEnumType) here 28 * note that term **CodeEnumType** should not be changed 29 */ 30 using CodeEnumType = RSIBufferAvailableCallbackInterfaceCode; 31 static inline const std::string codeEnumTypeName_{"RSIBufferAvailableCallbackInterfaceCode"}; 32 33 /* specify constructor and destructor here */ 34 RSIBufferAvailableCallbackInterfaceCodeAccessVerifier(); 35 ~RSIBufferAvailableCallbackInterfaceCodeAccessVerifier() noexcept override = default; 36 37 protected: 38 /* specify exclusive verification rules here */ 39 bool IsExclusiveVerificationPassed(CodeUnderlyingType code) override; 40 41 private: 42 DISALLOW_COPY_AND_MOVE(RSIBufferAvailableCallbackInterfaceCodeAccessVerifier); 43 }; 44 } // namespace Rosen 45 } // namespace OHOS 46 #endif // ROSEN_RENDER_SERVICE_BASE_IBUFFER_AVAILABLE_CALLBACK_INTERFACE_CODE_ACCESS_VERIFIER_H 47