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_DISTRIBUTED_SCHED_TYPES_H 17 #define OHOS_DISTRIBUTED_SCHED_TYPES_H 18 19 #include <string> 20 21 namespace OHOS { 22 namespace DistributedSchedule { 23 class ContinueInfo { 24 public: 25 std::string srcNetworkId_; 26 std::string dstNetworkId_; 27 }; 28 29 enum DSchedEventType { 30 DMS_UNKNOW = -1, 31 DMS_CONTINUE = 0, 32 DMS_COLLABORATION = 1, 33 DMS_ALL = 2, 34 }; 35 36 enum DSchedEventState { 37 DMS_DSCHED_EVENT_INIT = 0, 38 DMS_DSCHED_EVENT_START = 1, 39 DMS_DSCHED_EVENT_PROCESSING = 2, 40 DMS_DSCHED_EVENT_STOP = 3, 41 DMS_DSCHED_EVENT_FINISH = 4, 42 }; 43 44 class EventNotify { 45 public: 46 int32_t eventResult_ = -1; 47 std::string srcNetworkId_ = ""; 48 std::string dstNetworkId_ = ""; 49 std::string srcBundleName_ = ""; 50 std::string srcModuleName_ = ""; 51 std::string srcAbilityName_ = ""; 52 std::string destBundleName_ = ""; 53 std::string destModuleName_ = ""; 54 std::string destAbilityName_ = ""; 55 std::string developerId_ = ""; 56 DSchedEventType dSchedEventType_ = DMS_UNKNOW; 57 DSchedEventState state_ = DMS_DSCHED_EVENT_INIT; 58 }; 59 } // namespace DistributedSchedule 60 } // namespace OHOS 61 #endif // OHOS_DISTRIBUTED_SCHED_TYPES_H