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 VIDEO_PROCESS_COMMAND_FUZZER_H 17 #define VIDEO_PROCESS_COMMAND_FUZZER_H 18 19 #include "video_process_command.h" 20 namespace OHOS { 21 namespace CameraStandard { 22 namespace DeferredProcessing { 23 24 class VideoProcessCommandFuzzer { 25 public: 26 static void VideoProcessCommandFuzzTest(); 27 28 class VideoProcessCommandFuzz : public VideoProcessCommand { 29 public: VideoProcessCommandFuzz(const int32_t userId)30 explicit VideoProcessCommandFuzz(const int32_t userId) : VideoProcessCommand(userId) {} Executing()31 int32_t Executing() override 32 { 33 return 0; 34 } GetCommandName()35 const char* GetCommandName() const override 36 { 37 return "0"; 38 } 39 }; 40 41 class VideoProcessSuccessFuzz : public VideoProcessSuccessCommand { 42 public: VideoProcessSuccessFuzz(const int32_t userId,const std::string & videoId)43 VideoProcessSuccessFuzz(const int32_t userId, 44 const std::string& videoId) : VideoProcessSuccessCommand(userId, videoId) {} Executing()45 int32_t Executing() override 46 { 47 return 0; 48 } GetCommandName()49 const char* GetCommandName() const override 50 { 51 return "0"; 52 } 53 }; 54 55 class VideoProcessFailedFuzz : public VideoProcessFailedCommand { 56 public: VideoProcessFailedFuzz(const int32_t userId,const std::string & videoId,DpsError errorCode)57 VideoProcessFailedFuzz(const int32_t userId, const std::string& videoId, 58 DpsError errorCode) : VideoProcessFailedCommand(userId, videoId, errorCode) {} Executing()59 int32_t Executing() override 60 { 61 return 0; 62 } GetCommandName()63 const char* GetCommandName() const override 64 { 65 return "0"; 66 } 67 }; 68 }; 69 } //DeferredProcessing 70 } //CameraStandard 71 } //OHOS 72 #endif //VIDEO_PROCESS_COMMAND_FUZZER_H 73 74