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 about to enter the force sleep mode. 91 * This common event can only be published by the system. 92 */ 93 static const std::string COMMON_EVENT_ENTER_FORCE_SLEEP; 94 /** 95 * Indicates the action of a common event that the device exits the force sleep mode. 96 * This common event can only be published by the system. 97 */ 98 static const std::string COMMON_EVENT_EXIT_FORCE_SLEEP; 99 /** 100 * Indicates the action of a common event that the device is about to enter the hibernate mode. 101 * This common event can only be published by the system. 102 */ 103 static const std::string COMMON_EVENT_ENTER_HIBERNATE; 104 /** 105 * Indicates the action of a common event that the device exits the hibernate mode. 106 * This common event can only be published by the system. 107 */ 108 static const std::string COMMON_EVENT_EXIT_HIBERNATE; 109 /** 110 * Indicates the action of a common event that the device is idle and charging, 111 * services can do some business on the background. 112 * This common event can only be published by the system. 113 */ 114 static const std::string COMMON_EVENT_CHARGE_IDLE_MODE_CHANGED; 115 /** 116 * Indicates the action of a common event that the user unlocks the device. 117 * This common event can only be published by the system. 118 */ 119 static const std::string COMMON_EVENT_USER_PRESENT; 120 121 /** 122 * Indicates the action of a common event that the system time has changed. 123 * This common event can only be published by the system. 124 */ 125 static const std::string COMMON_EVENT_TIME_TICK; 126 /** 127 * Indicates the action of a common event that the system time is set. 128 * This common event can only be published by the system. 129 */ 130 static const std::string COMMON_EVENT_TIME_CHANGED; 131 /** 132 * Indicates the action of a common event that the system date has changed. 133 * This common event can only be published by the system. 134 */ 135 static const std::string COMMON_EVENT_DATE_CHANGED; 136 /** 137 * Indicates the action of a common event that the system time zone has changed. 138 * This common event can only be published by the system. 139 */ 140 static const std::string COMMON_EVENT_TIMEZONE_CHANGED; 141 142 /** 143 * Indicates the action of a common event that a user closes a temporary system dialog box. 144 * This common event can only be published by the system. 145 */ 146 static const std::string COMMON_EVENT_CLOSE_SYSTEM_DIALOGS; 147 148 /** 149 * Indicates the action of a common event that bundle scan has finished. 150 * This common event can only be published by the system. 151 */ 152 static const std::string COMMON_EVENT_BUNDLE_SCAN_FINISHED; 153 /** 154 * Indicates the action of a common event that a new application package has been installed on the device. 155 * This common event can only be published by the system. 156 */ 157 static const std::string COMMON_EVENT_PACKAGE_ADDED; 158 /** 159 * This commonEvent means when a new application package start to install on the device. 160 * This is a protected common event that can only be sent by system. 161 */ 162 static const std::string COMMON_EVENT_PACKAGE_INSTALLATION_STARTED; 163 /** 164 * This common event means an application package enables or disables a dynamic icon. 165 * This is a protected common event that can only be sent by system. 166 */ 167 static const std::string COMMON_EVENT_DYNAMIC_ICON_CHANGED; 168 /** 169 * Indicates the action of a common event that a new version of an installed application package has replaced 170 * the previous one on the device. 171 * This common event can only be published by the system. 172 */ 173 static const std::string COMMON_EVENT_PACKAGE_REPLACED; 174 /** 175 * Indicates the action of a common event that a new version of your application package has replaced 176 * the previous one. This common event is sent only to the application that was replaced. 177 * This common event can only be published by the system. 178 */ 179 static const std::string COMMON_EVENT_MY_PACKAGE_REPLACED; 180 /** 181 * Indicates the action of a common event that an installed application has been uninstalled from the device 182 * with the application data remained. 183 * This common event can only be published by the system. 184 */ 185 static const std::string COMMON_EVENT_PACKAGE_REMOVED; 186 /** 187 * Indicates the action of a common event that an installed bundle has been uninstalled from the device with the 188 * application data remained. 189 * This common event can only be published by the system. 190 */ 191 static const std::string COMMON_EVENT_BUNDLE_REMOVED; 192 /** 193 * Indicates the action of a common event that an installed application, including both the application data and 194 * code, have been completely uninstalled from the device. 195 * This common event can only be published by the system. 196 */ 197 static const std::string COMMON_EVENT_PACKAGE_FULLY_REMOVED; 198 /** 199 * Indicates the action of a common event that an application package has been changed 200 * (for example, a component in the package has been enabled or disabled). 201 * This common event can only be published by the system. 202 */ 203 static const std::string COMMON_EVENT_PACKAGE_CHANGED; 204 /** 205 * Indicates the action of a common event that the user has restarted the application package and killed all its 206 * processes. 207 * This common event can only be published by the system. 208 */ 209 static const std::string COMMON_EVENT_PACKAGE_RESTARTED; 210 /** 211 * Indicates the action of a common event that the user has cleared the application package data. 212 * This common event is published after COMMON_EVENT_PACKAGE_RESTARTED is triggered and the data has been cleared. 213 * This common event can only be published by the system. 214 */ 215 static const std::string COMMON_EVENT_PACKAGE_DATA_CLEARED; 216 /** 217 * Indicates the action of a common event that the user has cleared the application package cache. 218 * This common event can only be published by the system. 219 */ 220 static const std::string COMMON_EVENT_PACKAGE_CACHE_CLEARED; 221 /** 222 * Indicates the action of a common event that application packages have been suspended. 223 * This common event can only be published by the system. 224 */ 225 static const std::string COMMON_EVENT_PACKAGES_SUSPENDED; 226 /** 227 * Indicates the action of a common event that application packages have not been suspended. 228 * This common event can only be published by the system. 229 */ 230 static const std::string COMMON_EVENT_PACKAGES_UNSUSPENDED; 231 /** 232 * Indicates the action of a common event that an application package has been suspended. 233 * This common event can only be published by the system. 234 */ 235 static const std::string COMMON_EVENT_MY_PACKAGE_SUSPENDED; 236 /** 237 * Indicates the action of a common event that an application package has not been suspended. 238 * This common event can only be published by the system. 239 */ 240 static const std::string COMMON_EVENT_MY_PACKAGE_UNSUSPENDED; 241 /** 242 * Indicates the action of a common event that a user ID has been removed from the system. 243 * This common event can only be published by the system. 244 */ 245 static const std::string COMMON_EVENT_UID_REMOVED; 246 /** 247 * Indicates the action of a common event that an installed application is started for the first time. 248 * This common event can only be published by the system. 249 */ 250 static const std::string COMMON_EVENT_PACKAGE_FIRST_LAUNCH; 251 /** 252 * Indicates the action of a common event that an application requires system verification. 253 * This common event can only be published by the system. 254 */ 255 static const std::string COMMON_EVENT_PACKAGE_NEEDS_VERIFICATION; 256 /** 257 * Indicates the action of a common event that an application has been verified by the system. 258 * This common event can only be published by the system. 259 */ 260 static const std::string COMMON_EVENT_PACKAGE_VERIFIED; 261 262 /** 263 * Indicates the action of a common event that applications installed on the external storage become 264 * available for the system. 265 * This common event can only be published by the system. 266 */ 267 static const std::string COMMON_EVENT_EXTERNAL_APPLICATIONS_AVAILABLE; 268 /** 269 * Indicates the action of a common event that applications installed on the external storage become unavailable for 270 * the system. 271 * This common event can only be published by the system. 272 */ 273 static const std::string COMMON_EVENT_EXTERNAL_APPLICATIONS_UNAVAILABLE; 274 275 /** 276 * Indicates the action of a common event that the device state (for example, orientation and locale) has changed. 277 * This common event can only be published by the system. 278 */ 279 static const std::string COMMON_EVENT_CONFIGURATION_CHANGED; 280 /** 281 * Indicates the action of a common event that the device locale has changed. 282 * This common event can only be published by the system. 283 */ 284 static const std::string COMMON_EVENT_LOCALE_CHANGED; 285 286 /** 287 * Indicates the action of a common event that the device storage is insufficient. 288 */ 289 static const std::string COMMON_EVENT_MANAGE_PACKAGE_STORAGE; 290 291 /** 292 * Indicates the action of a common event that one sandbox package is installed. 293 */ 294 static const std::string COMMON_EVENT_SANDBOX_PACKAGE_ADDED; 295 /** 296 * Indicates the action of a common event that one sandbox package is uninstalled. 297 */ 298 static const std::string COMMON_EVENT_SANDBOX_PACKAGE_REMOVED; 299 /** 300 * Indicates the action of a common event that the system is in driving mode. 301 * This is a protected common event, which can be sent only by the system. 302 */ 303 static const std::string COMMON_EVENT_DRIVE_MODE; 304 /** 305 * Indicates the action of a common event that the system is in home mode. 306 * This is a protected common event, which can be sent only by the system. 307 */ 308 static const std::string COMMON_EVENT_HOME_MODE; 309 /** 310 * Indicates the action of a common event that the system is in office mode. 311 * This is a protected common event, which can be sent only by the system. 312 */ 313 static const std::string COMMON_EVENT_OFFICE_MODE; 314 315 /** 316 * Indicates the action of a common event that the window mode is split screen. 317 * This is a protected common event, which can be sent only by the system. 318 */ 319 static const std::string COMMON_EVENT_SPLIT_SCREEN; 320 321 /** 322 * Indicates the action of a common event that the user has been started. 323 */ 324 static const std::string COMMON_EVENT_USER_STARTED; 325 /** 326 * Indicates the action of a common event that the user has been brought to the background. 327 */ 328 static const std::string COMMON_EVENT_USER_BACKGROUND; 329 /** 330 * Indicates the action of a common event that the user has been brought to the foreground. 331 */ 332 static const std::string COMMON_EVENT_USER_FOREGROUND; 333 /** 334 * Indicates the action of a common event that a user switch is happening. 335 * To subscribe to this common event, your application must have the ohos.permission.MANAGE_LOCAL_ACCOUNTS 336 * permission. 337 */ 338 static const std::string COMMON_EVENT_USER_SWITCHED; 339 /** 340 * Indicates the action of a common event that the user is going to be started. 341 * To subscribe to this common event, your application must have the ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS 342 * permission. 343 */ 344 static const std::string COMMON_EVENT_USER_STARTING; 345 /** 346 * Indicates the action of a common event that the credential-encrypted storage has become unlocked 347 * for the current user when the device is unlocked after being restarted. 348 */ 349 static const std::string COMMON_EVENT_USER_UNLOCKED; 350 /** 351 * Indicates the action of a common event that the user is going to be stopped. 352 * To subscribe to this common event, your application must have the ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS 353 * permission. 354 */ 355 static const std::string COMMON_EVENT_USER_STOPPING; 356 /** 357 * Indicates the action of a common event that the user has been stopped. 358 */ 359 static const std::string COMMON_EVENT_USER_STOPPED; 360 /** 361 * Indicates the action of a common event about a login of a user with account ID. 362 * This is a protected common event, which can be sent only by the system. 363 */ 364 static const std::string COMMON_EVENT_HWID_LOGIN; 365 /** 366 * Indicates the action of a common event about a logout of a user with account ID. 367 * This is a protected common event, which can be sent only by the system. 368 */ 369 static const std::string COMMON_EVENT_HWID_LOGOUT; 370 /** 371 * Indicates the action of a common event that the account ID is invalid. 372 * This is a protected common event, which can be sent only by the system. 373 */ 374 static const std::string COMMON_EVENT_HWID_TOKEN_INVALID; 375 /** 376 * Indicates the action of a common event about a logoff of a account ID. 377 * This is a protected common event, which can be sent only by the system. 378 */ 379 static const std::string COMMON_EVENT_HWID_LOGOFF; 380 381 /** 382 * Indicates the action of a common event about the Wi-Fi state, such as enabled and disabled. 383 */ 384 static const std::string COMMON_EVENT_WIFI_POWER_STATE; 385 386 /** 387 * Indicates the action of a common event that the Wi-Fi access point has been scanned and proven to be available. 388 * To subscribe to this common event, your application must have the ohos.permission.LOCATION permission. 389 */ 390 static const std::string COMMON_EVENT_WIFI_SCAN_FINISHED; 391 392 /** 393 * Indicates the action of a common event that the Wi-Fi signal strength (RSSI) has changed. 394 * To subscribe to this common event, your application must have the ohos.permission.GET_WIFI_INFO permission. 395 */ 396 static const std::string COMMON_EVENT_WIFI_RSSI_VALUE; 397 398 /** 399 * Indicates the action of a common event that the Wi-Fi connection state has changed. 400 */ 401 static const std::string COMMON_EVENT_WIFI_CONN_STATE; 402 403 /** 404 * Indicates the action of a common event about the Wi-Fi hotspot state, such as enabled or disabled. 405 */ 406 static const std::string COMMON_EVENT_WIFI_HOTSPOT_STATE; 407 408 /** 409 * Indicates the action of a common event that a client has joined the Wi-Fi hotspot of the current device. You can 410 * register this common event to listen for information about the clients joining your hotspot. 411 * To subscribe to this common event, your application must have the ohos.permission.GET_WIFI_INFO permission. 412 */ 413 static const std::string COMMON_EVENT_WIFI_AP_STA_JOIN; 414 415 /** 416 * Indicates the action of a common event that a client has dropped connection to the Wi-Fi hotspot of the current 417 * device. You can register this common event to listen for information about the clients leaving your hotspot. 418 * To subscribe to this common event, your application must have the ohos.permission.GET_WIFI_INFO permission. 419 */ 420 static const std::string COMMON_EVENT_WIFI_AP_STA_LEAVE; 421 422 /** 423 * Indicates the action of a common event that the state of MPLink (an enhanced Wi-Fi feature) has changed. 424 * To subscribe to this common event, your application must have the ohos.permission.MPLINK_CHANGE_STATE permission. 425 */ 426 static const std::string COMMON_EVENT_WIFI_MPLINK_STATE_CHANGE; 427 428 /** 429 * Indicates the action of a common event that the Wi-Fi P2P connection state has changed. 430 * To subscribe to this common event, your application must have the ohos.permission.GET_WIFI_INFO and 431 * ohos.permission.LOCATION permissions. 432 */ 433 static const std::string COMMON_EVENT_WIFI_P2P_CONN_STATE; 434 435 /** 436 * Indicates the action of a common event about the Wi-Fi P2P state, such as enabled and disabled. 437 * To subscribe to this common event, your application must have the ohos.permission.GET_WIFI_INFO permission. 438 */ 439 static const std::string COMMON_EVENT_WIFI_P2P_STATE_CHANGED; 440 441 /** 442 * Indicates that the Wi-Fi P2P peers state change. 443 * To subscribe to this common event, your application must have the ohos.permission.GET_WIFI_INFO permission. 444 */ 445 static const std::string COMMON_EVENT_WIFI_P2P_PEERS_STATE_CHANGED; 446 447 /** 448 * Indicates that the Wi-Fi P2P discovery state change. 449 * To subscribe to this common event, your application must have the ohos.permission.GET_WIFI_INFO permission. 450 */ 451 static const std::string COMMON_EVENT_WIFI_P2P_PEERS_DISCOVERY_STATE_CHANGED; 452 453 /** 454 * Indicates that the Wi-Fi P2P current device state change. 455 * To subscribe to this common event, your application must have the ohos.permission.GET_WIFI_INFO permission. 456 */ 457 static const std::string COMMON_EVENT_WIFI_P2P_CURRENT_DEVICE_STATE_CHANGED; 458 459 /** 460 * Indicates that the Wi-Fi P2P group info is changed. 461 * To subscribe to this common event, your application must have the ohos.permission.GET_WIFI_INFO permission. 462 */ 463 static const std::string COMMON_EVENT_WIFI_P2P_GROUP_STATE_CHANGED; 464 465 /** 466 * Indicates that network traffic statistics have been updated. 467 */ 468 static const std::string COMMON_EVENT_NETMANAGER_NETSTATES_UPDATED; 469 470 /** 471 * Indicates that the network traffic has exceeded the limit. 472 */ 473 static const std::string COMMON_EVENT_NETMANAGER_NETSTATES_LIMITED; 474 475 /** 476 * Indicates the action of a common event about the connection state of Bluetooth handsfree communication. 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_HANDSFREE_AG_CONNECT_STATE_UPDATE; 480 481 /** 482 * Indicates the action of a common event that the device connected to the Bluetooth handsfree is active. 483 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission. 484 */ 485 static const std::string COMMON_EVENT_BLUETOOTH_HANDSFREE_AG_CURRENT_DEVICE_UPDATE; 486 487 /** 488 * Indicates the action of a common event that the connection state of Bluetooth A2DP has changed. 489 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission. 490 */ 491 static const std::string COMMON_EVENT_BLUETOOTH_HANDSFREE_AG_AUDIO_STATE_UPDATE; 492 493 /** 494 * Indicates the action of a common event about the connection state of Bluetooth A2DP. 495 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission. 496 */ 497 static const std::string COMMON_EVENT_BLUETOOTH_A2DPSOURCE_CONNECT_STATE_UPDATE; 498 499 /** 500 * Indicates the action of a common event that the device connected using Bluetooth A2DP is active. 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_A2DPSOURCE_CURRENT_DEVICE_UPDATE; 504 505 /** 506 * Indicates the action of a common event that the playing state of Bluetooth A2DP has changed. 507 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission. 508 */ 509 static const std::string COMMON_EVENT_BLUETOOTH_A2DPSOURCE_PLAYING_STATE_UPDATE; 510 511 /** 512 * Indicates the action of a common event that the AVRCP connection state of Bluetooth A2DP has changed. 513 */ 514 static const std::string COMMON_EVENT_BLUETOOTH_A2DPSOURCE_AVRCP_CONNECT_STATE_UPDATE; 515 516 /** 517 * Indicates the action of a common event that the audio codec state of Bluetooth A2DP has changed. 518 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission. 519 */ 520 static const std::string COMMON_EVENT_BLUETOOTH_A2DPSOURCE_CODEC_VALUE_UPDATE; 521 522 /** 523 * Indicates the action of a common event that a remote Bluetooth device has been discovered. 524 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH and 525 * ohos.permission.LOCATION permissions. 526 */ 527 static const std::string COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_DISCOVERED; 528 529 /** 530 * Indicates the action of a common event that the Bluetooth class of a remote Bluetooth device has changed. 531 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission. 532 */ 533 static const std::string COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_CLASS_VALUE_UPDATE; 534 535 /** 536 * Indicates the action of a common event that a low level (ACL) connection has been established with a remote 537 * Bluetooth device. 538 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission. 539 */ 540 static const std::string COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_ACL_CONNECTED; 541 542 /** 543 * Indicates the action of a common event that a low level (ACL) connection has been disconnected from a remote 544 * Bluetooth device. 545 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission. 546 */ 547 static const std::string COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_ACL_DISCONNECTED; 548 549 /** 550 * Indicates the action of a common event that the friendly name of a remote Bluetooth device has been retrieved for 551 * the first time or has been changed since the last retrieval. 552 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission. 553 */ 554 static const std::string COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_NAME_UPDATE; 555 556 /** 557 * Indicates the action of a common event that the connection state of a remote Bluetooth device has changed. 558 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission. 559 */ 560 static const std::string COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_PAIR_STATE; 561 562 /** 563 * Indicates the action of a common event that the battery level of a remote Bluetooth device has been retrieved 564 * for the first time or has been changed since the last retrieval. 565 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission. 566 */ 567 static const std::string COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_BATTERY_VALUE_UPDATE; 568 569 /** 570 * Indicates the action of a common event about the SDP state of a remote Bluetooth device. 571 */ 572 static const std::string COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_SDP_RESULT; 573 574 /** 575 * Indicates the action of a common event about the UUID connection state of a remote Bluetooth device. 576 * To subscribe to this common event, your application must have the ohos.permission.DISCOVER_BLUETOOTH permission. 577 */ 578 static const std::string COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_UUID_VALUE; 579 580 /** 581 * Indicates the action of a common event about the pairing request from a remote Bluetooth device. 582 * To subscribe to this common event, your application must have the ohos.permission.DISCOVER_BLUETOOTH permission. 583 */ 584 static const std::string COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_PAIRING_REQ; 585 586 /** 587 * Indicates the action of a common event that Bluetooth pairing is canceled. 588 */ 589 static const std::string COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_PAIRING_CANCEL; 590 591 /** 592 * Indicates the action of a common event about the connection request from a remote Bluetooth device. 593 */ 594 static const std::string COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_CONNECT_REQ; 595 596 /** 597 * Indicates the action of a common event about the response to the connection request from a remote Bluetooth 598 * device. 599 */ 600 static const std::string COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_CONNECT_REPLY; 601 602 /** 603 * Indicates the action of a common event that the connection to a remote Bluetooth device has been canceled. 604 */ 605 static const std::string COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_CONNECT_CANCEL; 606 607 /** 608 * Indicates the action of a common event that the connection state of a Bluetooth handsfree has changed. 609 */ 610 static const std::string COMMON_EVENT_BLUETOOTH_HANDSFREEUNIT_CONNECT_STATE_UPDATE; 611 612 /** 613 * Indicates the action of a common event that the audio state of a Bluetooth handsfree has changed. 614 */ 615 static const std::string COMMON_EVENT_BLUETOOTH_HANDSFREEUNIT_AUDIO_STATE_UPDATE; 616 617 /** 618 * Indicates the action of a common event that the audio gateway state of a Bluetooth handsfree has changed. 619 */ 620 static const std::string COMMON_EVENT_BLUETOOTH_HANDSFREEUNIT_AG_COMMON_EVENT; 621 622 /** 623 * Indicates the action of a common event that the calling state of a Bluetooth handsfree has changed. 624 */ 625 static const std::string COMMON_EVENT_BLUETOOTH_HANDSFREEUNIT_AG_CALL_STATE_UPDATE; 626 627 /** 628 * Indicates the action of a common event that the state of a Bluetooth adapter has been changed, for example, 629 * Bluetooth has been turned on or off. 630 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission. 631 */ 632 static const std::string COMMON_EVENT_BLUETOOTH_HOST_STATE_UPDATE; 633 634 /** 635 * Indicates the action of a common event about the requests for the user to allow Bluetooth to be scanned. 636 */ 637 static const std::string COMMON_EVENT_BLUETOOTH_HOST_REQ_DISCOVERABLE; 638 639 /** 640 * Indicates the action of a common event about the requests for the user to turn on Bluetooth. 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_REQ_ENABLE; 644 645 /** 646 * Indicates the action of a common event about the requests for the user to turn off Bluetooth. 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_HOST_REQ_DISABLE; 650 651 /** 652 * Indicates the action of a common event that the Bluetooth scanning mode of a device 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_HOST_SCAN_MODE_UPDATE; 656 657 /** 658 * Indicates the action of a common event that the Bluetooth scanning has been started on the device. 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_HOST_DISCOVERY_STARTED; 662 663 /** 664 * Indicates the action of a common event that the Bluetooth scanning is finished on the device. 665 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission. 666 */ 667 static const std::string COMMON_EVENT_BLUETOOTH_HOST_DISCOVERY_FINISHED; 668 669 /** 670 * Indicates the action of a common event that the Bluetooth adapter name of the device has changed. 671 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission. 672 */ 673 static const std::string COMMON_EVENT_BLUETOOTH_HOST_NAME_UPDATE; 674 675 /** 676 * Indicates the action of a common event that the connection state of Bluetooth A2DP Sink has changed. 677 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission. 678 */ 679 static const std::string COMMON_EVENT_BLUETOOTH_A2DPSINK_CONNECT_STATE_UPDATE; 680 681 /** 682 * Indicates the action of a common event that the playing state of Bluetooth A2DP Sink has changed. 683 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission. 684 */ 685 static const std::string COMMON_EVENT_BLUETOOTH_A2DPSINK_PLAYING_STATE_UPDATE; 686 687 /** 688 * Indicates the action of a common event that the audio state of Bluetooth A2DP Sink has changed. 689 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission. 690 */ 691 static const std::string COMMON_EVENT_BLUETOOTH_A2DPSINK_AUDIO_STATE_UPDATE; 692 693 /** 694 * Indicates the status of the Bluetooth device connect status has been changed. 695 */ 696 static const std::string COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_CONNECT_STATUS_VALUE; 697 698 /** 699 * Indicates the action of a common event that the state of the device NFC adapter has changed. 700 * This is a protected common event, which can be sent only by the system. 701 */ 702 static const std::string COMMON_EVENT_NFC_ACTION_ADAPTER_STATE_CHANGED; 703 704 /** 705 * Indicates the action of a common event that the NFC RF field is detected to be in the enabled state. 706 * To subscribe to this common event, your application must have the ohos.permission.MANAGE_SECURE_SETTINGS 707 * permission. 708 * This is a protected common event, which can be sent only by the system. 709 */ 710 static const std::string COMMON_EVENT_NFC_ACTION_RF_FIELD_ON_DETECTED; 711 712 /** 713 * Indicates the action of a common event that the NFC RF field is detected to be in the disabled state. 714 * To subscribe to this common event, your application must have the ohos.permission.MANAGE_SECURE_SETTINGS 715 * permission. 716 * This is a protected common event, which can be sent only by the system. 717 */ 718 static const std::string COMMON_EVENT_NFC_ACTION_RF_FIELD_OFF_DETECTED; 719 720 /** 721 * Indicates the action of a common event that the system stops charging the battery. 722 * This is a protected common event, which can be sent only by the system. 723 */ 724 static const std::string COMMON_EVENT_DISCHARGING; 725 726 /** 727 * Indicates the action of a common event that the system starts charging the battery. 728 * This is a protected common event, which can be sent only by the system. 729 */ 730 static const std::string COMMON_EVENT_CHARGING; 731 732 /** 733 * Indicates the action of a common event that a charge type has been updated. 734 * This is a protected common event, which can be sent only by the system. 735 */ 736 static const std::string COMMON_EVENT_CHARGE_TYPE_CHANGED; 737 738 /** 739 * Indicates the action of a common event that the system idle mode has changed. 740 * This is a protected common event, which can be sent only by the system. 741 */ 742 static const std::string COMMON_EVENT_DEVICE_IDLE_MODE_CHANGED; 743 744 /** 745 * Indicates the action of a common event that the list of exempt applications is updated in the idle mode. 746 * This is a protected common event, which can be sent only by the system. 747 */ 748 static const std::string COMMON_EVENT_DEVICE_IDLE_EXEMPTION_LIST_UPDATED; 749 750 /** 751 * Indicates the action of a common event that the power save mode of the system has changed. 752 * This is a protected common event, which can be sent only by the system. 753 */ 754 static const std::string COMMON_EVENT_POWER_SAVE_MODE_CHANGED; 755 756 /** 757 * Indicates the action of a common event that a user has been added to the system. 758 * To subscribe to this common event, your application must have the ohos.permission.MANAGE_LOCAL_ACCOUNTS 759 * permission. 760 */ 761 static const std::string COMMON_EVENT_USER_ADDED; 762 /** 763 * Indicates the action of a common event that a user has been removed from the system. 764 * To subscribe to this common event, your application must have the ohos.permission.MANAGE_LOCAL_ACCOUNTS 765 * permission. 766 */ 767 static const std::string COMMON_EVENT_USER_REMOVED; 768 769 /** 770 * Indicates the action of a common event that an ability has been added. 771 * To subscribe to this common event, your application must have the ohos.permission.LISTEN_BUNDLE_CHANGE 772 * permission. 773 * This is a protected common event, which can be sent only by the system. 774 */ 775 static const std::string COMMON_EVENT_ABILITY_ADDED; 776 777 /** 778 * Indicates the action of a common event that an ability has been removed. 779 * To subscribe to this common event, your application must have the ohos.permission.LISTEN_BUNDLE_CHANGE 780 * permission. 781 * This is a protected common event, which can be sent only by the system. 782 */ 783 static const std::string COMMON_EVENT_ABILITY_REMOVED; 784 785 /** 786 * Indicates the action of a common event that an ability has been updated. 787 * To subscribe to this common event, your application must have the ohos.permission.LISTEN_BUNDLE_CHANGE 788 * permission. 789 * This is a protected common event, which can be sent only by the system. 790 */ 791 static const std::string COMMON_EVENT_ABILITY_UPDATED; 792 793 /** 794 * Indicates the action of a common event that the location mode of the system has changed. 795 * This is a protected common event, which can be sent only by the system. 796 */ 797 static const std::string COMMON_EVENT_LOCATION_MODE_STATE_CHANGED; 798 799 /** 800 * Indicates the action of a common event that the in-vehicle infotainment (IVI) system of a vehicle is sleeping. 801 * This is a protected common event, which can be sent only by the system. 802 */ 803 static const std::string COMMON_EVENT_IVI_SLEEP; 804 805 /** 806 * The ivi is slept and notify the app stop playing. 807 * This is a protected common event that can only be sent by system. 808 */ 809 static const std::string COMMON_EVENT_IVI_PAUSE; 810 811 /** 812 * Indicates the action of a common event that a third-party application is instructed to pause the current work. 813 * This is a protected common event, which can be sent only by the system. 814 */ 815 static const std::string COMMON_EVENT_IVI_STANDBY; 816 817 /** 818 * Indicates the action of a common event that a third-party application is instructed to save its last mode. 819 * This is a protected common event, which can be sent only by the system. 820 */ 821 static const std::string COMMON_EVENT_IVI_LASTMODE_SAVE; 822 823 /** 824 * Indicates the action of a common event that the voltage of the vehicle power system is abnormal. 825 * This is a protected common event, which can be sent only by the system. 826 */ 827 static const std::string COMMON_EVENT_IVI_VOLTAGE_ABNORMAL; 828 829 /** 830 * The ivi temperature is too high. 831 * This is a protected common event that can only be sent by system. 832 * This common event will be delete later, please use COMMON_EVENT_IVI_TEMPERATURE_ABNORMAL. 833 */ 834 static const std::string COMMON_EVENT_IVI_HIGH_TEMPERATURE; 835 836 /** 837 * The ivi temperature is extreme high. 838 * This is a protected common event that can only be sent by system. 839 * This common event will be delete later, please use COMMON_EVENT_IVI_TEMPERATURE_ABNORMAL. 840 */ 841 static const std::string COMMON_EVENT_IVI_EXTREME_TEMPERATURE; 842 843 /** 844 * Indicates the action of a common event that the in-vehicle system has an extreme temperature. 845 * This is a protected common event, which can be sent only by the system. 846 */ 847 static const std::string COMMON_EVENT_IVI_TEMPERATURE_ABNORMAL; 848 849 /** 850 * Indicates the action of a common event that the voltage of the vehicle power system is restored to normal. 851 * This is a protected common event, which can be sent only by the system. 852 */ 853 static const std::string COMMON_EVENT_IVI_VOLTAGE_RECOVERY; 854 855 /** 856 * Indicates the action of a common event that the temperature of the in-vehicle system is restored to normal. 857 * This is a protected common event, which can be sent only by the system. 858 */ 859 static const std::string COMMON_EVENT_IVI_TEMPERATURE_RECOVERY; 860 861 /** 862 * Indicates the action of a common event that the battery service is active. 863 * This is a protected common event, which can be sent only by the system. 864 */ 865 static const std::string COMMON_EVENT_IVI_ACTIVE; 866 867 /** 868 * The usb state changed. 869 * This is a protected common event that can only be sent by system. 870 */ 871 static const std::string COMMON_EVENT_USB_STATE; 872 873 /** 874 * The usb port changed. 875 * This is a protected common event that can only be sent by system. 876 */ 877 static const std::string COMMON_EVENT_USB_PORT_CHANGED; 878 879 /** 880 * Indicates the action of a common event that a USB device has been attached when the user device functions as a 881 * USB host. 882 * This is a protected common event, which can be sent only by the system. 883 */ 884 static const std::string COMMON_EVENT_USB_DEVICE_ATTACHED; 885 886 /** 887 * Indicates the action of a common event that a USB device has been detached when the user device functions as a 888 * USB host. 889 * This is a protected common event, which can be sent only by the system. 890 */ 891 static const std::string COMMON_EVENT_USB_DEVICE_DETACHED; 892 893 /** 894 * Indicates the action of a common event that a USB accessory has been attached. 895 * This is a protected common event, which can be sent only by the system. 896 */ 897 static const std::string COMMON_EVENT_USB_ACCESSORY_ATTACHED; 898 899 /** 900 * Indicates the action of a common event that a USB accessory has been detached. 901 * This is a protected common event, which can be sent only by the system. 902 */ 903 static const std::string COMMON_EVENT_USB_ACCESSORY_DETACHED; 904 905 /** 906 * The storage space is low. 907 * This is a protected common event that can only be sent by system. 908 */ 909 static const std::string COMMON_EVENT_DEVICE_STORAGE_LOW; 910 911 /** 912 * The storage space is normal. 913 * This is a protected common event that can only be sent by system. 914 */ 915 static const std::string COMMON_EVENT_DEVICE_STORAGE_OK; 916 917 /** 918 * The storage space is full. 919 * This is a protected common event that can only be sent by system. 920 */ 921 static const std::string COMMON_EVENT_DEVICE_STORAGE_FULL; 922 923 /** 924 * The network connection was changed. 925 * This is a protected common event that can only be sent by system. 926 */ 927 static const std::string COMMON_EVENT_CONNECTIVITY_CHANGE; 928 929 /** 930 * The global http proxy was changed. 931 * This is a protected common event that can only be sent by system. 932 */ 933 static const std::string COMMON_EVENT_HTTP_PROXY_CHANGE; 934 935 /** 936 * Indicates the action of a common event that an external storage device was removed. 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_REMOVED; 941 942 /** 943 * Indicates the action of a common event that an external storage device was unmounted. 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_DISK_UNMOUNTED; 948 949 /** 950 * Indicates the action of a common event that an external storage device was mounted. 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_DISK_MOUNTED; 955 956 /** 957 * Indicates the action of a common event that an external storage device was removed without being unmounted. 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_DISK_BAD_REMOVAL; 962 963 /** 964 * Indicates the action of a common event that an external storage device becomes unmountable. 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_DISK_UNMOUNTABLE; 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_DISK_EJECT; 976 977 /** 978 * Indicates the action of a common event that an external storage device was removed. 979 * To subscribe to this common event, your application must have the ohos.permission.STORAGE_MANAGER permission. 980 * This common event can be published only by system applications. 981 */ 982 static const std::string COMMON_EVENT_VOLUME_REMOVED; 983 984 /** 985 * Indicates the action of a common event that an external storage device was unmounted. 986 * To subscribe to this common event, your application must have the ohos.permission.STORAGE_MANAGER permission. 987 * This common event can be published only by system applications. 988 */ 989 static const std::string COMMON_EVENT_VOLUME_UNMOUNTED; 990 991 /** 992 * Indicates the action of a common event that an external storage device was mounted. 993 * To subscribe to this common event, your application must have the ohos.permission.STORAGE_MANAGER permission. 994 * This common event can be published only by system applications. 995 */ 996 static const std::string COMMON_EVENT_VOLUME_MOUNTED; 997 998 /** 999 * Indicates the action of a common event that an external storage device was removed without being unmounted. 1000 * To subscribe to this common event, your application must have the ohos.permission.STORAGE_MANAGER permission. 1001 * This common event can be published only by system applications. 1002 */ 1003 static const std::string COMMON_EVENT_VOLUME_BAD_REMOVAL; 1004 1005 /** 1006 * Indicates the action of a common event that an external storage device was ejected. 1007 * To subscribe to this common event, your application must have the ohos.permission.STORAGE_MANAGER permission. 1008 * This common event can be published only by system applications. 1009 */ 1010 static const std::string COMMON_EVENT_VOLUME_EJECT; 1011 1012 /** 1013 * Indicates the action of a common event that the account visible changed. 1014 * To subscribe to this common event, your application must have the ohos.permission.GET_APP_ACCOUNTS permission. 1015 * This is a protected common event, which can be sent only by the system. 1016 */ 1017 static const std::string COMMON_EVENT_VISIBLE_ACCOUNTS_UPDATED; 1018 1019 /** 1020 * Indicates the action of a common event that the account is deleted. 1021 * To subscribe to this common event, your application must have the ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS 1022 * permission. 1023 * This is a protected common event, which can be sent only by the system. 1024 */ 1025 static const std::string COMMON_EVENT_ACCOUNT_DELETED; 1026 1027 /** 1028 * Indicates the action of a common event that the foundation is ready. 1029 * To subscribe to this common event, your application must have the ohos.permission.RECEIVER_STARTUP_COMPLETED 1030 * permission. 1031 * This is a protected common event, which can be sent only by the system. 1032 */ 1033 static const std::string COMMON_EVENT_FOUNDATION_READY; 1034 1035 /** 1036 * Indicates the action of a common event that the default voice subscription has changed. 1037 * This is a protected common event that can only be sent by system. 1038 */ 1039 static const std::string COMMON_EVENT_SIM_CARD_DEFAULT_VOICE_SUBSCRIPTION_CHANGED; 1040 1041 /** 1042 * Indicates the action of a common event that the phone SIM card state has changed. 1043 * This is a protected common event that can only be sent by system. 1044 */ 1045 static const std::string COMMON_EVENT_SIM_STATE_CHANGED; 1046 1047 /** 1048 * Indicates the action of a common event that the airplane mode of the device has changed. 1049 * This common event can be triggered only by system applications. 1050 */ 1051 static const std::string COMMON_EVENT_AIRPLANE_MODE_CHANGED; 1052 1053 /** 1054 * Indicates the action of a common event that a new sms bas been received by the device. 1055 * To subscribe to this common event, your application must have the ohos.permission.RECEIVE_SMS permission. 1056 * This common event can be triggered only by system. 1057 */ 1058 static const std::string COMMON_EVENT_SMS_RECEIVE_COMPLETED; 1059 1060 /** 1061 * Indicates the action of a common event that a new sms emergency cell broadcast bas been received by the device. 1062 * This common event can be triggered only by system. 1063 */ 1064 static const std::string COMMON_EVENT_SMS_EMERGENCY_CB_RECEIVE_COMPLETED; 1065 1066 /** 1067 * Indicates the action of a common event that a new sms normal cell broadcast bas been received by the device. 1068 * This common event can be triggered only by system. 1069 */ 1070 static const std::string COMMON_EVENT_SMS_CB_RECEIVE_COMPLETED; 1071 1072 /** 1073 * Indicates the action of a common event that a STK command has been received by the device. 1074 * This common event can be triggered only by system. 1075 */ 1076 static const std::string COMMON_EVENT_STK_COMMAND; 1077 1078 /** 1079 * Indicates the action of a common event that STK session end. 1080 * This common event can be triggered only by system. 1081 */ 1082 static const std::string COMMON_EVENT_STK_SESSION_END; 1083 1084 /** 1085 * Indicates the action of a common event that the STK phone card state has changed. 1086 * This common event can be triggered only by system. 1087 */ 1088 static const std::string COMMON_EVENT_STK_CARD_STATE_CHANGED; 1089 1090 /** 1091 * Indicates the action of a common event that an alpha string during call control has been received by the device. 1092 * This common event can be triggered only by system. 1093 */ 1094 static const std::string COMMON_EVENT_STK_ALPHA_IDENTIFIER; 1095 1096 /** 1097 * Indicates the action of a common event that the spn display information has been updated. 1098 * This common event can be triggered only by system. 1099 */ 1100 static const std::string COMMON_EVENT_SPN_INFO_CHANGED; 1101 1102 /** 1103 * Indicates the action of a common event that the NITZ time has been updated. 1104 * This is a protected common event that can only be sent by system. 1105 */ 1106 static const std::string COMMON_EVENT_NITZ_TIME_CHANGED; 1107 1108 /** 1109 * Indicates the action of a common event that the NITZ time zone has been updated. 1110 * This is a protected common event that can only be sent by system. 1111 */ 1112 static const std::string COMMON_EVENT_NITZ_TIMEZONE_CHANGED; 1113 1114 /** 1115 * Indicates the action of a common event that a new sms wappush has been received by the device. 1116 * This is a protected common event that can only be sent by system. 1117 */ 1118 static const std::string COMMON_EVENT_SMS_WAPPUSH_RECEIVE_COMPLETED; 1119 1120 /** 1121 * Indicates the action of a common event that the operator config has been updated. 1122 * This is a protected common event that can only be sent by system. 1123 */ 1124 static const std::string COMMON_EVENT_OPERATOR_CONFIG_CHANGED; 1125 1126 /** 1127 * Indicates the action of a common event that the notification slot has been updated. 1128 * This is a protected common event that can only be sent by system. 1129 */ 1130 static const std::string COMMON_EVENT_SLOT_CHANGE; 1131 1132 /** 1133 * Only for test case. 1134 */ 1135 static const std::string COMMON_EVENT_TEST_ACTION1; 1136 1137 /** 1138 * Only for test case. 1139 */ 1140 static const std::string COMMON_EVENT_TEST_ACTION2; 1141 1142 /** 1143 * Indicates the action of a common event that the default SMS subscription has been changed. 1144 * This is a protected common event that can only be sent by system. 1145 */ 1146 static const std::string COMMON_EVENT_SIM_CARD_DEFAULT_SMS_SUBSCRIPTION_CHANGED; 1147 1148 /** 1149 * Indicates the action of a common event that the default data subscription has been changed. 1150 * This is a protected common event that can only be sent by system. 1151 */ 1152 static const std::string COMMON_EVENT_SIM_CARD_DEFAULT_DATA_SUBSCRIPTION_CHANGED; 1153 1154 /** 1155 * Indicates the action of a common event that the call state has been changed. 1156 * To subscribe to this protected common event, your application must have the ohos.permission.GET_TELEPHONY_STATE 1157 * permission. 1158 * This is a protected common event that can only be sent by system. 1159 */ 1160 static const std::string COMMON_EVENT_CALL_STATE_CHANGED; 1161 1162 /** 1163 * Indicates the action of a common event that the default main subscription has been changed. 1164 * This is a protected common event that can only be sent by system. 1165 */ 1166 static const std::string COMMON_EVENT_SIM_CARD_DEFAULT_MAIN_SUBSCRIPTION_CHANGED; 1167 1168 /** 1169 * Indicates the action of a common event that the status of setting primary slot has been changed. 1170 * This is a protected common event that can only be sent by system. 1171 */ 1172 static const std::string COMMON_EVENT_SET_PRIMARY_SLOT_STATUS; 1173 1174 /** 1175 * Indicates the action of a common event that the roaming status of main card has been changed. 1176 * This is a protected common event that can only be sent by system. 1177 */ 1178 static const std::string COMMON_EVENT_PRIMARY_SLOT_ROAMING; 1179 1180 /** 1181 * Indicates the action of a common event that the cellular data state has been changed. 1182 * This is a protected common event that can only be sent by system. 1183 */ 1184 static const std::string COMMON_EVENT_CELLULAR_DATA_STATE_CHANGED; 1185 1186 /** 1187 * Indicates the action of a common event that the signal info has been changed. 1188 * This is a protected common event that can only be sent by system. 1189 */ 1190 static const std::string COMMON_EVENT_SIGNAL_INFO_CHANGED; 1191 1192 /** 1193 * Indicates the action of a common event that the network state has been changed. 1194 * This is a protected common event that can only be sent by system. 1195 */ 1196 static const std::string COMMON_EVENT_NETWORK_STATE_CHANGED; 1197 1198 /** 1199 * Indicates the action of a common event that the incoming call has been missed. 1200 * To subscribe to this protected common event, your application must have the ohos.permission.GET_TELEPHONY_STATE 1201 * permission. 1202 * This is a protected common event that can only be sent by system. 1203 */ 1204 static const std::string COMMON_EVENT_INCOMING_CALL_MISSED; 1205 1206 /** 1207 * Indicate the result of quick fix apply. 1208 * This common event can be triggered only by system. 1209 */ 1210 static const std::string COMMON_EVENT_QUICK_FIX_APPLY_RESULT; 1211 1212 /** 1213 * Indicate the result of quick fix revoke. 1214 * This common event can be triggered only by system. 1215 */ 1216 static const std::string COMMON_EVENT_QUICK_FIX_REVOKE_RESULT; 1217 1218 /** 1219 * Indicates the action of a common event that radio state change. 1220 * To subscribe to this protected common event that can only be sent by system. 1221 */ 1222 static const std::string COMMON_EVENT_RADIO_STATE_CHANGE; 1223 1224 /** 1225 * Indicates the action of a common event about a login of a distributed account. 1226 * This is a protected common event that can only be sent by system. 1227 */ 1228 static const std::string COMMON_EVENT_DISTRIBUTED_ACCOUNT_LOGIN; 1229 1230 /** 1231 * Indicates the action of a common event about a logout of a distributed account. 1232 * This is a protected common event that can only be sent by system. 1233 */ 1234 static const std::string COMMON_EVENT_DISTRIBUTED_ACCOUNT_LOGOUT; 1235 1236 /** 1237 * Indicates the action of a common event that the token of a distributed account is invalid. 1238 * This is a protected common event that can only be sent by system. 1239 */ 1240 static const std::string COMMON_EVENT_DISTRIBUTED_ACCOUNT_TOKEN_INVALID; 1241 1242 /** 1243 * Indicates the action of a common event about a logoff of a distributed account. 1244 * This is a protected common event that can only be sent by system. 1245 */ 1246 static const std::string COMMON_EVENT_DISTRIBUTED_ACCOUNT_LOGOFF; 1247 1248 /** 1249 * Indicates the action of a common event that the user information has been updated. 1250 * This is a protected common event that can only be sent by system. 1251 */ 1252 static const std::string COMMON_EVENT_USER_INFO_UPDATED; 1253 1254 /** 1255 * Indicate the action of a common event that domain account status has been changed. 1256 * This is a protected common event that can only be sent by system. 1257 */ 1258 static const std::string COMMON_EVENT_DOMAIN_ACCOUNT_STATUS_CHANGED; 1259 1260 /** 1261 * Indicate the action of a common event that os account status has been locking. 1262 * This is a protected common event that can only be sent by system. 1263 */ 1264 static const std::string COMMON_EVENT_USER_LOCKING; 1265 1266 /** 1267 * Indicate the action of a common event that os account status has been locked. 1268 * This is a protected common event that can only be sent by system. 1269 */ 1270 static const std::string COMMON_EVENT_USER_LOCKED; 1271 1272 /** 1273 * Indicates the action of a common event that the screen lock. 1274 * This is a protected common event that can only be sent by system. 1275 */ 1276 static const std::string COMMON_EVENT_SCREEN_LOCKED; 1277 1278 /** 1279 * Indicates the action of a common event that the screen unlock. 1280 * This is a protected common event that can only be sent by system. 1281 */ 1282 static const std::string COMMON_EVENT_SCREEN_UNLOCKED; 1283 1284 /** 1285 * Indicates the action of a common event that the call audio quality information has been updated. 1286 * This is a protected common event that can only be sent by system. 1287 */ 1288 static const std::string COMMON_EVENT_AUDIO_QUALITY_CHANGE; 1289 1290 /** 1291 * Indicates the action of a common event about special code. 1292 * This is a protected common event that can only be sent by system. 1293 */ 1294 static const std::string COMMON_EVENT_SPECIAL_CODE; 1295 1296 /** 1297 * Indicates the action of a common event about reminder 1298 * When the user clicks the button and the application (creator) 1299 * is in the foreground, a event is sent. event data is: button type,reminder id 1300 */ 1301 static const std::string COMMON_EVENT_REMINDER_STATUS_CHANGE; 1302 1303 /** 1304 * Indicates that the privacy status is changed. 1305 * This is a protected common event that can only be sent by system. 1306 */ 1307 static const std::string COMMON_EVENT_PRIVACY_STATE_CHANGED; 1308 1309 /** 1310 * This common event means that minors mode is enabled. 1311 * This is a protected common event that can only be sent by system. 1312 */ 1313 static const std::string COMMON_EVENT_MINORSMODE_ON; 1314 1315 /** 1316 * This common event means that minors mode is disabled. 1317 * This is a protected common event that can only be sent by system. 1318 */ 1319 static const std::string COMMON_EVENT_MINORSMODE_OFF; 1320 1321 /** 1322 * Indicates the action of a common event that the bundle resources have been changed. 1323 * To subscribe to this common event, your application must have the ohos.permission.GET_BUNDLE_RESOURCES 1324 * permission. 1325 * This is a protected common event, which can be sent only by the system. 1326 */ 1327 static const std::string COMMON_EVENT_BUNDLE_RESOURCES_CHANGED; 1328 1329 /** 1330 * Indicates that the file access state is changed. 1331 * This is a protected common event that can only be sent by system. 1332 */ 1333 static const std::string COMMON_EVENT_SCREEN_LOCK_FILE_ACCESS_STATE_CHANGED; 1334 1335 /** 1336 * This common event means that datashare is ready. 1337 * This is a protected common event that can only be sent by system. 1338 */ 1339 static const std::string COMMON_EVENT_DATA_SHARE_READY; 1340 1341 /** 1342 * This common event means that overlay package is added. 1343 * This is a protected common event that can only be sent by system. 1344 */ 1345 static const std::string COMMON_EVENT_OVERLAY_PACKAGE_ADDED; 1346 1347 /** 1348 * This common event means that overlay package is changed. 1349 * This is a protected common event that can only be sent by system. 1350 */ 1351 static const std::string COMMON_EVENT_OVERLAY_PACKAGE_CHANGED; 1352 1353 /** 1354 * This common event means that disposed rule is added. 1355 * This is a protected common event that can only be sent by system. 1356 */ 1357 static const std::string COMMON_EVENT_DISPOSED_RULE_ADDED; 1358 1359 /** 1360 * This common event means that disposed rule is deleted. 1361 * This is a protected common event that can only be sent by system. 1362 */ 1363 static const std::string COMMON_EVENT_DISPOSED_RULE_DELETED; 1364 1365 /** 1366 * This common event means that vpn connection status has been changed. 1367 * This is a protected common event that can only be sent by system. 1368 */ 1369 static const std::string COMMON_EVENT_VPN_CONNECTION_STATUS_CHANGED; 1370 1371 /** 1372 * This common event means that the second mount is ready. 1373 * This is a protected common event that can only be sent by system. 1374 */ 1375 static const std::string COMMON_EVENT_SECOND_MOUNTED; 1376 1377 /** 1378 * Indicates that an application begins to restored. 1379 * This is a protected common event that can only be sent by system. 1380 */ 1381 static const std::string COMMON_EVENT_RESTORE_START; 1382 1383 /** 1384 * Indicates that the managed browser policy is changed. 1385 * This is a protected common event that can only be sent by system. 1386 */ 1387 static const std::string COMMON_EVENT_MANAGED_BROWSER_POLICY_CHANGED; 1388 1389 /** 1390 * Indicates that the default application is changed. 1391 * This is a protected common event that can only be sent by system. 1392 */ 1393 static const std::string COMMON_EVENT_DEFAULT_APPLICATION_CHANGED; 1394 1395 /** 1396 * This common event means that shortcut has been changed. 1397 * To subscribe to this common event, your application must have the ohos.permission.MANAGE_SHORTCUTS permission. 1398 * This is a protected common event that can only be sent by system. 1399 */ 1400 static const std::string COMMON_EVENT_SHORTCUT_CHANGED; 1401 1402 /** 1403 * This common event means that a system user joins in the account-related trusted device group. 1404 * This is a protected common event that can only be sent by system. 1405 */ 1406 static const std::string COMMON_EVENT_TRUSTED_RING_CHECKIN; 1407 1408 /** 1409 * This common event means that a system user quits the account-relate trusted device group. 1410 * This is a protected common event that can only be sent by system. 1411 */ 1412 static const std::string COMMON_EVENT_TRUSTED_RING_CHECKOUT; 1413 1414 /** 1415 * This common event means that the account-related trusted device group has been reset. 1416 * This is a protected common event that can only be sent by system. 1417 */ 1418 static const std::string COMMON_EVENT_TRUSTED_RING_RESET; 1419 1420 /** 1421 * Indicates that the device has entered kiosk mode. 1422 * This is a protected common event that can only be sent by system. 1423 */ 1424 static const std::string COMMON_EVENT_KIOSK_MODE_ON; 1425 /** 1426 * Indicates that the device has exited kiosk mode. 1427 * This is a protected common event that can only be sent by system. 1428 */ 1429 static const std::string COMMON_EVENT_KIOSK_MODE_OFF; 1430 /** 1431 * Indicates that the device has updated the config policy of customazation subsystem. 1432 * This is a protected common event that can only be sent by system. 1433 */ 1434 static const std::string COMMON_EVENT_CUSTOM_CONFIG_POLICY_UPDATED; 1435 1436 /** 1437 * Indicates that the device has updated the custom roaming region of device. 1438 * This is a protected common event that can only be sent by system. 1439 */ 1440 static const std::string COMMON_EVENT_CUSTOM_ROAMING_REGION_UPDATED; 1441 1442 public: 1443 CommonEventSupport(); 1444 1445 virtual ~CommonEventSupport(); 1446 1447 /** 1448 * Checks whether the current common event is a system common event. 1449 * @param str Indicates the action of a common event. 1450 * @return Returns whether the current common event is a system common event or not. 1451 */ 1452 bool IsSystemEvent(std::string &str); 1453 1454 private: 1455 void Init(); 1456 1457 private: 1458 std::vector<std::string> commonEventSupport_; 1459 }; 1460 } // namespace EventFwk 1461 } // namespace OHOS 1462 1463 #endif // FOUNDATION_EVENT_CESFWK_KITS_NATIVE_INCLUDE_COMMON_EVENT_SUPPORT_H 1464