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 OHOS_DSCHED_CONTINUE_STATE_H 17 #define OHOS_DSCHED_CONTINUE_STATE_H 18 19 #include "ability_manager_client.h" 20 #include "event_handler.h" 21 #include "distributedWant/distributed_want.h" 22 #include "distributedWant/distributed_want_params_wrapper.h" 23 #include "distributed_sched_interface.h" 24 25 namespace OHOS { 26 namespace DistributedSchedule { 27 typedef enum { 28 DSCHED_CONTINUE_SOURCE_START_STATE = 0, 29 DSCHED_CONTINUE_ABILITY_STATE = 1, 30 DSCHED_CONTINUE_SOURCE_WAIT_END_STATE = 2, 31 DSCHED_CONTINUE_SOURCE_END_STATE = 3, 32 33 DSCHED_CONTINUE_SINK_START_STATE = 4, 34 DSCHED_CONTINUE_DATA_STATE = 5, 35 DSCHED_CONTINUE_SINK_WAIT_END_STATE = 6, 36 DSCHED_CONTINUE_SINK_END_STATE = 7 37 } DSchedContinueStateType; 38 39 class DSchedContinue; 40 class DSchedContinueStateMachine; 41 class DSchedContinueState { 42 public: DSchedContinueState()43 DSchedContinueState() {} ~DSchedContinueState()44 virtual ~DSchedContinueState() {} 45 46 virtual int32_t Execute(std::shared_ptr<DSchedContinue> dContinue, 47 const AppExecFwk::InnerEvent::Pointer &event) = 0; 48 virtual DSchedContinueStateType GetStateType() = 0; 49 }; 50 } // namespace DistributedSchedule 51 } // namespace OHOS 52 #endif // OHOS_DSCHED_CONTINUE_STATE_H 53