1 /* 2 * Copyright (c) 2025 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 EVENT_MONITOR_FUZZER_H 17 #define EVENT_MONITOR_FUZZER_H 18 19 20 #include <fuzzer/FuzzedDataProvider.h> 21 #include "battery_level_strategy.h" 22 #include "battery_strategy.h" 23 #include "camera_strategy.h" 24 #include "charging_strategy.h" 25 #include "screen_strategy.h" 26 #include "thermal_strategy.h" 27 #include "command/event_status_change_command.h" 28 #include "events_info.h" 29 #include "events_monitor.h" 30 #include "events_subscriber.h" 31 #include "ievents_listener.h" 32 33 34 namespace OHOS { 35 namespace CameraStandard { 36 namespace DeferredProcessing { 37 38 class EventMonitorFuzzer { 39 public: 40 41 static std::shared_ptr<BatteryLevelStrategy> batterylevelstrategyfuzz_; 42 static std::shared_ptr<BatteryStrategy> batterystrategyfuzz_; 43 static std::shared_ptr<CameraStrategy> camerastrategyfuzz_; 44 static std::shared_ptr<ChargingStrategy> chargingstrategyfuzz_; 45 static std::shared_ptr<ScreenStrategy> screenstrategyfuzz_; 46 static std::shared_ptr<ThermalStrategy> thermalstrategyfuzz_; 47 static std::shared_ptr<EventStatusChangeCommand> eventstatuschangecommandfuzz_; 48 static std::shared_ptr<EventsInfo> eventsinfofuzz_; 49 static std::shared_ptr<EventsMonitor> eventsmonitorfuzz_; 50 51 static void EventMonitorCameraStrategyFuzzTest(FuzzedDataProvider& fdp); 52 }; 53 } 54 } //CameraStandard 55 } //OHOS 56 #endif //EVENT_MONITOR_FUZZER_H