1 /* 2 * Copyright (c) 2024 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 HSTREAM_METADATA_STUB_FUZZER_H 17 #define HSTREAM_METADATA_STUB_FUZZER_H 18 19 #include "hstream_metadata_stub.h" 20 21 namespace OHOS { 22 namespace CameraStandard { 23 24 class HStreamMetadataStubFuzz : public HStreamMetadataStub { 25 public: Start()26 int32_t Start() override 27 { 28 return 0; 29 } Stop()30 int32_t Stop() override 31 { 32 return 0; 33 } SetCallback(sptr<IStreamMetadataCallback> & callback)34 int32_t SetCallback(sptr<IStreamMetadataCallback>& callback) override 35 { 36 return 0; 37 } UnSetCallback()38 int32_t UnSetCallback() override 39 { 40 return 0; 41 } Release()42 int32_t Release() override 43 { 44 return 0; 45 } OperatePermissionCheck(uint32_t interfaceCode)46 int32_t OperatePermissionCheck(uint32_t interfaceCode) override 47 { 48 return 0; 49 } EnableMetadataType(std::vector<int32_t> metadataTypes)50 int32_t EnableMetadataType(std::vector<int32_t> metadataTypes) override 51 { 52 return 0; 53 } DisableMetadataType(std::vector<int32_t> metadataTypes)54 int32_t DisableMetadataType(std::vector<int32_t> metadataTypes) override 55 { 56 return 0; 57 } 58 }; 59 60 class HStreamMetadataStubFuzzer { 61 public: 62 static std::shared_ptr<HStreamMetadataStubFuzz> fuzz_; 63 static void OnRemoteRequest(int32_t code); 64 }; 65 } //CameraStandard 66 } //OHOS 67 #endif //HSTREAM_METADATA_STUB_FUZZER_H