• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 DEFERREDPROCESSING_SESSION_CALLBACK_FUZZER_H
17 #define DEFERREDPROCESSING_SESSION_CALLBACK_FUZZER_H
18 #include <iostream>
19 #include "deferred_video_processing_session.h"
20 #include "ideferred_video_processing_session_callback.h"
21 #include "deferred_video_processing_session_callback_stub.h"
22 
23 namespace OHOS {
24 namespace CameraStandard {
25 using namespace DeferredProcessing;
26 
27 class DeferredVideoProcessingSessionCallbackStubFuzz : public DeferredVideoProcessingSessionCallbackStub {
28 public:
OnProcessVideoDone(const std::string & videoId,const sptr<IPCFileDescriptor> & fd)29     ErrCode OnProcessVideoDone(
30         const std::string& videoId,
31         const sptr<IPCFileDescriptor>& fd) override
32     {
33         return 0;
34     }
OnError(const std::string & videoId,int32_t errorCode)35     ErrCode OnError(
36         const std::string& videoId,
37         int32_t errorCode) override
38     {
39         return 0;
40     }
OnStateChanged(int32_t status)41     ErrCode OnStateChanged(int32_t status) override
42     {
43         return 0;
44     }
45 };
46 
47 class DeferredVideoProcessingSessionCallbackStubFuzzer {
48 public:
49 static std::shared_ptr<DeferredVideoProcessingSessionCallbackStubFuzz> fuzz_;
50 static void OnRemoteRequest(int32_t code);
51 };
52 } //CameraStandard
53 } //OHOS
54 #endif //DEFERREDPROCESSING_SESSION_CALLBACK_FUZZER_H