1 /* 2 * Copyright (c) 2023 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 60 extern const std::string PREVIOUS_STATE; 61 extern const std::string CURRENT_STATE; 62 extern const std::string PREVIOUS_PHASE; 63 extern const std::string CURRENT_PHASE; 64 extern const std::string SENSOR_DETECTION; 65 extern const std::string RES_CTRL_CONDITION; 66 extern const std::string SCR_OFF_HALF_HOUR_STATUS; 67 extern const std::string BG_TASK_TYPE; 68 extern const std::string BG_TASK_STATUS; 69 extern const std::string BG_TASK_UID; 70 extern const std::string BG_TASK_PID; 71 extern const std::string BG_TASK_BUNDLE_NAME; 72 extern const std::string SA_STATUS; 73 extern const std::string SA_ID; 74 75 extern const std::string CONTINUOUS_TASK; 76 extern const std::string TRANSIENT_TASK; 77 extern const std::string WORK_SCHEDULER; 78 79 extern const std::string LID_CLOSE; 80 extern const std::string LID_OPEN; 81 82 extern const uint32_t NO_DUMP_PARAM_NUMS; 83 extern const uint32_t DUMP_DETAILED_INFO_MAX_NUMS; 84 extern const uint32_t DUMP_SLEEP_SWITCH_PARAM_NUMS; 85 extern const uint32_t DUMP_SLEEP_ENTER_STATE_NUMS; 86 extern const uint32_t DUMP_SLEEP_ALLOW_LIST_NUMS; 87 extern const uint32_t DUMP_SLEEP_APPLY_ALLOW_LIST_NUMS; 88 extern const uint32_t DUMP_SWITCH_PARAM_NUMS; 89 extern const uint32_t DUMP_STATE_TIMEOUT_PARAM_NUMS; 90 91 extern const std::string DUMP_ON; 92 extern const std::string DUMP_OFF; 93 extern const std::string DUMP_SLEEP_MODE; 94 extern const std::string DUMP_DAYTIME_SLEEP_MODE; 95 extern const std::string DUMP_NIGHTTIME_SLEEP_MODE; 96 extern const std::string DUMP_DEBUG_SWITCH; 97 extern const std::string DUMP_RESET_STATE; 98 extern const std::string DUMP_DETAIL_CONFIG; 99 extern const std::string DUMP_STRATGY_DETAIL; 100 extern const std::string DUMP_POWEROFF_STRATEGY; 101 extern const std::string DUMP_POWERSAVE_FIREWALL; 102 103 extern const std::string DUMP_DETAIL_INFO; 104 extern const std::string DUMP_ENTER_STATE; 105 extern const std::string DUMP_APPLY_ALLOW_RECORD; 106 extern const std::string DUMP_SIMULATE_SENSOR; 107 extern const std::string DUMP_SUBSCRIBER_OBSERVER; 108 extern const std::string DUMP_TURN_ON_OFF_SWITCH; 109 extern const std::string DUMP_CHANGE_STATE_TIMEOUT; 110 extern const std::string DUMP_PUSH_STRATEGY_CHANGE; 111 extern const int32_t DUMP_FIRST_PARAM; 112 extern const int32_t DUMP_SECOND_PARAM; 113 extern const int32_t DUMP_THIRD_PARAM; 114 extern const int32_t DUMP_FOURTH_PARAM; 115 extern const int32_t DUMP_FIFTH_PARAM; 116 extern const int32_t DUMP_SIXTH_PARAM; 117 extern const int32_t DUMP_SEVENTH_PARAM; 118 119 extern const int32_t NIGHT_ENTRANCE_HOUR; 120 extern const int32_t NIGHT_ENTRANCE_MIN; 121 extern const int32_t DAY_ENTRANCE_HOUR; 122 extern const int32_t DAY_ENTRANCE_MIN; 123 extern const std::string AIRPLANE_MODE_PARAMETER; 124 } // namespace DevStandbyMgr 125 } // namespace OHOS 126 127 #endif // FOUNDATION_RESOURCESCHEDULE_STANDBY_SERVICE_UTILS_COMMON_CONSTANT_H