1 /* 2 * Copyright (c) 2021-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_EVENT_CESFWK_KITS_NATIVE_INCLUDE_COMMON_EVENT_SUPPORT_H 17 #define FOUNDATION_EVENT_CESFWK_KITS_NATIVE_INCLUDE_COMMON_EVENT_SUPPORT_H 18 19 #include <string> 20 #include <vector> 21 22 namespace OHOS { 23 namespace EventFwk { 24 class CommonEventSupport { 25 public: 26 /** 27 * Indicates the action of a common event that the user has finished booting and the system has been loaded. 28 * To subscribe to this common event, your application must have the ohos.permission.RECEIVER_STARTUP_COMPLETED 29 * permission. 30 * This common event can only be published by the system. 31 */ 32 static const std::string COMMON_EVENT_BOOT_COMPLETED; 33 /** 34 * Indicates the action of a common event that the user has finished booting and the system has been loaded but the 35 * screen is still locked. 36 * To subscribe to this common event, your application must have the ohos.permission.RECEIVER_STARTUP_COMPLETED 37 * permission. 38 * This common event can only be published by the system. 39 */ 40 static const std::string COMMON_EVENT_LOCKED_BOOT_COMPLETED; 41 /** 42 * Indicates the action of a common event that the device is being shut down and the final shutdown will proceed. 43 * This is different from sleeping. All unsaved data will be lost after shut down. 44 * This common event can only be published by the system. 45 */ 46 static const std::string COMMON_EVENT_SHUTDOWN; 47 /** 48 * Indicates the action of a common event that the charging state, level, and other information about the battery 49 * have changed. 50 * This common event can only be published by the system. 51 */ 52 static const std::string COMMON_EVENT_BATTERY_CHANGED; 53 /** 54 * Indicates the action of a common event that the battery level is low. 55 * This common event can only be published by the system. 56 */ 57 static const std::string COMMON_EVENT_BATTERY_LOW; 58 /** 59 * Indicates the action of a common event that the battery exit the low state. 60 * This common event can only be published by the system. 61 */ 62 static const std::string COMMON_EVENT_BATTERY_OKAY; 63 /** 64 * Indicates the action of a common event that the device is connected to the external power. 65 * This common event can only be published by the system. 66 */ 67 static const std::string COMMON_EVENT_POWER_CONNECTED; 68 /** 69 * Indicates the action of a common event that the device is disconnected from the external power. 70 * This common event can only be published by the system. 71 */ 72 static const std::string COMMON_EVENT_POWER_DISCONNECTED; 73 74 /** 75 * Indicates the action of a common event that the device screen is off and the device is sleeping. 76 * This common event can only be published by the system. 77 */ 78 static const std::string COMMON_EVENT_SCREEN_OFF; 79 /** 80 * Indicates the action of a common event that the device screen is on and the device is interactive. 81 * This common event can only be published by the system. 82 */ 83 static const std::string COMMON_EVENT_SCREEN_ON; 84 /** 85 * Indicates the action of a common event that the thermal level changed. 86 * This common event can only be published by the system. 87 */ 88 static const std::string COMMON_EVENT_THERMAL_LEVEL_CHANGED; 89 /** 90 * Indicates the action of a common event that the device is idle and charging, 91 * services can do some business on the background. 92 * This common event can only be published by the system. 93 */ 94 static const std::string COMMON_EVENT_CHARGE_IDLE_MODE_CHANGED; 95 /** 96 * Indicates the action of a common event that the user unlocks the device. 97 * This common event can only be published by the system. 98 */ 99 static const std::string COMMON_EVENT_USER_PRESENT; 100 101 /** 102 * Indicates the action of a common event that the system time has changed. 103 * This common event can only be published by the system. 104 */ 105 static const std::string COMMON_EVENT_TIME_TICK; 106 /** 107 * Indicates the action of a common event that the system time is set. 108 * This common event can only be published by the system. 109 */ 110 static const std::string COMMON_EVENT_TIME_CHANGED; 111 /** 112 * Indicates the action of a common event that the system date has changed. 113 * This common event can only be published by the system. 114 */ 115 static const std::string COMMON_EVENT_DATE_CHANGED; 116 /** 117 * Indicates the action of a common event that the system time zone has changed. 118 * This common event can only be published by the system. 119 */ 120 static const std::string COMMON_EVENT_TIMEZONE_CHANGED; 121 122 /** 123 * Indicates the action of a common event that a user closes a temporary system dialog box. 124 * This common event can only be published by the system. 125 */ 126 static const std::string COMMON_EVENT_CLOSE_SYSTEM_DIALOGS; 127 128 /** 129 * Indicates the action of a common event that bundle scan has finished. 130 * This common event can only be published by the system. 131 */ 132 static const std::string COMMON_EVENT_BUNDLE_SCAN_FINISHED; 133 /** 134 * Indicates the action of a common event that a new application package has been installed on the device. 135 * This common event can only be published by the system. 136 */ 137 static const std::string COMMON_EVENT_PACKAGE_ADDED; 138 /** 139 * Indicates the action of a common event that a new version of an installed application package has replaced 140 * the previous one on the device. 141 * This common event can only be published by the system. 142 */ 143 static const std::string COMMON_EVENT_PACKAGE_REPLACED; 144 /** 145 * Indicates the action of a common event that a new version of your application package has replaced 146 * the previous one. This common event is sent only to the application that was replaced. 147 * This common event can only be published by the system. 148 */ 149 static const std::string COMMON_EVENT_MY_PACKAGE_REPLACED; 150 /** 151 * Indicates the action of a common event that an installed application has been uninstalled from the device 152 * with the application data remained. 153 * This common event can only be published by the system. 154 */ 155 static const std::string COMMON_EVENT_PACKAGE_REMOVED; 156 /** 157 * Indicates the action of a common event that an installed bundle has been uninstalled from the device with the 158 * application data remained. 159 * This common event can only be published by the system. 160 */ 161 static const std::string COMMON_EVENT_BUNDLE_REMOVED; 162 /** 163 * Indicates the action of a common event that an installed application, including both the application data and 164 * code, have been completely uninstalled from the device. 165 * This common event can only be published by the system. 166 */ 167 static const std::string COMMON_EVENT_PACKAGE_FULLY_REMOVED; 168 /** 169 * Indicates the action of a common event that an application package has been changed 170 * (for example, a component in the package has been enabled or disabled). 171 * This common event can only be published by the system. 172 */ 173 static const std::string COMMON_EVENT_PACKAGE_CHANGED; 174 /** 175 * Indicates the action of a common event that the user has restarted the application package and killed all its 176 * processes. 177 * This common event can only be published by the system. 178 */ 179 static const std::string COMMON_EVENT_PACKAGE_RESTARTED; 180 /** 181 * Indicates the action of a common event that the user has cleared the application package data. 182 * This common event is published after COMMON_EVENT_PACKAGE_RESTARTED is triggered and the data has been cleared. 183 * This common event can only be published by the system. 184 */ 185 static const std::string COMMON_EVENT_PACKAGE_DATA_CLEARED; 186 /** 187 * Indicates the action of a common event that the user has cleared the application package cache. 188 * This common event can only be published by the system. 189 */ 190 static const std::string COMMON_EVENT_PACKAGE_CACHE_CLEARED; 191 /** 192 * Indicates the action of a common event that application packages have been suspended. 193 * This common event can only be published by the system. 194 */ 195 static const std::string COMMON_EVENT_PACKAGES_SUSPENDED; 196 /** 197 * Indicates the action of a common event that application packages have not been suspended. 198 * This common event can only be published by the system. 199 */ 200 static const std::string COMMON_EVENT_PACKAGES_UNSUSPENDED; 201 /** 202 * Indicates the action of a common event that an application package has been suspended. 203 * This common event can only be published by the system. 204 */ 205 static const std::string COMMON_EVENT_MY_PACKAGE_SUSPENDED; 206 /** 207 * Indicates the action of a common event that an application package has not been suspended. 208 * This common event can only be published by the system. 209 */ 210 static const std::string COMMON_EVENT_MY_PACKAGE_UNSUSPENDED; 211 /** 212 * Indicates the action of a common event that a user ID has been removed from the system. 213 * This common event can only be published by the system. 214 */ 215 static const std::string COMMON_EVENT_UID_REMOVED; 216 /** 217 * Indicates the action of a common event that an installed application is started for the first time. 218 * This common event can only be published by the system. 219 */ 220 static const std::string COMMON_EVENT_PACKAGE_FIRST_LAUNCH; 221 /** 222 * Indicates the action of a common event that an application requires system verification. 223 * This common event can only be published by the system. 224 */ 225 static const std::string COMMON_EVENT_PACKAGE_NEEDS_VERIFICATION; 226 /** 227 * Indicates the action of a common event that an application has been verified by the system. 228 * This common event can only be published by the system. 229 */ 230 static const std::string COMMON_EVENT_PACKAGE_VERIFIED; 231 232 /** 233 * Indicates the action of a common event that applications installed on the external storage become 234 * available for the system. 235 * This common event can only be published by the system. 236 */ 237 static const std::string COMMON_EVENT_EXTERNAL_APPLICATIONS_AVAILABLE; 238 /** 239 * Indicates the action of a common event that applications installed on the external storage become unavailable for 240 * the system. 241 * This common event can only be published by the system. 242 */ 243 static const std::string COMMON_EVENT_EXTERNAL_APPLICATIONS_UNAVAILABLE; 244 245 /** 246 * Indicates the action of a common event that the device state (for example, orientation and locale) has changed. 247 * This common event can only be published by the system. 248 */ 249 static const std::string COMMON_EVENT_CONFIGURATION_CHANGED; 250 /** 251 * Indicates the action of a common event that the device locale has changed. 252 * This common event can only be published by the system. 253 */ 254 static const std::string COMMON_EVENT_LOCALE_CHANGED; 255 256 /** 257 * Indicates the action of a common event that the device storage is insufficient. 258 */ 259 static const std::string COMMON_EVENT_MANAGE_PACKAGE_STORAGE; 260 261 /** 262 * Indicates the action of a common event that one sandbox package is installed. 263 */ 264 static const std::string COMMON_EVENT_SANDBOX_PACKAGE_ADDED; 265 /** 266 * Indicates the action of a common event that one sandbox package is uninstalled. 267 */ 268 static const std::string COMMON_EVENT_SANDBOX_PACKAGE_REMOVED; 269 /** 270 * Indicates the action of a common event that the system is in driving mode. 271 * This is a protected common event, which can be sent only by the system. 272 */ 273 static const std::string COMMON_EVENT_DRIVE_MODE; 274 /** 275 * Indicates the action of a common event that the system is in home mode. 276 * This is a protected common event, which can be sent only by the system. 277 */ 278 static const std::string COMMON_EVENT_HOME_MODE; 279 /** 280 * Indicates the action of a common event that the system is in office mode. 281 * This is a protected common event, which can be sent only by the system. 282 */ 283 static const std::string COMMON_EVENT_OFFICE_MODE; 284 285 /** 286 * Indicates the action of a common event that the window mode is split screen. 287 * This is a protected common event, which can be sent only by the system. 288 */ 289 static const std::string COMMON_EVENT_SPLIT_SCREEN; 290 291 /** 292 * Indicates the action of a common event that the user has been started. 293 */ 294 static const std::string COMMON_EVENT_USER_STARTED; 295 /** 296 * Indicates the action of a common event that the user has been brought to the background. 297 */ 298 static const std::string COMMON_EVENT_USER_BACKGROUND; 299 /** 300 * Indicates the action of a common event that the user has been brought to the foreground. 301 */ 302 static const std::string COMMON_EVENT_USER_FOREGROUND; 303 /** 304 * Indicates the action of a common event that a user switch is happening. 305 * To subscribe to this common event, your application must have the ohos.permission.MANAGE_LOCAL_ACCOUNTS 306 * permission. 307 */ 308 static const std::string COMMON_EVENT_USER_SWITCHED; 309 /** 310 * Indicates the action of a common event that the user is going to be started. 311 * To subscribe to this common event, your application must have the ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS 312 * permission. 313 */ 314 static const std::string COMMON_EVENT_USER_STARTING; 315 /** 316 * Indicates the action of a common event that the credential-encrypted storage has become unlocked 317 * for the current user when the device is unlocked after being restarted. 318 */ 319 static const std::string COMMON_EVENT_USER_UNLOCKED; 320 /** 321 * Indicates the action of a common event that the user is going to be stopped. 322 * To subscribe to this common event, your application must have the ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS 323 * permission. 324 */ 325 static const std::string COMMON_EVENT_USER_STOPPING; 326 /** 327 * Indicates the action of a common event that the user has been stopped. 328 */ 329 static const std::string COMMON_EVENT_USER_STOPPED; 330 /** 331 * Indicates the action of a common event about a login of a user with account ID. 332 * This is a protected common event, which can be sent only by the system. 333 */ 334 static const std::string COMMON_EVENT_HWID_LOGIN; 335 /** 336 * Indicates the action of a common event about a logout of a user with account ID. 337 * This is a protected common event, which can be sent only by the system. 338 */ 339 static const std::string COMMON_EVENT_HWID_LOGOUT; 340 /** 341 * Indicates the action of a common event that the account ID is invalid. 342 * This is a protected common event, which can be sent only by the system. 343 */ 344 static const std::string COMMON_EVENT_HWID_TOKEN_INVALID; 345 /** 346 * Indicates the action of a common event about a logoff of a account ID. 347 * This is a protected common event, which can be sent only by the system. 348 */ 349 static const std::string COMMON_EVENT_HWID_LOGOFF; 350 351 /** 352 * Indicates the action of a common event about the Wi-Fi state, such as enabled and disabled. 353 */ 354 static const std::string COMMON_EVENT_WIFI_POWER_STATE; 355 356 /** 357 * Indicates the action of a common event that the Wi-Fi access point has been scanned and proven to be available. 358 * To subscribe to this common event, your application must have the ohos.permission.LOCATION permission. 359 */ 360 static const std::string COMMON_EVENT_WIFI_SCAN_FINISHED; 361 362 /** 363 * Indicates the action of a common event that the Wi-Fi signal strength (RSSI) has changed. 364 * To subscribe to this common event, your application must have the ohos.permission.GET_WIFI_INFO permission. 365 */ 366 static const std::string COMMON_EVENT_WIFI_RSSI_VALUE; 367 368 /** 369 * Indicates the action of a common event that the Wi-Fi connection state has changed. 370 */ 371 static const std::string COMMON_EVENT_WIFI_CONN_STATE; 372 373 /** 374 * Indicates the action of a common event about the Wi-Fi hotspot state, such as enabled or disabled. 375 */ 376 static const std::string COMMON_EVENT_WIFI_HOTSPOT_STATE; 377 378 /** 379 * Indicates the action of a common event that a client has joined the Wi-Fi hotspot of the current device. You can 380 * register this common event to listen for information about the clients joining your hotspot. 381 * To subscribe to this common event, your application must have the ohos.permission.GET_WIFI_INFO permission. 382 */ 383 static const std::string COMMON_EVENT_WIFI_AP_STA_JOIN; 384 385 /** 386 * Indicates the action of a common event that a client has dropped connection to the Wi-Fi hotspot of the current 387 * device. You can register this common event to listen for information about the clients leaving your hotspot. 388 * To subscribe to this common event, your application must have the ohos.permission.GET_WIFI_INFO permission. 389 */ 390 static const std::string COMMON_EVENT_WIFI_AP_STA_LEAVE; 391 392 /** 393 * Indicates the action of a common event that the state of MPLink (an enhanced Wi-Fi feature) has changed. 394 * To subscribe to this common event, your application must have the ohos.permission.MPLINK_CHANGE_STATE permission. 395 */ 396 static const std::string COMMON_EVENT_WIFI_MPLINK_STATE_CHANGE; 397 398 /** 399 * Indicates the action of a common event that the Wi-Fi P2P connection state has changed. 400 * To subscribe to this common event, your application must have the ohos.permission.GET_WIFI_INFO and 401 * ohos.permission.LOCATION permissions. 402 */ 403 static const std::string COMMON_EVENT_WIFI_P2P_CONN_STATE; 404 405 /** 406 * Indicates the action of a common event about the Wi-Fi P2P state, such as enabled and disabled. 407 * To subscribe to this common event, your application must have the ohos.permission.GET_WIFI_INFO permission. 408 */ 409 static const std::string COMMON_EVENT_WIFI_P2P_STATE_CHANGED; 410 411 /** 412 * Indicates that the Wi-Fi P2P peers state change. 413 * To subscribe to this common event, your application must have the ohos.permission.GET_WIFI_INFO permission. 414 */ 415 static const std::string COMMON_EVENT_WIFI_P2P_PEERS_STATE_CHANGED; 416 417 /** 418 * Indicates that the Wi-Fi P2P discovery state change. 419 * To subscribe to this common event, your application must have the ohos.permission.GET_WIFI_INFO permission. 420 */ 421 static const std::string COMMON_EVENT_WIFI_P2P_PEERS_DISCOVERY_STATE_CHANGED; 422 423 /** 424 * Indicates that the Wi-Fi P2P current device state change. 425 * To subscribe to this common event, your application must have the ohos.permission.GET_WIFI_INFO permission. 426 */ 427 static const std::string COMMON_EVENT_WIFI_P2P_CURRENT_DEVICE_STATE_CHANGED; 428 429 /** 430 * Indicates that the Wi-Fi P2P group info is changed. 431 * To subscribe to this common event, your application must have the ohos.permission.GET_WIFI_INFO permission. 432 */ 433 static const std::string COMMON_EVENT_WIFI_P2P_GROUP_STATE_CHANGED; 434 435 /** 436 * Indicates that network traffic statistics have been updated. 437 */ 438 static const std::string COMMON_EVENT_NETMANAGER_NETSTATES_UPDATED; 439 440 /** 441 * Indicates that the network traffic has exceeded the limit. 442 */ 443 static const std::string COMMON_EVENT_NETMANAGER_NETSTATES_LIMITED; 444 445 /** 446 * Indicates the action of a common event about the connection state of Bluetooth handsfree communication. 447 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission. 448 */ 449 static const std::string COMMON_EVENT_BLUETOOTH_HANDSFREE_AG_CONNECT_STATE_UPDATE; 450 451 /** 452 * Indicates the action of a common event that the device connected to the Bluetooth handsfree is active. 453 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission. 454 */ 455 static const std::string COMMON_EVENT_BLUETOOTH_HANDSFREE_AG_CURRENT_DEVICE_UPDATE; 456 457 /** 458 * Indicates the action of a common event that the connection state of Bluetooth A2DP has changed. 459 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission. 460 */ 461 static const std::string COMMON_EVENT_BLUETOOTH_HANDSFREE_AG_AUDIO_STATE_UPDATE; 462 463 /** 464 * Indicates the action of a common event about the connection state of Bluetooth A2DP. 465 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission. 466 */ 467 static const std::string COMMON_EVENT_BLUETOOTH_A2DPSOURCE_CONNECT_STATE_UPDATE; 468 469 /** 470 * Indicates the action of a common event that the device connected using Bluetooth A2DP is active. 471 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission. 472 */ 473 static const std::string COMMON_EVENT_BLUETOOTH_A2DPSOURCE_CURRENT_DEVICE_UPDATE; 474 475 /** 476 * Indicates the action of a common event that the playing state of Bluetooth A2DP has changed. 477 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission. 478 */ 479 static const std::string COMMON_EVENT_BLUETOOTH_A2DPSOURCE_PLAYING_STATE_UPDATE; 480 481 /** 482 * Indicates the action of a common event that the AVRCP connection state of Bluetooth A2DP has changed. 483 */ 484 static const std::string COMMON_EVENT_BLUETOOTH_A2DPSOURCE_AVRCP_CONNECT_STATE_UPDATE; 485 486 /** 487 * Indicates the action of a common event that the audio codec state of Bluetooth A2DP has changed. 488 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission. 489 */ 490 static const std::string COMMON_EVENT_BLUETOOTH_A2DPSOURCE_CODEC_VALUE_UPDATE; 491 492 /** 493 * Indicates the action of a common event that a remote Bluetooth device has been discovered. 494 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH and 495 * ohos.permission.LOCATION permissions. 496 */ 497 static const std::string COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_DISCOVERED; 498 499 /** 500 * Indicates the action of a common event that the Bluetooth class of a remote Bluetooth device has changed. 501 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission. 502 */ 503 static const std::string COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_CLASS_VALUE_UPDATE; 504 505 /** 506 * Indicates the action of a common event that a low level (ACL) connection has been established with a remote 507 * Bluetooth device. 508 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission. 509 */ 510 static const std::string COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_ACL_CONNECTED; 511 512 /** 513 * Indicates the action of a common event that a low level (ACL) connection has been disconnected from a remote 514 * Bluetooth device. 515 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission. 516 */ 517 static const std::string COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_ACL_DISCONNECTED; 518 519 /** 520 * Indicates the action of a common event that the friendly name of a remote Bluetooth device has been retrieved for 521 * the first time or has been changed since the last retrieval. 522 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission. 523 */ 524 static const std::string COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_NAME_UPDATE; 525 526 /** 527 * Indicates the action of a common event that the connection state of a remote Bluetooth device has changed. 528 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission. 529 */ 530 static const std::string COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_PAIR_STATE; 531 532 /** 533 * Indicates the action of a common event that the battery level of a remote Bluetooth device has been retrieved 534 * for the first time or has been changed since the last retrieval. 535 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission. 536 */ 537 static const std::string COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_BATTERY_VALUE_UPDATE; 538 539 /** 540 * Indicates the action of a common event about the SDP state of a remote Bluetooth device. 541 */ 542 static const std::string COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_SDP_RESULT; 543 544 /** 545 * Indicates the action of a common event about the UUID connection state of a remote Bluetooth device. 546 * To subscribe to this common event, your application must have the ohos.permission.DISCOVER_BLUETOOTH permission. 547 */ 548 static const std::string COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_UUID_VALUE; 549 550 /** 551 * Indicates the action of a common event about the pairing request from a remote Bluetooth device. 552 * To subscribe to this common event, your application must have the ohos.permission.DISCOVER_BLUETOOTH permission. 553 */ 554 static const std::string COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_PAIRING_REQ; 555 556 /** 557 * Indicates the action of a common event that Bluetooth pairing is canceled. 558 */ 559 static const std::string COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_PAIRING_CANCEL; 560 561 /** 562 * Indicates the action of a common event about the connection request from a remote Bluetooth device. 563 */ 564 static const std::string COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_CONNECT_REQ; 565 566 /** 567 * Indicates the action of a common event about the response to the connection request from a remote Bluetooth 568 * device. 569 */ 570 static const std::string COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_CONNECT_REPLY; 571 572 /** 573 * Indicates the action of a common event that the connection to a remote Bluetooth device has been canceled. 574 */ 575 static const std::string COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_CONNECT_CANCEL; 576 577 /** 578 * Indicates the action of a common event that the connection state of a Bluetooth handsfree has changed. 579 */ 580 static const std::string COMMON_EVENT_BLUETOOTH_HANDSFREEUNIT_CONNECT_STATE_UPDATE; 581 582 /** 583 * Indicates the action of a common event that the audio state of a Bluetooth handsfree has changed. 584 */ 585 static const std::string COMMON_EVENT_BLUETOOTH_HANDSFREEUNIT_AUDIO_STATE_UPDATE; 586 587 /** 588 * Indicates the action of a common event that the audio gateway state of a Bluetooth handsfree has changed. 589 */ 590 static const std::string COMMON_EVENT_BLUETOOTH_HANDSFREEUNIT_AG_COMMON_EVENT; 591 592 /** 593 * Indicates the action of a common event that the calling state of a Bluetooth handsfree has changed. 594 */ 595 static const std::string COMMON_EVENT_BLUETOOTH_HANDSFREEUNIT_AG_CALL_STATE_UPDATE; 596 597 /** 598 * Indicates the action of a common event that the state of a Bluetooth adapter has been changed, for example, 599 * Bluetooth has been turned on or off. 600 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission. 601 */ 602 static const std::string COMMON_EVENT_BLUETOOTH_HOST_STATE_UPDATE; 603 604 /** 605 * Indicates the action of a common event about the requests for the user to allow Bluetooth to be scanned. 606 */ 607 static const std::string COMMON_EVENT_BLUETOOTH_HOST_REQ_DISCOVERABLE; 608 609 /** 610 * Indicates the action of a common event about the requests for the user to turn on Bluetooth. 611 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission. 612 */ 613 static const std::string COMMON_EVENT_BLUETOOTH_HOST_REQ_ENABLE; 614 615 /** 616 * Indicates the action of a common event about the requests for the user to turn off Bluetooth. 617 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission. 618 */ 619 static const std::string COMMON_EVENT_BLUETOOTH_HOST_REQ_DISABLE; 620 621 /** 622 * Indicates the action of a common event that the Bluetooth scanning mode of a device has changed. 623 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission. 624 */ 625 static const std::string COMMON_EVENT_BLUETOOTH_HOST_SCAN_MODE_UPDATE; 626 627 /** 628 * Indicates the action of a common event that the Bluetooth scanning has been started on the device. 629 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission. 630 */ 631 static const std::string COMMON_EVENT_BLUETOOTH_HOST_DISCOVERY_STARTED; 632 633 /** 634 * Indicates the action of a common event that the Bluetooth scanning is finished on the device. 635 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission. 636 */ 637 static const std::string COMMON_EVENT_BLUETOOTH_HOST_DISCOVERY_FINISHED; 638 639 /** 640 * Indicates the action of a common event that the Bluetooth adapter name of the device has changed. 641 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission. 642 */ 643 static const std::string COMMON_EVENT_BLUETOOTH_HOST_NAME_UPDATE; 644 645 /** 646 * Indicates the action of a common event that the connection state of Bluetooth A2DP Sink has changed. 647 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission. 648 */ 649 static const std::string COMMON_EVENT_BLUETOOTH_A2DPSINK_CONNECT_STATE_UPDATE; 650 651 /** 652 * Indicates the action of a common event that the playing state of Bluetooth A2DP Sink has changed. 653 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission. 654 */ 655 static const std::string COMMON_EVENT_BLUETOOTH_A2DPSINK_PLAYING_STATE_UPDATE; 656 657 /** 658 * Indicates the action of a common event that the audio state of Bluetooth A2DP Sink has changed. 659 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission. 660 */ 661 static const std::string COMMON_EVENT_BLUETOOTH_A2DPSINK_AUDIO_STATE_UPDATE; 662 663 /** 664 * Indicates the action of a common event that the state of the device NFC adapter has changed. 665 * This is a protected common event, which can be sent only by the system. 666 */ 667 static const std::string COMMON_EVENT_NFC_ACTION_ADAPTER_STATE_CHANGED; 668 669 /** 670 * Indicates the action of a common event that the NFC RF field is detected to be in the enabled state. 671 * To subscribe to this common event, your application must have the ohos.permission.MANAGE_SECURE_SETTINGS 672 * permission. 673 * This is a protected common event, which can be sent only by the system. 674 */ 675 static const std::string COMMON_EVENT_NFC_ACTION_RF_FIELD_ON_DETECTED; 676 677 /** 678 * Indicates the action of a common event that the NFC RF field is detected to be in the disabled state. 679 * To subscribe to this common event, your application must have the ohos.permission.MANAGE_SECURE_SETTINGS 680 * permission. 681 * This is a protected common event, which can be sent only by the system. 682 */ 683 static const std::string COMMON_EVENT_NFC_ACTION_RF_FIELD_OFF_DETECTED; 684 685 /** 686 * Indicates the action of a common event that the system stops charging the battery. 687 * This is a protected common event, which can be sent only by the system. 688 */ 689 static const std::string COMMON_EVENT_DISCHARGING; 690 691 /** 692 * Indicates the action of a common event that the system starts charging the battery. 693 * This is a protected common event, which can be sent only by the system. 694 */ 695 static const std::string COMMON_EVENT_CHARGING; 696 697 /** 698 * Indicates the action of a common event that a charge type has been updated. 699 * This is a protected common event, which can be sent only by the system. 700 */ 701 static const std::string COMMON_EVENT_CHARGE_TYPE_CHANGED; 702 703 /** 704 * Indicates the action of a common event that the system idle mode has changed. 705 * This is a protected common event, which can be sent only by the system. 706 */ 707 static const std::string COMMON_EVENT_DEVICE_IDLE_MODE_CHANGED; 708 709 /** 710 * Indicates the action of a common event that the list of exempt applications is updated in the idle mode. 711 * This is a protected common event, which can be sent only by the system. 712 */ 713 static const std::string COMMON_EVENT_DEVICE_IDLE_EXEMPTION_LIST_UPDATED; 714 715 /** 716 * Indicates the action of a common event that the power save mode of the system has changed. 717 * This is a protected common event, which can be sent only by the system. 718 */ 719 static const std::string COMMON_EVENT_POWER_SAVE_MODE_CHANGED; 720 721 /** 722 * Indicates the action of a common event that a user has been added to the system. 723 * To subscribe to this common event, your application must have the ohos.permission.MANAGE_LOCAL_ACCOUNTS 724 * permission. 725 */ 726 static const std::string COMMON_EVENT_USER_ADDED; 727 /** 728 * Indicates the action of a common event that a user has been removed from the system. 729 * To subscribe to this common event, your application must have the ohos.permission.MANAGE_LOCAL_ACCOUNTS 730 * permission. 731 */ 732 static const std::string COMMON_EVENT_USER_REMOVED; 733 734 /** 735 * Indicates the action of a common event that an ability has been added. 736 * To subscribe to this common event, your application must have the ohos.permission.LISTEN_BUNDLE_CHANGE 737 * permission. 738 * This is a protected common event, which can be sent only by the system. 739 */ 740 static const std::string COMMON_EVENT_ABILITY_ADDED; 741 742 /** 743 * Indicates the action of a common event that an ability has been removed. 744 * To subscribe to this common event, your application must have the ohos.permission.LISTEN_BUNDLE_CHANGE 745 * permission. 746 * This is a protected common event, which can be sent only by the system. 747 */ 748 static const std::string COMMON_EVENT_ABILITY_REMOVED; 749 750 /** 751 * Indicates the action of a common event that an ability has been updated. 752 * To subscribe to this common event, your application must have the ohos.permission.LISTEN_BUNDLE_CHANGE 753 * permission. 754 * This is a protected common event, which can be sent only by the system. 755 */ 756 static const std::string COMMON_EVENT_ABILITY_UPDATED; 757 758 /** 759 * Indicates the action of a common event that the location mode of the system has changed. 760 * This is a protected common event, which can be sent only by the system. 761 */ 762 static const std::string COMMON_EVENT_LOCATION_MODE_STATE_CHANGED; 763 764 /** 765 * Indicates the action of a common event that the in-vehicle infotainment (IVI) system of a vehicle is sleeping. 766 * This is a protected common event, which can be sent only by the system. 767 */ 768 static const std::string COMMON_EVENT_IVI_SLEEP; 769 770 /** 771 * The ivi is slept and notify the app stop playing. 772 * This is a protected common event that can only be sent by system. 773 */ 774 static const std::string COMMON_EVENT_IVI_PAUSE; 775 776 /** 777 * Indicates the action of a common event that a third-party application is instructed to pause the current work. 778 * This is a protected common event, which can be sent only by the system. 779 */ 780 static const std::string COMMON_EVENT_IVI_STANDBY; 781 782 /** 783 * Indicates the action of a common event that a third-party application is instructed to save its last mode. 784 * This is a protected common event, which can be sent only by the system. 785 */ 786 static const std::string COMMON_EVENT_IVI_LASTMODE_SAVE; 787 788 /** 789 * Indicates the action of a common event that the voltage of the vehicle power system is abnormal. 790 * This is a protected common event, which can be sent only by the system. 791 */ 792 static const std::string COMMON_EVENT_IVI_VOLTAGE_ABNORMAL; 793 794 /** 795 * The ivi temperature is too high. 796 * This is a protected common event that can only be sent by system. 797 * This common event will be delete later, please use COMMON_EVENT_IVI_TEMPERATURE_ABNORMAL. 798 */ 799 static const std::string COMMON_EVENT_IVI_HIGH_TEMPERATURE; 800 801 /** 802 * The ivi temperature is extreme high. 803 * This is a protected common event that can only be sent by system. 804 * This common event will be delete later, please use COMMON_EVENT_IVI_TEMPERATURE_ABNORMAL. 805 */ 806 static const std::string COMMON_EVENT_IVI_EXTREME_TEMPERATURE; 807 808 /** 809 * Indicates the action of a common event that the in-vehicle system has an extreme temperature. 810 * This is a protected common event, which can be sent only by the system. 811 */ 812 static const std::string COMMON_EVENT_IVI_TEMPERATURE_ABNORMAL; 813 814 /** 815 * Indicates the action of a common event that the voltage of the vehicle power system is restored to normal. 816 * This is a protected common event, which can be sent only by the system. 817 */ 818 static const std::string COMMON_EVENT_IVI_VOLTAGE_RECOVERY; 819 820 /** 821 * Indicates the action of a common event that the temperature of the in-vehicle system is restored to normal. 822 * This is a protected common event, which can be sent only by the system. 823 */ 824 static const std::string COMMON_EVENT_IVI_TEMPERATURE_RECOVERY; 825 826 /** 827 * Indicates the action of a common event that the battery service is active. 828 * This is a protected common event, which can be sent only by the system. 829 */ 830 static const std::string COMMON_EVENT_IVI_ACTIVE; 831 832 /** 833 * The usb state changed. 834 * This is a protected common event that can only be sent by system. 835 */ 836 static const std::string COMMON_EVENT_USB_STATE; 837 838 /** 839 * The usb port changed. 840 * This is a protected common event that can only be sent by system. 841 */ 842 static const std::string COMMON_EVENT_USB_PORT_CHANGED; 843 844 /** 845 * Indicates the action of a common event that a USB device has been attached when the user device functions as a 846 * USB host. 847 * This is a protected common event, which can be sent only by the system. 848 */ 849 static const std::string COMMON_EVENT_USB_DEVICE_ATTACHED; 850 851 /** 852 * Indicates the action of a common event that a USB device has been detached when the user device functions as a 853 * USB host. 854 * This is a protected common event, which can be sent only by the system. 855 */ 856 static const std::string COMMON_EVENT_USB_DEVICE_DETACHED; 857 858 /** 859 * Indicates the action of a common event that a USB accessory has been attached. 860 * This is a protected common event, which can be sent only by the system. 861 */ 862 static const std::string COMMON_EVENT_USB_ACCESSORY_ATTACHED; 863 864 /** 865 * Indicates the action of a common event that a USB accessory has been detached. 866 * This is a protected common event, which can be sent only by the system. 867 */ 868 static const std::string COMMON_EVENT_USB_ACCESSORY_DETACHED; 869 870 /** 871 * The storage space is low. 872 * This is a protected common event that can only be sent by system. 873 */ 874 static const std::string COMMON_EVENT_DEVICE_STORAGE_LOW; 875 876 /** 877 * The storage space is normal. 878 * This is a protected common event that can only be sent by system. 879 */ 880 static const std::string COMMON_EVENT_DEVICE_STORAGE_OK; 881 882 /** 883 * The storage space is full. 884 * This is a protected common event that can only be sent by system. 885 */ 886 static const std::string COMMON_EVENT_DEVICE_STORAGE_FULL; 887 888 /** 889 * The network connection was changed. 890 * This is a protected common event that can only be sent by system. 891 */ 892 static const std::string COMMON_EVENT_CONNECTIVITY_CHANGE; 893 894 /** 895 * The global http proxy was changed. 896 * This is a protected common event that can only be sent by system. 897 */ 898 static const std::string COMMON_EVENT_HTTP_PROXY_CHANGE; 899 900 /** 901 * Indicates the action of a common event that an external storage device was removed. 902 * To subscribe to this common event, your application must have the ohos.permission.STORAGE_MANAGER permission. 903 * This common event can be published only by system applications. 904 */ 905 static const std::string COMMON_EVENT_DISK_REMOVED; 906 907 /** 908 * Indicates the action of a common event that an external storage device was unmounted. 909 * To subscribe to this common event, your application must have the ohos.permission.STORAGE_MANAGER permission. 910 * This common event can be published only by system applications. 911 */ 912 static const std::string COMMON_EVENT_DISK_UNMOUNTED; 913 914 /** 915 * Indicates the action of a common event that an external storage device was mounted. 916 * To subscribe to this common event, your application must have the ohos.permission.STORAGE_MANAGER permission. 917 * This common event can be published only by system applications. 918 */ 919 static const std::string COMMON_EVENT_DISK_MOUNTED; 920 921 /** 922 * Indicates the action of a common event that an external storage device was removed without being unmounted. 923 * To subscribe to this common event, your application must have the ohos.permission.STORAGE_MANAGER permission. 924 * This common event can be published only by system applications. 925 */ 926 static const std::string COMMON_EVENT_DISK_BAD_REMOVAL; 927 928 /** 929 * Indicates the action of a common event that an external storage device becomes unmountable. 930 * To subscribe to this common event, your application must have the ohos.permission.STORAGE_MANAGER permission. 931 * This common event can be published only by system applications. 932 */ 933 static const std::string COMMON_EVENT_DISK_UNMOUNTABLE; 934 935 /** 936 * Indicates the action of a common event that an external storage device was ejected. 937 * To subscribe to this common event, your application must have the ohos.permission.STORAGE_MANAGER permission. 938 * This common event can be published only by system applications. 939 */ 940 static const std::string COMMON_EVENT_DISK_EJECT; 941 942 /** 943 * Indicates the action of a common event that an external storage device was removed. 944 * To subscribe to this common event, your application must have the ohos.permission.STORAGE_MANAGER permission. 945 * This common event can be published only by system applications. 946 */ 947 static const std::string COMMON_EVENT_VOLUME_REMOVED; 948 949 /** 950 * Indicates the action of a common event that an external storage device was unmounted. 951 * To subscribe to this common event, your application must have the ohos.permission.STORAGE_MANAGER permission. 952 * This common event can be published only by system applications. 953 */ 954 static const std::string COMMON_EVENT_VOLUME_UNMOUNTED; 955 956 /** 957 * Indicates the action of a common event that an external storage device was mounted. 958 * To subscribe to this common event, your application must have the ohos.permission.STORAGE_MANAGER permission. 959 * This common event can be published only by system applications. 960 */ 961 static const std::string COMMON_EVENT_VOLUME_MOUNTED; 962 963 /** 964 * Indicates the action of a common event that an external storage device was removed without being unmounted. 965 * To subscribe to this common event, your application must have the ohos.permission.STORAGE_MANAGER permission. 966 * This common event can be published only by system applications. 967 */ 968 static const std::string COMMON_EVENT_VOLUME_BAD_REMOVAL; 969 970 /** 971 * Indicates the action of a common event that an external storage device was ejected. 972 * To subscribe to this common event, your application must have the ohos.permission.STORAGE_MANAGER permission. 973 * This common event can be published only by system applications. 974 */ 975 static const std::string COMMON_EVENT_VOLUME_EJECT; 976 977 /** 978 * Indicates the action of a common event that the account visible changed. 979 * To subscribe to this common event, your application must have the ohos.permission.GET_APP_ACCOUNTS permission. 980 * This is a protected common event, which can be sent only by the system. 981 */ 982 static const std::string COMMON_EVENT_VISIBLE_ACCOUNTS_UPDATED; 983 984 /** 985 * Indicates the action of a common event that the account is deleted. 986 * To subscribe to this common event, your application must have the ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS 987 * permission. 988 * This is a protected common event, which can be sent only by the system. 989 */ 990 static const std::string COMMON_EVENT_ACCOUNT_DELETED; 991 992 /** 993 * Indicates the action of a common event that the foundation is ready. 994 * To subscribe to this common event, your application must have the ohos.permission.RECEIVER_STARTUP_COMPLETED 995 * permission. 996 * This is a protected common event, which can be sent only by the system. 997 */ 998 static const std::string COMMON_EVENT_FOUNDATION_READY; 999 1000 /** 1001 * Indicates the action of a common event that the default voice subscription has changed. 1002 * This is a protected common event that can only be sent by system. 1003 */ 1004 static const std::string COMMON_EVENT_SIM_CARD_DEFAULT_VOICE_SUBSCRIPTION_CHANGED; 1005 1006 /** 1007 * Indicates the action of a common event that the phone SIM card state has changed. 1008 * This is a protected common event that can only be sent by system. 1009 */ 1010 static const std::string COMMON_EVENT_SIM_STATE_CHANGED; 1011 1012 /** 1013 * Indicates the action of a common event that the airplane mode of the device has changed. 1014 * This common event can be triggered only by system applications. 1015 */ 1016 static const std::string COMMON_EVENT_AIRPLANE_MODE_CHANGED; 1017 1018 /** 1019 * Indicates the action of a common event that a new sms bas been received by the device. 1020 * To subscribe to this common event, your application must have the ohos.permission.RECEIVE_SMS permission. 1021 * This common event can be triggered only by system. 1022 */ 1023 static const std::string COMMON_EVENT_SMS_RECEIVE_COMPLETED; 1024 1025 /** 1026 * Indicates the action of a common event that a new sms emergency cell broadcast bas been received by the device. 1027 * This common event can be triggered only by system. 1028 */ 1029 static const std::string COMMON_EVENT_SMS_EMERGENCY_CB_RECEIVE_COMPLETED; 1030 1031 /** 1032 * Indicates the action of a common event that a new sms normal cell broadcast bas been received by the device. 1033 * This common event can be triggered only by system. 1034 */ 1035 static const std::string COMMON_EVENT_SMS_CB_RECEIVE_COMPLETED; 1036 1037 /** 1038 * Indicates the action of a common event that a STK command has been received by the device. 1039 * This common event can be triggered only by system. 1040 */ 1041 static const std::string COMMON_EVENT_STK_COMMAND; 1042 1043 /** 1044 * Indicates the action of a common event that STK session end. 1045 * This common event can be triggered only by system. 1046 */ 1047 static const std::string COMMON_EVENT_STK_SESSION_END; 1048 1049 /** 1050 * Indicates the action of a common event that the STK phone card state has changed. 1051 * This common event can be triggered only by system. 1052 */ 1053 static const std::string COMMON_EVENT_STK_CARD_STATE_CHANGED; 1054 1055 /** 1056 * Indicates the action of a common event that an alpha string during call control has been received by the device. 1057 * This common event can be triggered only by system. 1058 */ 1059 static const std::string COMMON_EVENT_STK_ALPHA_IDENTIFIER; 1060 1061 /** 1062 * Indicates the action of a common event that the spn display information has been updated. 1063 * This common event can be triggered only by system. 1064 */ 1065 static const std::string COMMON_EVENT_SPN_INFO_CHANGED; 1066 1067 /** 1068 * Indicates the action of a common event that the NITZ time has been updated. 1069 * This is a protected common event that can only be sent by system. 1070 */ 1071 static const std::string COMMON_EVENT_NITZ_TIME_CHANGED; 1072 1073 /** 1074 * Indicates the action of a common event that the NITZ time zone has been updated. 1075 * This is a protected common event that can only be sent by system. 1076 */ 1077 static const std::string COMMON_EVENT_NITZ_TIMEZONE_CHANGED; 1078 1079 /** 1080 * Indicates the action of a common event that a new sms wappush has been received by the device. 1081 * This is a protected common event that can only be sent by system. 1082 */ 1083 static const std::string COMMON_EVENT_SMS_WAPPUSH_RECEIVE_COMPLETED; 1084 1085 /** 1086 * Indicates the action of a common event that the operator config has been updated. 1087 * This is a protected common event that can only be sent by system. 1088 */ 1089 static const std::string COMMON_EVENT_OPERATOR_CONFIG_CHANGED; 1090 1091 /** 1092 * Indicates the action of a common event that the notification slot has been updated. 1093 * This is a protected common event that can only be sent by system. 1094 */ 1095 static const std::string COMMON_EVENT_SLOT_CHANGE; 1096 1097 /** 1098 * Only for test case. 1099 */ 1100 static const std::string COMMON_EVENT_TEST_ACTION1; 1101 1102 /** 1103 * Only for test case. 1104 */ 1105 static const std::string COMMON_EVENT_TEST_ACTION2; 1106 1107 /** 1108 * Indicates the action of a common event that the default SMS subscription has been changed. 1109 * This is a protected common event that can only be sent by system. 1110 */ 1111 static const std::string COMMON_EVENT_SIM_CARD_DEFAULT_SMS_SUBSCRIPTION_CHANGED; 1112 1113 /** 1114 * Indicates the action of a common event that the default data subscription has been changed. 1115 * This is a protected common event that can only be sent by system. 1116 */ 1117 static const std::string COMMON_EVENT_SIM_CARD_DEFAULT_DATA_SUBSCRIPTION_CHANGED; 1118 1119 /** 1120 * Indicates the action of a common event that the call state has been changed. 1121 * To subscribe to this protected common event, your application must have the ohos.permission.GET_TELEPHONY_STATE 1122 * permission. 1123 * This is a protected common event that can only be sent by system. 1124 */ 1125 static const std::string COMMON_EVENT_CALL_STATE_CHANGED; 1126 1127 /** 1128 * Indicates the action of a common event that the default main subscription has been changed. 1129 * This is a protected common event that can only be sent by system. 1130 */ 1131 static const std::string COMMON_EVENT_SIM_CARD_DEFAULT_MAIN_SUBSCRIPTION_CHANGED; 1132 1133 /** 1134 * Indicates the action of a common event that the cellular data state has been changed. 1135 * This is a protected common event that can only be sent by system. 1136 */ 1137 static const std::string COMMON_EVENT_CELLULAR_DATA_STATE_CHANGED; 1138 1139 /** 1140 * Indicates the action of a common event that the signal info has been changed. 1141 * This is a protected common event that can only be sent by system. 1142 */ 1143 static const std::string COMMON_EVENT_SIGNAL_INFO_CHANGED; 1144 1145 /** 1146 * Indicates the action of a common event that the network state has been changed. 1147 * This is a protected common event that can only be sent by system. 1148 */ 1149 static const std::string COMMON_EVENT_NETWORK_STATE_CHANGED; 1150 1151 /** 1152 * Indicates the action of a common event that the incoming call has been missed. 1153 * To subscribe to this protected common event, your application must have the ohos.permission.GET_TELEPHONY_STATE 1154 * permission. 1155 * This is a protected common event that can only be sent by system. 1156 */ 1157 static const std::string COMMON_EVENT_INCOMING_CALL_MISSED; 1158 1159 /** 1160 * Indicate the result of quick fix apply. 1161 * This common event can be triggered only by system. 1162 */ 1163 static const std::string COMMON_EVENT_QUICK_FIX_APPLY_RESULT; 1164 1165 /** 1166 * Indicate the result of quick fix revoke. 1167 * This common event can be triggered only by system. 1168 */ 1169 static const std::string COMMON_EVENT_QUICK_FIX_REVOKE_RESULT; 1170 1171 /** 1172 * Indicates the action of a common event that radio state change. 1173 * To subscribe to this protected common event that can only be sent by system. 1174 */ 1175 static const std::string COMMON_EVENT_RADIO_STATE_CHANGE; 1176 1177 /** 1178 * Indicates the action of a common event about a login of a distributed account. 1179 * This is a protected common event that can only be sent by system. 1180 */ 1181 static const std::string COMMON_EVENT_DISTRIBUTED_ACCOUNT_LOGIN; 1182 1183 /** 1184 * Indicates the action of a common event about a logout of a distributed account. 1185 * This is a protected common event that can only be sent by system. 1186 */ 1187 static const std::string COMMON_EVENT_DISTRIBUTED_ACCOUNT_LOGOUT; 1188 1189 /** 1190 * Indicates the action of a common event that the token of a distributed account is invalid. 1191 * This is a protected common event that can only be sent by system. 1192 */ 1193 static const std::string COMMON_EVENT_DISTRIBUTED_ACCOUNT_TOKEN_INVALID; 1194 1195 /** 1196 * Indicates the action of a common event about a logoff of a distributed account. 1197 * This is a protected common event that can only be sent by system. 1198 */ 1199 static const std::string COMMON_EVENT_DISTRIBUTED_ACCOUNT_LOGOFF; 1200 1201 /** 1202 * Indicates the action of a common event that the user information has been updated. 1203 * This is a protected common event that can only be sent by system. 1204 */ 1205 static const std::string COMMON_EVENT_USER_INFO_UPDATED; 1206 1207 /** 1208 * Indicate the action of a common event that domain account status has been changed. 1209 * This is a protected common event that can only be sent by system. 1210 */ 1211 static const std::string COMMON_EVENT_DOMAIN_ACCOUNT_STATUS_CHANGED; 1212 1213 /** 1214 * Indicates the action of a common event that the screen lock. 1215 * This is a protected common event that can only be sent by system. 1216 */ 1217 static const std::string COMMON_EVENT_SCREEN_LOCKED; 1218 1219 /** 1220 * Indicates the action of a common event that the screen unlock. 1221 * This is a protected common event that can only be sent by system. 1222 */ 1223 static const std::string COMMON_EVENT_SCREEN_UNLOCKED; 1224 1225 /** 1226 * Indicates the action of a common event that the call audio quality information has been updated. 1227 * This is a protected common event that can only be sent by system. 1228 */ 1229 static const std::string COMMON_EVENT_AUDIO_QUALITY_CHANGE; 1230 1231 /** 1232 * Indicates the action of a common event about special code. 1233 * This is a protected common event that can only be sent by system. 1234 */ 1235 static const std::string COMMON_EVENT_SPECIAL_CODE; 1236 1237 public: 1238 CommonEventSupport(); 1239 1240 virtual ~CommonEventSupport(); 1241 1242 /** 1243 * Checks whether the current common event is a system common event. 1244 * @param str Indicates the action of a common event. 1245 * @return Returns whether the current common event is a system common event or not. 1246 */ 1247 bool IsSystemEvent(std::string &str); 1248 1249 private: 1250 void Init(); 1251 1252 private: 1253 std::vector<std::string> commonEventSupport_; 1254 }; 1255 } // namespace EventFwk 1256 } // namespace OHOS 1257 1258 #endif // FOUNDATION_EVENT_CESFWK_KITS_NATIVE_INCLUDE_COMMON_EVENT_SUPPORT_H