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