199552fe9Sopenharmony_ci/*
299552fe9Sopenharmony_ci * Copyright (c) 2023 Huawei Device Co., Ltd.
399552fe9Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
499552fe9Sopenharmony_ci * you may not use this file except in compliance with the License.
599552fe9Sopenharmony_ci * You may obtain a copy of the License at
699552fe9Sopenharmony_ci *
799552fe9Sopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
899552fe9Sopenharmony_ci *
999552fe9Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software
1099552fe9Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
1199552fe9Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1299552fe9Sopenharmony_ci * See the License for the specific language governing permissions and
1399552fe9Sopenharmony_ci * limitations under the License.
1499552fe9Sopenharmony_ci */
1599552fe9Sopenharmony_ci
1699552fe9Sopenharmony_ci#ifndef FOUNDATION_RESOURCESCHEDULE_STANDBY_SERVICE_PLUGINS_EXT_INCLUDE_STANDBY_MESSAGE_H
1799552fe9Sopenharmony_ci#define FOUNDATION_RESOURCESCHEDULE_STANDBY_SERVICE_PLUGINS_EXT_INCLUDE_STANDBY_MESSAGE_H
1899552fe9Sopenharmony_ci
1999552fe9Sopenharmony_ci#include <cstdint>
2099552fe9Sopenharmony_ci#include <string>
2199552fe9Sopenharmony_ci#include <memory>
2299552fe9Sopenharmony_ci#include <unordered_map>
2399552fe9Sopenharmony_ci#include <optional>
2499552fe9Sopenharmony_ci
2599552fe9Sopenharmony_ci#include "want.h"
2699552fe9Sopenharmony_ci
2799552fe9Sopenharmony_ci#include "common_constant.h"
2899552fe9Sopenharmony_ci
2999552fe9Sopenharmony_cinamespace OHOS {
3099552fe9Sopenharmony_cinamespace DevStandbyMgr {
3199552fe9Sopenharmony_cistruct StandbyMessageType {
3299552fe9Sopenharmony_ci    enum : uint32_t {
3399552fe9Sopenharmony_ci        COMMON_EVENT = 1,
3499552fe9Sopenharmony_ci        STATE_TRANSIT,
3599552fe9Sopenharmony_ci        PHASE_TRANSIT,
3699552fe9Sopenharmony_ci        RES_CTRL_CONDITION_CHANGED,  // day and night switch
3799552fe9Sopenharmony_ci        ALLOW_LIST_CHANGED,
3899552fe9Sopenharmony_ci        SCREEN_OFF_HALF_HOUR,
3999552fe9Sopenharmony_ci        BG_TASK_STATUS_CHANGE,  // application apply or unapply background task, start or stop work scheduler
4099552fe9Sopenharmony_ci        SYS_ABILITY_STATUS_CHANGED,  // system ability is added or removed
4199552fe9Sopenharmony_ci        PROCESS_STATE_CHANGED,  // process is created or died
4299552fe9Sopenharmony_ci        DEVICE_STATE_CHANGED,  // process is created or died
4399552fe9Sopenharmony_ci        USER_SLEEP_STATE_CHANGED, // user is sleep or not
4499552fe9Sopenharmony_ci        DEVICE_NET_IDLE_POLICY_TRANSIT, // netlimit or not
4599552fe9Sopenharmony_ci        BG_EFFICIENCY_RESOURCE_APPLY, // application apply or unapply efficiency resources
4699552fe9Sopenharmony_ci        NAT_DETECT_INTERVAL_CHANGED, // push report nat timeout interval
4799552fe9Sopenharmony_ci        FG_APPLICATION_CHANGED,
4899552fe9Sopenharmony_ci        SCREEN_CLICK_RECOGNIZE,
4999552fe9Sopenharmony_ci        MMI_INPUT_POWER_KEY_DOWN,  //power key down event
5099552fe9Sopenharmony_ci    };
5199552fe9Sopenharmony_ci};
5299552fe9Sopenharmony_ci
5399552fe9Sopenharmony_cistruct StandbyMessage {
5499552fe9Sopenharmony_ci    StandbyMessage() = default;
5599552fe9Sopenharmony_ci    explicit StandbyMessage(uint32_t eventId): eventId_(eventId) {}
5699552fe9Sopenharmony_ci    StandbyMessage(uint32_t eventId, const std::string& action): eventId_(eventId), action_(action) {}
5799552fe9Sopenharmony_ci
5899552fe9Sopenharmony_ci    uint32_t eventId_ {0};
5999552fe9Sopenharmony_ci    std::string action_ {""};
6099552fe9Sopenharmony_ci    std::optional<AAFwk::Want> want_ {};
6199552fe9Sopenharmony_ci};
6299552fe9Sopenharmony_ci}  // namespace DevStandbyMgr
6399552fe9Sopenharmony_ci}  // namespace OHOS
6499552fe9Sopenharmony_ci#endif  // FOUNDATION_RESOURCESCHEDULE_STANDBY_SERVICE_PLUGINS_EXT_INCLUDE_STANDBY_MESSAGE_H
65