1 /* 2 * Copyright (c) 2023-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 FOUNDATION_RESOURCESCHEDULE_STANDBY_SERVICE_UTILS_COMMON_CONSTANT_H 17 #define FOUNDATION_RESOURCESCHEDULE_STANDBY_SERVICE_UTILS_COMMON_CONSTANT_H 18 19 #include <string> 20 #include <vector> 21 #include <map> 22 23 namespace OHOS { 24 namespace DevStandbyMgr { 25 extern const std::string TRANSIT_NEXT_STATE_TIMED_TASK; 26 extern const std::string TRANSIT_NEXT_STATE_CONDITION_TASK; 27 extern const std::string TRANSIT_NEXT_PHASE_INSTANT_TASK; 28 extern const std::string REPEATED_MOTION_DETECTION_TASK; 29 30 extern const std::string DEFAULT_PLUGIN_NAME; 31 32 extern const std::string DETECT_MOTION_CONFIG; 33 extern const int32_t REPEATED_MOTION_DETECTION_INTERVAL; 34 extern const std::string DARK_TIMEOUT; 35 extern const std::string NAP_TIMEOUT; 36 extern const std::string NAP_MAINT_DURATION; 37 38 extern const std::string SLEEP_MAINT_DURATOIN; 39 extern const std::string NAP_MAINTENANCE_TIMEOUT; 40 extern const std::string SLEEP_MAINT_TIMEOUT; 41 extern const std::vector<std::string> STATE_NAME_LIST; 42 43 extern const std::string MOTION_THREADSHOLD; 44 45 extern const std::string MOTION_DECTION_TASK; 46 extern const int32_t MOTION_DETECTION_TIMEOUT; 47 extern const int32_t REST_TIMEOUT; 48 extern const int32_t TOTAL_TIMEOUT; 49 extern const int32_t PERIODLY_TASK_DECTION_TIMEOUT; 50 extern const int32_t PERIODLY_TASK_REST_TIMEOUT; 51 extern const int32_t PERIODLY_TASK_TOTAL_TIMEOUT; 52 extern const int64_t SENSOR_SAMPLING_RATE; 53 extern const int64_t SENSOR_REPORTING_RATE; 54 extern const int64_t HALF_HOUR; 55 56 extern const std::string NAP_SWITCH; 57 extern const std::string SLEEP_SWITCH; 58 extern const std::string S3_SWITCH; 59 extern const std::string DEVICE_STANGDY_MODE; 60 61 extern const std::string PREVIOUS_STATE; 62 extern const std::string CURRENT_STATE; 63 extern const std::string PREVIOUS_PHASE; 64 extern const std::string CURRENT_PHASE; 65 extern const std::string SENSOR_DETECTION; 66 extern const std::string RES_CTRL_CONDITION; 67 extern const std::string SCR_OFF_HALF_HOUR_STATUS; 68 extern const std::string NET_IDLE_POLICY_STATUS; 69 extern const std::string BG_TASK_TYPE; 70 extern const std::string BG_TASK_STATUS; 71 extern const std::string BG_TASK_UID; 72 extern const std::string BG_TASK_PID; 73 extern const std::string BG_TASK_BUNDLE_NAME; 74 extern const std::string BG_TASK_RESOURCE_STATUS; 75 extern const std::string SA_STATUS; 76 extern const std::string SA_ID; 77 extern const std::string MESSAGE_TYPE; 78 extern const std::string MESSAGE_ENABLE; 79 extern const std::string MESSAGE_INTERVAL; 80 81 extern const std::string CONTINUOUS_TASK; 82 extern const std::string TRANSIENT_TASK; 83 extern const std::string WORK_SCHEDULER; 84 85 extern const std::string LID_CLOSE; 86 extern const std::string LID_OPEN; 87 88 extern const uint32_t NO_DUMP_PARAM_NUMS; 89 extern const uint32_t DUMP_DETAILED_INFO_MAX_NUMS; 90 extern const uint32_t DUMP_SLEEP_SWITCH_PARAM_NUMS; 91 extern const uint32_t DUMP_SLEEP_ENTER_STATE_NUMS; 92 extern const uint32_t DUMP_SLEEP_ALLOW_LIST_NUMS; 93 extern const uint32_t DUMP_SLEEP_APPLY_ALLOW_LIST_NUMS; 94 extern const uint32_t DUMP_SWITCH_PARAM_NUMS; 95 extern const uint32_t DUMP_STATE_TIMEOUT_PARAM_NUMS; 96 97 extern const std::string DUMP_ON; 98 extern const std::string DUMP_OFF; 99 extern const std::string DUMP_SLEEP_MODE; 100 extern const std::string DUMP_DAYTIME_SLEEP_MODE; 101 extern const std::string DUMP_NIGHTTIME_SLEEP_MODE; 102 extern const std::string DUMP_DEBUG_SWITCH; 103 extern const std::string DUMP_RESET_STATE; 104 extern const std::string DUMP_DETAIL_CONFIG; 105 extern const std::string DUMP_STRATGY_DETAIL; 106 extern const std::string DUMP_POWEROFF_STRATEGY; 107 extern const std::string DUMP_POWERSAVE_FIREWALL; 108 109 extern const std::string DUMP_DETAIL_INFO; 110 extern const std::string DUMP_ENTER_STATE; 111 extern const std::string DUMP_APPLY_ALLOW_RECORD; 112 extern const std::string DUMP_SIMULATE_SENSOR; 113 extern const std::string DUMP_SUBSCRIBER_OBSERVER; 114 extern const std::string DUMP_TURN_ON_OFF_SWITCH; 115 extern const std::string DUMP_CHANGE_STATE_TIMEOUT; 116 extern const std::string DUMP_PUSH_STRATEGY_CHANGE; 117 extern const int32_t DUMP_FIRST_PARAM; 118 extern const int32_t DUMP_SECOND_PARAM; 119 extern const int32_t DUMP_THIRD_PARAM; 120 extern const int32_t DUMP_FOURTH_PARAM; 121 extern const int32_t DUMP_FIFTH_PARAM; 122 extern const int32_t DUMP_SIXTH_PARAM; 123 extern const int32_t DUMP_SEVENTH_PARAM; 124 125 extern const int32_t NIGHT_ENTRANCE_HOUR; 126 extern const int32_t NIGHT_ENTRANCE_MIN; 127 extern const int32_t DAY_ENTRANCE_HOUR; 128 extern const int32_t DAY_ENTRANCE_MIN; 129 extern const std::string AIRPLANE_MODE_PARAMETER; 130 } // namespace DevStandbyMgr 131 } // namespace OHOS 132 133 #endif // FOUNDATION_RESOURCESCHEDULE_STANDBY_SERVICE_UTILS_COMMON_CONSTANT_H