1 /* 2 * Copyright (c) 2022-2025 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 RESSCHED_INTERFACES_INNERKITS_RESSCHED_CLIENT_INCLUDE_RES_TYPE_H 17 #define RESSCHED_INTERFACES_INNERKITS_RESSCHED_CLIENT_INCLUDE_RES_TYPE_H 18 19 #include "res_value.h" 20 21 namespace OHOS { 22 namespace ResourceSchedule { 23 namespace ResType { 24 enum : uint32_t { 25 // first resType 26 RES_TYPE_FIRST = 0, 27 // screen status, value 0 means screen off, value 1 means screen on, else are invalid. 28 RES_TYPE_SCREEN_STATUS = RES_TYPE_FIRST, 29 // app state change event; value means app state; payload:pid,uid,bundleName 30 RES_TYPE_APP_STATE_CHANGE = 1, 31 // ability state change event; value means ability state; payload:pid,uid,bundleName 32 RES_TYPE_ABILITY_STATE_CHANGE = 2, 33 // extension state change event; value means extension state; payload:pid,uid,bundleName 34 RES_TYPE_EXTENSION_STATE_CHANGE = 3, 35 // process state event; value 0:created, 1:died; payload:pid,uid,bundleName 36 RES_TYPE_PROCESS_STATE_CHANGE = 4, 37 // window focused event; value 0:focused, 1:unfocused; payload:pid,uid,bundleName,windowId,windowType,displayId 38 RES_TYPE_WINDOW_FOCUS = 5, 39 // transient task event; value 0:start, 1:finish; payload:pid,uid,bundleName 40 RES_TYPE_TRANSIENT_TASK = 6, 41 // continuous task event; value 0:start, 1:finish; payload:pid,uid,abilityName 42 RES_TYPE_CONTINUOUS_TASK = 7, 43 /* cgroup change event; 44 * value 0:set thread group sched; 1:set thread sched 45 * payload: pid,uid,name,oldGroup,newGroup 46 */ 47 RES_TYPE_CGROUP_ADJUSTER = 8, 48 // ace gestures click_recognizer; value 1 touch event, value 2 click event 49 RES_TYPE_CLICK_RECOGNIZE = 9, 50 // ace pipeline_context.cpp::PushPage(); value 0: push_page_start, 1: push_page_complete 51 RES_TYPE_PUSH_PAGE = 10, 52 // ace slide event recognize; value 1: list fling on; 0: list fling off; 3: slide normal begin, 4: slide normal end. 53 RES_TYPE_SLIDE_RECOGNIZE = 11, 54 // window visibility change, value 1: isVisible, 0: not isVisible, payload:pid,uid,windowId,windowType 55 RES_TYPE_WINDOW_VISIBILITY_CHANGE = 12, 56 // report mmi_service service; value mmi_service tid; payload:uid,pid 57 RES_TYPE_REPORT_MMI_PROCESS = 13, 58 // report render thread; value render tid; payload:uid,pid 59 RES_TYPE_REPORT_RENDER_THREAD = 14, 60 // app install and uninstall event; value 0: uninstall, 1: install; payload:uid,bundleName 61 RES_TYPE_APP_INSTALL_UNINSTALL = 15, 62 // net connect state; value 0:unknow, 1:idle, 2:connecting, 3:connected, 4:disconnecting, 5:disconnected 63 RES_TYPE_WIFI_CONNECT_STATE_CHANGE = 16, 64 // user switch, value means the userId which switch to. 65 RES_TYPE_USER_SWITCH = 17, 66 // user remove, value means the userId which is removed. 67 RES_TYPE_USER_REMOVE = 18, 68 // screen unlock, value 0 means unlock, value 1 means locked. 69 RES_TYPE_SCREEN_LOCK = 19, 70 // bluetooth a2dp connect state, value 1: connected, 3: disconnected. 71 RES_TYPE_BLUETOOTH_A2DP_CONNECT_STATE_CHANGE = 20, 72 // network latency request, value 0: low latency, 1: normal latency, payload: identity 73 RES_TYPE_NETWORK_LATENCY_REQUEST = 21, 74 // call state update; value 0 : active, value 1 : holding, value 2 : dialing, value 3 : alerting, 75 // value 4 : incoming, value 5 : waiting, value 6 : disconnected, value 7 : disconnecting, value 8 : idle 76 RES_TYPE_CALL_STATE_UPDATE = 22, 77 // Other process modify the thread Qos, value for client name id, payload: tid : qos , clientpid, pid 78 RES_TYPE_THREAD_QOS_CHANGE = 23, 79 // audio render state change; value -1 : RENDERER_INVALID, value 0 : RENDERER_NEW, value 1 : RENDERER_PREPARED, 80 // value 2 : RENDERER_RUNNING, value 3 : RENDERER_STOPPED, value 4 : RENDERER_RELEASED, value 5 : RENDERER_PAUSED 81 // payload:uid,sessionId 82 RES_TYPE_AUDIO_RENDER_STATE_CHANGE = 24, 83 // audio ring mode change; value 0 : RINGER_MODE_NORMAL, value 1 : RINGER_MODE_SILENT 84 // value 2 : RINGER_MODE_VIBRATE 85 RES_TYPE_AUDIO_RING_MODE_CHANGE = 25, 86 RES_TYPE_AUDIO_VOLUME_KEY_CHANGE = 26, 87 // app_ability_start_event : a very early app startup stub, when the app process has not been pulled up. 88 // stub position : ability_runtime ability_manager_service.cpp::StartAbilityInner(). 89 // specifically : ability type is PAGE and ability launchMode is not SPECIFIED. 90 RES_TYPE_APP_ABILITY_START = 27, 91 // ace pipeline_context.cpp::PopPage(); value means nothing 92 RES_TYPE_POP_PAGE = 28, 93 // ace web gesture event recognize; value means nothing 94 RES_TYPE_WEB_GESTURE = 29, 95 // info from msdp, means device still state change(enter or exit) 96 RES_TYPE_DEVICE_STILL_STATE_CHANGE = 30, 97 // window resize event; value 0: resize window , value 1: stop resizing window. 98 RES_TYPE_RESIZE_WINDOW = 31, 99 // window move event; value 0: move window, value 1: stop moving window. 100 RES_TYPE_MOVE_WINDOW = 32, 101 // animation transition event; value 0: animation begin, value 1: animation end. 102 RES_TYPE_SHOW_REMOTE_ANIMATION = 33, 103 // load page; value 0: load page begin, value 1: load page end. 104 RES_TYPE_LOAD_PAGE = 34, 105 // report camera state, value 0: camera connect; value 1: camera disconnect 106 RES_TYPE_REPORT_CAMERA_STATE = 35, 107 // report runningLock state, value 0: runningLock disable; value 1: runningLock enable; 108 // value 2: runningLock is proxied; value 3: runningLock is not proxied 109 RES_TYPE_RUNNINGLOCK_STATE = 36, 110 // drag status bar event; value 0: start drag, value 1: stop drag. 111 RES_TYPE_DRAG_STATUS_BAR = 37, 112 // report SceneBoard service, value pid; payload:uid, main_tid, bundleName 113 RES_TYPE_REPORT_SCENE_BOARD = 38, 114 // report key thread for render, value 0 add key Thread, 1 remove key thread, payload: uid, pid, tid, role 115 RES_TYPE_REPORT_KEY_THREAD = 39, 116 // report window state, value 0 add 1 remove, payload: uid, pid, windowId, serialNum state: 0 active 1 inactive 117 RES_TYPE_REPORT_WINDOW_STATE = 40, 118 // report scene sched, value 0 scene on 1 scene off, payload: uid, sceneId 119 RES_TYPE_REPORT_SCENE_SCHED = 41, 120 // web gesture move event; value 0: web gesture move start, value 1: web gesture move end. 121 RES_TYPE_WEB_GESTURE_MOVE = 42, 122 // web slide normal event; value 0: web slide normal start, value 1: web slide normal end. 123 RES_TYPE_WEB_SLIDE_NORMAL = 43, 124 // load url event; value means nothing. 125 RES_TYPE_LOAD_URL = 44, 126 // mousewheel event; value means nothing. 127 RES_TYPE_MOUSEWHEEL = 45, 128 // report webview audio status, value 0 start 1 stop, payload: uid, pid, tid 129 RES_TYPE_WEBVIEW_AUDIO_STATUS_CHANGE = 46, 130 // report entering the multimodalinput state, value means subscribed multimodalinput state. 131 RES_TYPE_MMI_INPUT_STATE = 47, 132 // report anco load protect file config 133 RES_TYPE_ANCO_CUST = 48, 134 // report time zone changed 135 RES_TYPE_TIMEZONE_CHANGED = 50, 136 // report connection status 137 RES_TYPE_CONNECTION_OBSERVER = 51, 138 // report av session create event 139 RES_TYPE_AV_SESSION_ON_SESSION_CREATE = 52, 140 // report av session release event 141 RES_TYPE_AV_SESSION_ON_SESSION_RELEASE = 53, 142 // report av session change event 143 RES_TYPE_AV_SESSION_ON_TOP_SESSION_CHANGE = 54, 144 // report OnAppStateChanged event 145 RES_TYPE_ON_APP_STATE_CHANGED = 55, 146 // report efficiency resources event 147 RES_TYPE_EFFICIENCY_RESOURCES_STATE_CHANGED = 56, 148 // report av_codec state, value 0:codec start info, value 1:codec stop info. 149 RES_TYPE_AV_CODEC_STATE = 57, 150 // 58-64 value do not change 151 RES_TYPE_NITZ_TIME_CHANGED = 58, 152 RES_TYPE_TIME_CHANGED = 59, 153 RES_TYPE_NITZ_TIMEZONE_CHANGED = 60, 154 RES_TYPE_CHARGING_DISCHARGING = 61, 155 RES_TYPE_USB_DEVICE = 62, 156 RES_TYPE_CALL_STATE_CHANGED = 63, 157 RES_TYPE_WIFI_P2P_STATE_CHANGED = 64, 158 159 // last resType 160 //report app associated start to performance radar 161 RES_TYPE_APP_ASSOCIATED_START = 65, 162 //report thermal state event 163 RES_TYPE_THERMAL_STATE = 66, 164 // socperf event begin 165 RES_TYPE_SOCPERF_CUST_EVENT_BEGIN = 67, 166 // socperf event end 167 RES_TYPE_SOCPERF_CUST_EVENT_END = 68, 168 // window drawing content change event 169 RES_TYPE_WINDOW_DRAWING_CONTENT_CHANGE = 69, 170 171 // report vediuo capture start or stop 172 RES_TYPE_REPORT_SCREEN_CAPTURE = 70, 173 // report long frame, value 0 scene on 1 scene off. 174 RES_TYPE_LONG_FRAME = 71, 175 // report key perf scene, value 0 enter scene 1 exit scene. 176 RES_TYPE_KEY_PERF_SCENE = 72, 177 // report super launcher state 178 RES_TYPE_SUPER_LAUNCHER = 73, 179 // report cast screen state 180 RES_TYPE_CAST_SCREEN = 74, 181 // report screen collabroation state 182 RES_TYPR_SCREEN_COLLABROATION = 75, 183 // report sa control app event, eg: start app or stop app 184 RES_TYPE_SA_CONTROL_APP_EVENT = 76, 185 // report CPU load of the entire machine,payload:cpuPercent 186 RES_TYPE_SYSTEM_CPU_LOAD = 77, 187 // report download or upload scene,value 0 enter scene 1 exit scene. 188 RES_TYPE_UPLOAD_DOWNLOAD = 78, 189 // report main screen split,value 0 enter scene 1 exit scene. 190 RES_TYPE_SPLIT_SCREEN = 79, 191 // report main screen floating window,value 0 enter scene 1 exit scene. 192 RES_TYPE_FLOATING_WINDOW = 80, 193 // report event distribute tid, value tid, payload uid, pid. 194 RES_TYPE_REPORT_DISTRIBUTE_TID = 81, 195 // report frame rate 196 RES_TYPE_FRAME_RATE_REPORT = 82, 197 198 // report web screen capture, value 0 start, value 1 stop 199 RES_TYPE_WEBVIEW_SCREEN_CAPTURE = 83, 200 // report video state. value 0 start playing, value 1 stop playing 201 RES_TYPE_WEBVIEW_VIDEO_STATUS_CHANGE = 84, 202 // report location status. value 0 app status, value 1 switch status 203 RES_TYPE_LOCATION_STATUS_CHANGE = 85, 204 // report display mode event, value status, payload mode. 205 RES_TYPE_DEVICE_MODE_STATUS = 88, 206 // report distribute component change 207 RES_TYPE_REPORT_DISTRIBUTE_COMPONENT_CHANGE = 89, 208 // report web drag resize 209 RES_TYPE_WEB_DRAG_RESIZE = 90, 210 // report formCard create start/end 211 RES_TYPE_FORM_STATE_CHANGE_EVENT = 91, 212 // report power mode changed 213 RES_TYPE_POWER_MODE_CHANGED = 92, 214 // report thermal scenario changed 215 RES_TYPE_THERMAL_SCENARIO_REPORT = 93, 216 // report boot completed 217 RES_TYPE_BOOT_COMPLETED = 94, 218 // report continuous application startup 219 RES_TYPE_CONTINUOUS_STARTUP = 95, 220 // report account activating 221 RES_TYPE_ACCOUNT_ACTIVATING = 96, 222 // report silent playback in renderer 223 RES_TYPE_AUDIO_RENDERER_SILENT_PLAYBACK = 97, 224 // report continuous application install 225 RES_TYPE_CONTINUOUS_INSTALL = 98, 226 // report system updated 227 RES_TYPE_FIRST_BOOT_AFTER_SYSTEM_UPGRADE = 99, 228 // report background perceivable scene 229 RES_TYPE_BACKGROUND_PERCEIVABLE_SCENE = 100, 230 // user interaction scene 231 RES_TYPE_USER_INTERACTION_SCENE = 101, 232 // report game sched, value 0 start, value 1 stop 233 RES_TYPE_REPORT_GAME_SCHED = 102, 234 // report send frame event 235 RES_TYPE_SEND_FRAME_EVENT = 103, 236 // report app cold start only perf, value 0 start, value 1 stop 237 RES_TYPE_ONLY_PERF_APP_COLD_START = 104, 238 // report scene rotation, value 0 start, value 1 stop 239 RES_TYPE_SCENE_ROTATION = 105, 240 // report event vsync tid, value tid, payload pid, tid, uid. 241 RES_TYPE_REPORT_VSYNC_TID = 106, 242 // report cloud config update 243 RES_TYPE_CLOUD_CONFIG_UPDATE = 107, 244 // system ability status change 245 RES_TYPE_SYSTEM_ABILITY_STATUS_CHANGE = 108, 246 // mmi status change 247 RES_TYPE_MMI_STATUS_CHANGE = 109, 248 // report media output device change 249 RES_TYPE_OUTPUT_DEVICE_CHANGE = 110, 250 // report device idle 251 RES_TYPE_DEVICE_IDLE = 111, 252 // report media output device change 253 RES_TYPE_BT_SERVICE_EVENT = 112, 254 // report to hisi, let bmm_report begin change 255 RES_TYPE_BMM_MONITER_CHANGE_EVENT = 113, 256 // app frame drop event 257 RES_TYPE_APP_FRAME_DROP = 114, 258 // report rss cloud config update 259 RES_TYPE_RSS_CLOUD_CONFIG_UPDATE = 115, 260 // report game info 261 RES_TYPE_GAME_INFO_NOTIFY = 116, 262 // report power key down 263 RES_TYPE_MMI_INPUT_POWER_KEY = 117, 264 // report application stopped 265 RES_TYPE_APP_STOPPED = 118, 266 // report audio session enter standby 267 RES_TYPE_AUDIO_RENDERER_STANDBY = 119, 268 // game boost event 269 RES_TYPE_APP_GAME_BOOST_EVENT = 120, 270 // show gesture animation from scb 271 RES_TYPE_GESTURE_ANIMATION = 121, 272 // report key touch event 273 RES_TYPE_KEY_EVENT = 122, 274 // report axis event, value 0: start, value 1: stop value 2: update 275 RES_TYPE_AXIS_EVENT = 123, 276 // get game scene information 277 RES_TYPE_GET_GAME_SCENE_INFO = 124, 278 // report multi screen event 279 RES_TYPE_DISPLAY_MULTI_SCREEN = 125, 280 // intent start app 281 RES_TYPE_INTENT_CTRL_APP = 126, 282 // report web slide scroll 283 RES_TYPE_WEB_SLIDE_SCROLL = 127, 284 // crown rotation value 0:start, value 2:end 285 RES_TYPE_CROWN_ROTATION_STATUS = 129, 286 // report red envelope scene 287 RES_TYPE_RED_ENVELOPE = 130, 288 // report Date Share scene 289 RES_TYPE_DATE_SHARE = 131, 290 // report HiCar scene 291 RES_TYPE_HICAR = 132, 292 // Receving abc load event completed 293 RES_TYPE_RECV_ABC_LOAD_COMPLETED = 133, 294 // restype use by BackgroundManager API to set or reset background process priority 295 RES_TYPE_SET_BACKGROUND_PROCESS_PRIORITY = 134, 296 // report pip start 1 is enter 0 is exit 297 RES_TRPE_PIP_STATUS = 135, 298 // frame report from render service 299 RES_TYPE_FRAME_RATE_REPORT_FROM_RS = 136, 300 // report short term load scene 0 is start 1 is end 301 RES_TYPE_SHORT_TERM_LOAD = 137, 302 // report file copy status 303 RES_TYPE_FILE_COPY_STATUS = 139, 304 // report page transition 305 RES_TYPE_PAGE_TRANSITION = 140, 306 // report audio scene 307 RES_TYPE_AUDIO_SCENE_CHANGE = 141, 308 // report voice recognize wake scene 309 RES_TYPE_VOICE_RECOGNIZE_WAKE = 142, 310 // report modem high power abnormal 311 RES_TYPE_MODEM_PA_HIGH_POWER_ABNORMAL = 143, 312 // report param update event 313 RES_TYPE_PARAM_UPADTE_EVENT = 144, 314 // report camera prelaunch event 315 RES_TYPE_CAMERA_PRELAUNCH = 145, 316 // report high frequence load scene 317 RES_TYPE_HIGH_FREQUENCE_LOAD_SCENE_CHANGE = 146, 318 // camera status changed 319 RES_TYPE_CAMERA_STATUS_CHANGE = 147, 320 // report game state change 321 RES_TYPE_REPORT_GAME_STATE_CHANGE = 148, 322 // cust action 323 RES_TYPE_SOCPERF_CUST_ACTION = 149, 324 // recent bulid resType 325 RES_TYPE_RECENT_BUILD = 150, 326 // overlay event 327 RES_TYPE_OVERLAY_EVENT = 151, 328 // report game state change 329 RES_TYPE_DEVICE_ORIENTATION_STATUS = 152, 330 // report wifi power state 331 RES_TYPE_WIFI_POWER_STATE_CHANGE = 153, 332 // report inner audio state 333 RES_TYPE_INNER_AUDIO_STATE = 154, 334 // report battery status change 335 RES_TYPE_REPORT_BATTERY_STATUS_CHANGE = 155, 336 // ability or page switch event 337 RES_TYPE_ABILITY_OR_PAGE_SWITCH = 156, 338 // game with suspend mode 339 RES_TRPE_GAME_SUSPEND_MODE = 157, 340 // report task center start app or close app, value 0: start app, value 1: close app 341 RES_TYPE_APP_OPT_FROM_RECENT = 158, 342 // report three finger swipe direction up, value 0: enter task center, value 1:back to the desktop 343 RES_TYPE_SWIPE_DIRECTION_UP = 159, 344 // report window panel, value 0: minimize, value 1: maxmize, value 2: recovery 345 RES_TYPE_WINDOW_PANEL = 160, 346 // report boker gatt connect 347 RES_TYPE_REPORT_BOKER_GATT_CONNECT = 161, 348 // report main screen split,value 0 enter scene 1 exit scene. 349 RES_TYPE_WINDOW_SPLIT_SCREEN = 162, 350 // report sched mode change 351 RES_TYPE_SCHED_MODE_CHANGE = 163, 352 // report supply level 353 RES_TYPE_SUPPLY_LEVEL = 164, 354 // reset camera rss priority 355 RES_TYPE_CAMERA_RESET_PRIORITY = 165, 356 // report gc qos status change 357 RES_TYPE_GC_THREAD_QOS_STATUS_CHANGE = 166, 358 //report device idle status changed 359 RES_TYPE_DEVICE_IDLE_CHANGED = 167, 360 //report user sleep status changed 361 RES_TYPE_USER_SLEEP_STATE_CHANGED = 168, 362 // report user not care charge sleep 363 RES_TYPE_USER_NOT_CARE_CHARGE_SLEEP = 169, 364 // report app high power consumption 365 RES_TYPE_APP_HIGH_POWER_CONSUMPTION = 170, 366 // set protectlru reclaim ratio 367 RES_TYPE_ADJUST_PROTECTLRU_RECLAIM_RATIO = 171, 368 // report kernel standby failed 369 RES_TYPE_STANDBY_FREEZE_FAILED = 172, 370 // report process pre foreground state change 371 RES_TYPE_PROCESS_PRE_FOREGROUND_CHANGE = 173, 372 // Turbo Mode 373 RES_TYPE_TDP_TURBO = 174, 374 // last async resType 375 ASYNC_RES_TYPE_LAST, 376 // first sync resType 377 SYNC_RES_TYPE_FIRST = ASYNC_RES_TYPE_LAST, 378 // thaw one application 379 SYNC_RES_TYPE_THAW_ONE_APP, 380 // get all suspend state 381 SYNC_RES_TYPE_GET_ALL_SUSPEND_STATE, 382 // get thermal data 383 SYNC_RES_TYPE_GET_THERMAL_DATA, 384 // check shoul force kill process, 385 SYNC_RES_TYPE_SHOULD_FORCE_KILL_PROCESS, 386 // get nweb preload process set 387 SYNC_RES_TYPE_GET_NWEB_PRELOAD_SET, 388 // report preload application 389 RES_TYPE_PRELOAD_APPLICATION, 390 // report to request mutex status 391 SYNC_RES_TYPE_REQUEST_MUTEX_STATUS = 500, 392 // report to check mutex before start 393 SYNC_RES_TYPE_CHECK_MUTEX_BEFORE_START = 501, 394 // report cosmic cube info 395 RES_TYPE_COSMIC_CUBE_STATE_CHANGE = 502, 396 // report SceneBoard raise worker thread priority. value 0: begin, value 1: end. 397 RES_TYPE_RAISE_WORKER_THREAD_PRIORITY = 503, 398 // report to check app is in app inner schedule list 399 RES_TYPE_CHECK_APP_IS_IN_SCHEDULE_LIST, 400 // report dynamically set suspend exempt info 401 RES_TYPE_DYNAMICALLY_SET_SUSPEND_EXEMPT = 505, 402 // get suspend state by uid 403 SYNC_RES_TYPE_GET_SUSPEND_STATE_BY_UID = 506, 404 // get suspend state by pid 405 SYNC_RES_TYPE_GET_SUSPEND_STATE_BY_PID = 507, 406 // last sync resType 407 SYNC_RES_TYPE_LAST, 408 // last resType 409 RES_TYPE_LAST = SYNC_RES_TYPE_LAST, 410 }; 411 } // namespace ResType 412 } // namespace ResourceSchedule 413 } // namespace OHOS 414 415 #endif // RESSCHED_INTERFACES_INNERKITS_RESSCHED_CLIENT_INCLUDE_RES_TYPE_H 416