1/* 2 * Copyright (c) 2021-2022 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 16import { AsyncCallback } from './basic'; 17import { CommonEventData } from './commonEvent/commonEventData'; 18import { CommonEventSubscriber } from './commonEvent/commonEventSubscriber'; 19import { CommonEventSubscribeInfo } from './commonEvent/commonEventSubscribeInfo'; 20import { CommonEventPublishData } from './commonEvent/commonEventPublishData'; 21 22/** 23 * Common event definition 24 * @name commonEvent 25 * @since 7 26 * @syscap SystemCapability.Notification.CommonEvent 27 * @permission N/A 28 * @deprecated since 9 29 * @useinstead ohos.commonEventManager 30 */ 31declare namespace commonEvent { 32 /** 33 * Publishes an ordered, sticky, or standard common event. 34 * 35 * @since 7 36 * @param event name of the common event. 37 * @param callback Specified callback method. 38 * @returns - 39 * @deprecated since 9 40 * @useinstead ohos.commonEventManager.publish 41 */ 42 function publish(event: string, callback: AsyncCallback<void>): void; 43 44 /** 45 * Publishes an ordered, sticky, or standard common event. 46 * 47 * @since 7 48 * @param event name of the common event. 49 * @param options Indicate the CommonEventPublishData containing the common event content and attributes. 50 * @param callback Specified callback method. 51 * @returns - 52 * @deprecated since 9 53 * @useinstead ohos.commonEventManager.publish 54 */ 55 function publish(event: string, options: CommonEventPublishData, callback: AsyncCallback<void>): void; 56 57 /** 58 * Publishes an ordered, sticky, or standard common event to a specified user. 59 * 60 * @since 8 61 * @param event Specified the names of the common events. 62 * @param userId Specified the user to receive the common events. 63 * @param callback Specified callback method. 64 * @returns - 65 * 66 * @systemapi Hide this for inner system use. 67 * @deprecated since 9 68 * @useinstead ohos.commonEventManager.publishAsUser 69 */ 70 function publishAsUser(event: string, userId: number, callback: AsyncCallback<void>): void; 71 72 /** 73 * Publishes an ordered, sticky, or standard common event to a specified user. 74 * 75 * @since 8 76 * @param event Specified the names of the common events. 77 * @param userId Specified the user to receive the common events. 78 * @param options Indicates the CommonEventPublishData containing the common event content and attributes. 79 * @param callback Specified callback method. 80 * @returns - 81 * 82 * @systemapi Hide this for inner system use. 83 * @deprecated since 9 84 * @useinstead ohos.commonEventManager.publishAsUser 85 */ 86 function publishAsUser(event: string, userId: number, options: CommonEventPublishData, callback: AsyncCallback<void>): void; 87 88 /** 89 * creates a CommonEventSubscriber for the SubscriberInfo. 90 * 91 * @since 7 92 * @param subscribeInfo Indicates the information of the subscriber. 93 * @param callback Specified callback method. 94 * @returns - 95 * @deprecated since 9 96 * @useinstead ohos.commonEventManager.createSubscriber 97 */ 98 function createSubscriber(subscribeInfo: CommonEventSubscribeInfo, callback: AsyncCallback<CommonEventSubscriber>): void; 99 100 /** 101 * create the CommonEventSubscriber for the SubscriberInfo. 102 * 103 * @since 7 104 * @param subscribeInfo Indicates the information of the subscriber. 105 * @returns Returns common event subscriber object 106 * @deprecated since 9 107 * @useinstead ohos.commonEventManager.createSubscriber 108 */ 109 function createSubscriber(subscribeInfo: CommonEventSubscribeInfo): Promise<CommonEventSubscriber>; 110 111 /** 112 * subscribe an ordered, sticky, or standard common event. 113 * 114 * @since 7 115 * @param subscriber Indicate the subscriber of the common event. 116 * @param callback Specified callback method. 117 * @returns - 118 * @deprecated since 9 119 * @useinstead ohos.commonEventManager.subscribe 120 */ 121 function subscribe(subscriber: CommonEventSubscriber, callback: AsyncCallback<CommonEventData>): void; 122 123 /** 124 * unsubscribe from an ordered, sticky, or standard common event. 125 * 126 * @since 7 127 * @param subscriber Indicate the subscriber of the common event. 128 * @param callback Specified callback method. 129 * @returns - 130 * @deprecated since 9 131 * @useinstead ohos.commonEventManager.unsubscribe 132 */ 133 function unsubscribe(subscriber: CommonEventSubscriber, callback?: AsyncCallback<void>): void; 134 135 /** 136 * the event type that the commonEvent supported 137 * @name Support 138 * @since 7 139 * @permission N/A 140 * @deprecated since 9 141 * @useinstead ohos.commonEventManager.Support 142 */ 143 export enum Support { 144 /** 145 * This commonEvent means when the device is booted or system upgrade completed, and only be sent by system. 146 */ 147 COMMON_EVENT_BOOT_COMPLETED = "usual.event.BOOT_COMPLETED", 148 149 /** 150 * This commonEvent means when the device finnish booting, but still in the locked state. 151 */ 152 COMMON_EVENT_LOCKED_BOOT_COMPLETED = "usual.event.LOCKED_BOOT_COMPLETED", 153 154 /** 155 * This commonEvent means when the device is shutting down, note: turn off, not sleeping. 156 */ 157 COMMON_EVENT_SHUTDOWN = "usual.event.SHUTDOWN", 158 159 /** 160 * This commonEvent means when the charging state, level and so on about the battery. 161 */ 162 COMMON_EVENT_BATTERY_CHANGED = "usual.event.BATTERY_CHANGED", 163 164 /** 165 * This commonEvent means when the device in low battery state.. 166 */ 167 COMMON_EVENT_BATTERY_LOW = "usual.event.BATTERY_LOW", 168 169 /** 170 * This commonEvent means when the battery level is an ok state. 171 */ 172 COMMON_EVENT_BATTERY_OKAY = "usual.event.BATTERY_OKAY", 173 174 /** 175 * This commonEvent means when the other power is connected to the device. 176 */ 177 COMMON_EVENT_POWER_CONNECTED = "usual.event.POWER_CONNECTED", 178 179 /** 180 * This commonEvent means when the other power is removed from the device. 181 */ 182 COMMON_EVENT_POWER_DISCONNECTED = "usual.event.POWER_DISCONNECTED", 183 184 /** 185 * This commonEvent means when the screen is turned off. 186 */ 187 COMMON_EVENT_SCREEN_OFF = "usual.event.SCREEN_OFF", 188 189 /** 190 * This commonEvent means when the device is awakened and interactive. 191 */ 192 COMMON_EVENT_SCREEN_ON = "usual.event.SCREEN_ON", 193 194 /** 195 * This commonEvent means when the thermal state level change 196 * @since 8 197 */ 198 COMMON_EVENT_THERMAL_LEVEL_CHANGED = "usual.event.THERMAL_LEVEL_CHANGED", 199 200 /** 201 * This commonEvent means when the user is present after the device is awakened. 202 */ 203 COMMON_EVENT_USER_PRESENT = "usual.event.USER_PRESENT", 204 205 /** 206 * This commonEvent means when the current time is changed. 207 */ 208 COMMON_EVENT_TIME_TICK = "usual.event.TIME_TICK", 209 210 /** 211 * This commonEvent means when the time is set. 212 */ 213 COMMON_EVENT_TIME_CHANGED = "usual.event.TIME_CHANGED", 214 215 /** 216 * This commonEvent means when the current date is changed. 217 */ 218 COMMON_EVENT_DATE_CHANGED = "usual.event.DATE_CHANGED", 219 220 /** 221 * This commonEvent means when the time zone is changed. 222 */ 223 COMMON_EVENT_TIMEZONE_CHANGED = "usual.event.TIMEZONE_CHANGED", 224 225 /** 226 * This commonEvent means when the dialog to dismiss. 227 */ 228 COMMON_EVENT_CLOSE_SYSTEM_DIALOGS = "usual.event.CLOSE_SYSTEM_DIALOGS", 229 230 /** 231 * This commonEvent means when a new application package is installed on the device. 232 */ 233 COMMON_EVENT_PACKAGE_ADDED = "usual.event.PACKAGE_ADDED", 234 235 /** 236 * This commonEvent means when a new version application package is installed on the device and 237 * replace the old version.the data contains the name of the package. 238 */ 239 COMMON_EVENT_PACKAGE_REPLACED = "usual.event.PACKAGE_REPLACED", 240 241 /** 242 * This commonEvent means when a new version application package is installed on the device and 243 * replace the old version, it does not contain additional data and only be sent to the replaced application. 244 */ 245 COMMON_EVENT_MY_PACKAGE_REPLACED = "usual.event.MY_PACKAGE_REPLACED", 246 247 /** 248 * This commonEvent means when an existing application package is removed from the device. 249 */ 250 COMMON_EVENT_PACKAGE_REMOVED = "usual.event.PACKAGE_REMOVED", 251 252 /** 253 * This commonEvent means when an existing application package is removed from the device. 254 */ 255 COMMON_EVENT_BUNDLE_REMOVED = "usual.event.BUNDLE_REMOVED", 256 257 /** 258 * This commonEvent means when an existing application package is completely removed from the device. 259 */ 260 COMMON_EVENT_PACKAGE_FULLY_REMOVED = "usual.event.PACKAGE_FULLY_REMOVED", 261 262 /** 263 * This commonEvent means when an existing application package has been changed. 264 */ 265 COMMON_EVENT_PACKAGE_CHANGED = "usual.event.PACKAGE_CHANGED", 266 267 /** 268 * This commonEvent means the user has restarted a package, and all of its processes have been killed. 269 */ 270 COMMON_EVENT_PACKAGE_RESTARTED = "usual.event.PACKAGE_RESTARTED", 271 272 /** 273 * This commonEvent means the user has cleared the package data. 274 */ 275 COMMON_EVENT_PACKAGE_DATA_CLEARED = "usual.event.PACKAGE_DATA_CLEARED", 276 277 /** 278 * This commonEvent means the packages have been suspended. 279 */ 280 COMMON_EVENT_PACKAGES_SUSPENDED = "usual.event.PACKAGES_SUSPENDED", 281 282 /** 283 * This commonEvent means the packages have been un-suspended. 284 */ 285 COMMON_EVENT_PACKAGES_UNSUSPENDED = "usual.event.PACKAGES_UNSUSPENDED", 286 287 /** 288 * This commonEvent Sent to a package that has been suspended by the system. 289 */ 290 COMMON_EVENT_MY_PACKAGE_SUSPENDED = "usual.event.MY_PACKAGE_SUSPENDED", 291 292 /** 293 * Sent to a package that has been un-suspended. 294 */ 295 COMMON_EVENT_MY_PACKAGE_UNSUSPENDED = "usual.event.MY_PACKAGE_UNSUSPENDED", 296 297 /** 298 * A user id has been removed from the system. 299 */ 300 COMMON_EVENT_UID_REMOVED = "usual.event.UID_REMOVED", 301 302 /** 303 * The application is first launched after installed. 304 */ 305 COMMON_EVENT_PACKAGE_FIRST_LAUNCH = "usual.event.PACKAGE_FIRST_LAUNCH", 306 307 /** 308 * Sent by system package verifier when a package need to be verified. 309 */ 310 COMMON_EVENT_PACKAGE_NEEDS_VERIFICATION = 311 "usual.event.PACKAGE_NEEDS_VERIFICATION", 312 313 /** 314 * Sent by system package verifier when a package is verified. 315 */ 316 COMMON_EVENT_PACKAGE_VERIFIED = "usual.event.PACKAGE_VERIFIED", 317 318 /** 319 * Resources for a set of packages (which were previously unavailable) are currently 320 * available since the media on which they exist is available. 321 */ 322 COMMON_EVENT_EXTERNAL_APPLICATIONS_AVAILABLE = 323 "usual.event.EXTERNAL_APPLICATIONS_AVAILABLE", 324 325 /** 326 * Resources for a set of packages are currently unavailable since the media on which they exist is unavailable. 327 */ 328 COMMON_EVENT_EXTERNAL_APPLICATIONS_UNAVAILABLE = 329 "usual.event.EXTERNAL_APPLICATIONS_UNAVAILABLE", 330 331 /** 332 * The device configuration such as orientation,locale have been changed. 333 */ 334 COMMON_EVENT_CONFIGURATION_CHANGED = "usual.event.CONFIGURATION_CHANGED", 335 336 /** 337 * The current device's locale has changed. 338 */ 339 COMMON_EVENT_LOCALE_CHANGED = "usual.event.LOCALE_CHANGED", 340 341 /** 342 * Indicates low memory condition notification acknowledged by user and package management should be started. 343 */ 344 COMMON_EVENT_MANAGE_PACKAGE_STORAGE = "usual.event.MANAGE_PACKAGE_STORAGE", 345 346 /** 347 * Sent by the smart function when the system in drive mode. 348 */ 349 COMMON_EVENT_DRIVE_MODE = "common.event.DRIVE_MODE", 350 351 /** 352 * Sent by the smart function when the system in home mode. 353 */ 354 COMMON_EVENT_HOME_MODE = "common.event.HOME_MODE", 355 356 /** 357 * Sent by the smart function when the system in office mode. 358 */ 359 COMMON_EVENT_OFFICE_MODE = "common.event.OFFICE_MODE", 360 361 /** 362 * Remind new user of preparing to start. 363 */ 364 COMMON_EVENT_USER_STARTED = "usual.event.USER_STARTED", 365 366 /** 367 * Remind previous user of that the service has been the background. 368 */ 369 COMMON_EVENT_USER_BACKGROUND = "usual.event.USER_BACKGROUND", 370 371 /** 372 * Remind new user of that the service has been the foreground. 373 */ 374 COMMON_EVENT_USER_FOREGROUND = "usual.event.USER_FOREGROUND", 375 376 /** 377 * Remind new user of that the service has been switched to new user. 378 */ 379 COMMON_EVENT_USER_SWITCHED = "usual.event.USER_SWITCHED", 380 381 /** 382 * Remind new user of that the service has been starting. 383 */ 384 COMMON_EVENT_USER_STARTING = "usual.event.USER_STARTING", 385 386 /** 387 * Remind new user of that the service has been unlocked. 388 */ 389 COMMON_EVENT_USER_UNLOCKED = "usual.event.USER_UNLOCKED", 390 391 /** 392 * Remind new user of that the service has been stopping. 393 */ 394 COMMON_EVENT_USER_STOPPING = "usual.event.USER_STOPPING", 395 396 /** 397 * Remind new user of that the service has stopped. 398 */ 399 COMMON_EVENT_USER_STOPPED = "usual.event.USER_STOPPED", 400 401 /** 402 * HW id login successfully. 403 */ 404 COMMON_EVENT_HWID_LOGIN = "common.event.HWID_LOGIN", 405 406 /** 407 * HW id logout successfully. 408 */ 409 COMMON_EVENT_HWID_LOGOUT = "common.event.HWID_LOGOUT", 410 411 /** 412 * HW id is invalid. 413 */ 414 COMMON_EVENT_HWID_TOKEN_INVALID = "common.event.HWID_TOKEN_INVALID", 415 416 /** 417 * HW id logs off. 418 */ 419 COMMON_EVENT_HWID_LOGOFF = "common.event.HWID_LOGOFF", 420 421 /** 422 * WIFI state. 423 */ 424 COMMON_EVENT_WIFI_POWER_STATE = "usual.event.wifi.POWER_STATE", 425 426 /** 427 * WIFI scan results. 428 */ 429 COMMON_EVENT_WIFI_SCAN_FINISHED = "usual.event.wifi.SCAN_FINISHED", 430 431 /** 432 * WIFI RSSI change. 433 */ 434 COMMON_EVENT_WIFI_RSSI_VALUE = "usual.event.wifi.RSSI_VALUE", 435 436 /** 437 * WIFI connect state. 438 */ 439 COMMON_EVENT_WIFI_CONN_STATE = "usual.event.wifi.CONN_STATE", 440 441 /** 442 * WIFI hotspot state. 443 */ 444 COMMON_EVENT_WIFI_HOTSPOT_STATE = "usual.event.wifi.HOTSPOT_STATE", 445 446 /** 447 * WIFI ap sta join. 448 */ 449 COMMON_EVENT_WIFI_AP_STA_JOIN = "usual.event.wifi.WIFI_HS_STA_JOIN", 450 451 /** 452 * WIFI ap sta join. 453 */ 454 COMMON_EVENT_WIFI_AP_STA_LEAVE = "usual.event.wifi.WIFI_HS_STA_LEAVE", 455 456 /** 457 * Indicates Wi-Fi MpLink state notification acknowledged by binding or unbinding MpLink. 458 */ 459 COMMON_EVENT_WIFI_MPLINK_STATE_CHANGE = "usual.event.wifi.mplink.STATE_CHANGE", 460 461 /** 462 * Indicates Wi-Fi P2P connection state notification acknowledged by connecting or disconnected P2P. 463 */ 464 COMMON_EVENT_WIFI_P2P_CONN_STATE = "usual.event.wifi.p2p.CONN_STATE_CHANGE", 465 466 /** 467 * Indicates that the Wi-Fi P2P state change. 468 */ 469 COMMON_EVENT_WIFI_P2P_STATE_CHANGED = "usual.event.wifi.p2p.STATE_CHANGE", 470 471 /** 472 * Indicates that the Wi-Fi P2P peers state change. 473 */ 474 COMMON_EVENT_WIFI_P2P_PEERS_STATE_CHANGED = 475 "usual.event.wifi.p2p.DEVICES_CHANGE", 476 477 /** 478 * Indicates that the Wi-Fi P2P discovery state change. 479 */ 480 COMMON_EVENT_WIFI_P2P_PEERS_DISCOVERY_STATE_CHANGED = 481 "usual.event.wifi.p2p.PEER_DISCOVERY_STATE_CHANGE", 482 483 /** 484 * Indicates that the Wi-Fi P2P current device state change. 485 */ 486 COMMON_EVENT_WIFI_P2P_CURRENT_DEVICE_STATE_CHANGED = 487 "usual.event.wifi.p2p.CURRENT_DEVICE_CHANGE", 488 489 /** 490 * Indicates that the Wi-Fi P2P group info is changed. 491 */ 492 COMMON_EVENT_WIFI_P2P_GROUP_STATE_CHANGED = 493 "usual.event.wifi.p2p.GROUP_STATE_CHANGED", 494 495 /** 496 * bluetooth.handsfree.ag.connect.state.update. 497 */ 498 COMMON_EVENT_BLUETOOTH_HANDSFREE_AG_CONNECT_STATE_UPDATE = 499 "usual.event.bluetooth.handsfree.ag.CONNECT_STATE_UPDATE", 500 501 /** 502 * bluetooth.handsfree.ag.current.device.update. 503 */ 504 COMMON_EVENT_BLUETOOTH_HANDSFREE_AG_CURRENT_DEVICE_UPDATE = 505 "usual.event.bluetooth.handsfree.ag.CURRENT_DEVICE_UPDATE", 506 507 /** 508 * bluetooth.handsfree.ag.audio.state.update. 509 */ 510 COMMON_EVENT_BLUETOOTH_HANDSFREE_AG_AUDIO_STATE_UPDATE = 511 "usual.event.bluetooth.handsfree.ag.AUDIO_STATE_UPDATE", 512 513 /** 514 * bluetooth.a2dpsource.connect.state.update. 515 */ 516 COMMON_EVENT_BLUETOOTH_A2DPSOURCE_CONNECT_STATE_UPDATE = 517 "usual.event.bluetooth.a2dpsource.CONNECT_STATE_UPDATE", 518 519 /** 520 * bluetooth.a2dpsource.current.device.update. 521 */ 522 COMMON_EVENT_BLUETOOTH_A2DPSOURCE_CURRENT_DEVICE_UPDATE = 523 "usual.event.bluetooth.a2dpsource.CURRENT_DEVICE_UPDATE", 524 525 /** 526 * bluetooth.a2dpsource.playing.state.update. 527 */ 528 COMMON_EVENT_BLUETOOTH_A2DPSOURCE_PLAYING_STATE_UPDATE = 529 "usual.event.bluetooth.a2dpsource.PLAYING_STATE_UPDATE", 530 531 /** 532 * bluetooth.a2dpsource.avrcp.connect.state.update. 533 */ 534 COMMON_EVENT_BLUETOOTH_A2DPSOURCE_AVRCP_CONNECT_STATE_UPDATE = 535 "usual.event.bluetooth.a2dpsource.AVRCP_CONNECT_STATE_UPDATE", 536 537 /** 538 * bluetooth.a2dpsource.codec.value.update. 539 */ 540 COMMON_EVENT_BLUETOOTH_A2DPSOURCE_CODEC_VALUE_UPDATE = 541 "usual.event.bluetooth.a2dpsource.CODEC_VALUE_UPDATE", 542 543 /** 544 * bluetooth.remotedevice.discovered. 545 */ 546 COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_DISCOVERED = 547 "usual.event.bluetooth.remotedevice.DISCOVERED", 548 549 /** 550 * bluetooth.remotedevice.class.value.update. 551 */ 552 COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_CLASS_VALUE_UPDATE = 553 "usual.event.bluetooth.remotedevice.CLASS_VALUE_UPDATE", 554 555 /** 556 * bluetooth.remotedevice.acl.connected. 557 */ 558 COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_ACL_CONNECTED = 559 "usual.event.bluetooth.remotedevice.ACL_CONNECTED", 560 561 /** 562 * bluetooth.remotedevice.acl.disconnected. 563 */ 564 COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_ACL_DISCONNECTED = 565 "usual.event.bluetooth.remotedevice.ACL_DISCONNECTED", 566 567 /** 568 * bluetooth.remotedevice.name.update. 569 */ 570 COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_NAME_UPDATE = 571 "usual.event.bluetooth.remotedevice.NAME_UPDATE", 572 573 /** 574 * bluetooth.remotedevice.pair.state. 575 */ 576 COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_PAIR_STATE = 577 "usual.event.bluetooth.remotedevice.PAIR_STATE", 578 579 /** 580 * bluetooth.remotedevice.battery.value.update. 581 */ 582 COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_BATTERY_VALUE_UPDATE = 583 "usual.event.bluetooth.remotedevice.BATTERY_VALUE_UPDATE", 584 585 /** 586 * bluetooth.remotedevice.sdp.result. 587 */ 588 COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_SDP_RESULT = 589 "usual.event.bluetooth.remotedevice.SDP_RESULT", 590 591 /** 592 * bluetooth.remotedevice.uuid.value. 593 */ 594 COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_UUID_VALUE = 595 "usual.event.bluetooth.remotedevice.UUID_VALUE", 596 597 /** 598 * bluetooth.remotedevice.pairing.req. 599 */ 600 COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_PAIRING_REQ = 601 "usual.event.bluetooth.remotedevice.PAIRING_REQ", 602 603 /** 604 * bluetooth.remotedevice.pairing.cancel. 605 */ 606 COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_PAIRING_CANCEL = 607 "usual.event.bluetooth.remotedevice.PAIRING_CANCEL", 608 609 /** 610 * bluetooth.remotedevice.connect.req. 611 */ 612 COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_CONNECT_REQ = 613 "usual.event.bluetooth.remotedevice.CONNECT_REQ", 614 615 /** 616 * bluetooth.remotedevice.connect.reply. 617 */ 618 COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_CONNECT_REPLY = 619 "usual.event.bluetooth.remotedevice.CONNECT_REPLY", 620 621 /** 622 * bluetooth.remotedevice.connect.cancel. 623 */ 624 COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_CONNECT_CANCEL = 625 "usual.event.bluetooth.remotedevice.CONNECT_CANCEL", 626 627 /** 628 * bluetooth.handsfreeunit.connect.state.update. 629 */ 630 COMMON_EVENT_BLUETOOTH_HANDSFREEUNIT_CONNECT_STATE_UPDATE = 631 "usual.event.bluetooth.handsfreeunit.CONNECT_STATE_UPDATE", 632 633 /** 634 * bluetooth.handsfreeunit.audio.state.update. 635 */ 636 COMMON_EVENT_BLUETOOTH_HANDSFREEUNIT_AUDIO_STATE_UPDATE = 637 "usual.event.bluetooth.handsfreeunit.AUDIO_STATE_UPDATE", 638 639 /** 640 * bluetooth.handsfreeunit.ag.common.event. 641 */ 642 COMMON_EVENT_BLUETOOTH_HANDSFREEUNIT_AG_COMMON_EVENT = 643 "usual.event.bluetooth.handsfreeunit.AG_COMMON_EVENT", 644 645 /** 646 * bluetooth.handsfreeunit.ag.call.state.update. 647 */ 648 COMMON_EVENT_BLUETOOTH_HANDSFREEUNIT_AG_CALL_STATE_UPDATE = 649 "usual.event.bluetooth.handsfreeunit.AG_CALL_STATE_UPDATE", 650 651 /** 652 * bluetooth.host.state.update. 653 */ 654 COMMON_EVENT_BLUETOOTH_HOST_STATE_UPDATE = 655 "usual.event.bluetooth.host.STATE_UPDATE", 656 657 /** 658 * bluetooth.host.req.discoverable. 659 */ 660 COMMON_EVENT_BLUETOOTH_HOST_REQ_DISCOVERABLE = 661 "usual.event.bluetooth.host.REQ_DISCOVERABLE", 662 663 /** 664 * bluetooth.host.req.enable. 665 */ 666 COMMON_EVENT_BLUETOOTH_HOST_REQ_ENABLE = "usual.event.bluetooth.host.REQ_ENABLE", 667 668 /** 669 * bluetooth.host.req.disable. 670 */ 671 COMMON_EVENT_BLUETOOTH_HOST_REQ_DISABLE = 672 "usual.event.bluetooth.host.REQ_DISABLE", 673 674 /** 675 * bluetooth.host.scan.mode.update. 676 */ 677 COMMON_EVENT_BLUETOOTH_HOST_SCAN_MODE_UPDATE = 678 "usual.event.bluetooth.host.SCAN_MODE_UPDATE", 679 680 /** 681 * bluetooth.host.discovery.stated. 682 */ 683 COMMON_EVENT_BLUETOOTH_HOST_DISCOVERY_STARTED = 684 "usual.event.bluetooth.host.DISCOVERY_STARTED", 685 686 /** 687 * bluetooth.host.discovery.finished. 688 */ 689 COMMON_EVENT_BLUETOOTH_HOST_DISCOVERY_FINISHED = 690 "usual.event.bluetooth.host.DISCOVERY_FINISHED", 691 692 /** 693 * bluetooth.host.name.update. 694 */ 695 COMMON_EVENT_BLUETOOTH_HOST_NAME_UPDATE = 696 "usual.event.bluetooth.host.NAME_UPDATE", 697 698 /** 699 * bluetooth.a2dp.connect.state.update. 700 */ 701 COMMON_EVENT_BLUETOOTH_A2DPSINK_CONNECT_STATE_UPDATE = 702 "usual.event.bluetooth.a2dpsink.CONNECT_STATE_UPDATE", 703 704 /** 705 * bluetooth.a2dp.playing.state.update. 706 */ 707 COMMON_EVENT_BLUETOOTH_A2DPSINK_PLAYING_STATE_UPDATE = 708 "usual.event.bluetooth.a2dpsink.PLAYING_STATE_UPDATE", 709 710 /** 711 * bluetooth.a2dp.audio.state.update. 712 */ 713 COMMON_EVENT_BLUETOOTH_A2DPSINK_AUDIO_STATE_UPDATE = 714 "usual.event.bluetooth.a2dpsink.AUDIO_STATE_UPDATE", 715 716 /** 717 * Nfc state change. 718 */ 719 COMMON_EVENT_NFC_ACTION_ADAPTER_STATE_CHANGED = 720 "usual.event.nfc.action.ADAPTER_STATE_CHANGED", 721 722 /** 723 * Nfc field on detected. 724 */ 725 COMMON_EVENT_NFC_ACTION_RF_FIELD_ON_DETECTED = 726 "usual.event.nfc.action.RF_FIELD_ON_DETECTED", 727 728 /** 729 * Nfc field off detected. 730 */ 731 COMMON_EVENT_NFC_ACTION_RF_FIELD_OFF_DETECTED = 732 "usual.event.nfc.action.RF_FIELD_OFF_DETECTED", 733 734 /** 735 * Sent when stop charging battery. 736 */ 737 COMMON_EVENT_DISCHARGING = "usual.event.DISCHARGING", 738 739 /** 740 * Sent when start charging battery. 741 */ 742 COMMON_EVENT_CHARGING = "usual.event.CHARGING", 743 744 /** 745 * Sent when device's idle mode changed 746 */ 747 COMMON_EVENT_DEVICE_IDLE_MODE_CHANGED = "usual.event.DEVICE_IDLE_MODE_CHANGED", 748 749 /** 750 * Sent when device's power save mode changed 751 */ 752 COMMON_EVENT_POWER_SAVE_MODE_CHANGED = "usual.event.POWER_SAVE_MODE_CHANGED", 753 754 /** 755 * User added. 756 */ 757 COMMON_EVENT_USER_ADDED = "usual.event.USER_ADDED", 758 759 /** 760 * User removed. 761 */ 762 COMMON_EVENT_USER_REMOVED = "usual.event.USER_REMOVED", 763 764 /** 765 * Sent when ability is added. 766 */ 767 COMMON_EVENT_ABILITY_ADDED = "common.event.ABILITY_ADDED", 768 769 /** 770 * Sent when ability is removed. 771 */ 772 COMMON_EVENT_ABILITY_REMOVED = "common.event.ABILITY_REMOVED", 773 774 /** 775 * Sent when ability is updated. 776 */ 777 COMMON_EVENT_ABILITY_UPDATED = "common.event.ABILITY_UPDATED", 778 779 /** 780 * Gps mode state changed. 781 */ 782 COMMON_EVENT_LOCATION_MODE_STATE_CHANGED = 783 "usual.event.location.MODE_STATE_CHANGED", 784 785 /** 786 * The ivi is about to go into sleep state when the ivi is turned off power. 787 * This is a protected common event that can only be sent by system. 788 */ 789 COMMON_EVENT_IVI_SLEEP = "common.event.IVI_SLEEP", 790 791 /** 792 * The ivi is slept and notify the app stop playing. 793 * This is a protected common event that can only be sent by system. 794 */ 795 COMMON_EVENT_IVI_PAUSE = "common.event.IVI_PAUSE", 796 797 /** 798 * The ivi is standby and notify the app stop playing. 799 * This is a protected common event that can only be sent by system. 800 */ 801 COMMON_EVENT_IVI_STANDBY = "common.event.IVI_STANDBY", 802 803 /** 804 * The app stop playing and save state. 805 * This is a protected common event that can only be sent by system. 806 */ 807 COMMON_EVENT_IVI_LASTMODE_SAVE = "common.event.IVI_LASTMODE_SAVE", 808 809 /** 810 * The ivi is voltage abnormal. 811 * This is a protected common event that can only be sent by system. 812 */ 813 COMMON_EVENT_IVI_VOLTAGE_ABNORMAL = "common.event.IVI_VOLTAGE_ABNORMAL", 814 815 /** 816 * The ivi temperature is too high. 817 * This is a protected common event that can only be sent by system.this common event will be delete later, 818 * please use COMMON_EVENT_IVI_TEMPERATURE_ABNORMAL. 819 */ 820 COMMON_EVENT_IVI_HIGH_TEMPERATURE = "common.event.IVI_HIGH_TEMPERATURE", 821 822 /** 823 * The ivi temperature is extreme high. 824 * This is a protected common event that can only be sent by system.this common event will be delete later, 825 * please use COMMON_EVENT_IVI_TEMPERATURE_ABNORMAL. 826 */ 827 COMMON_EVENT_IVI_EXTREME_TEMPERATURE = "common.event.IVI_EXTREME_TEMPERATURE", 828 829 /** 830 * The ivi temperature is abnormal. 831 * This is a protected common event that can only be sent by system. 832 */ 833 COMMON_EVENT_IVI_TEMPERATURE_ABNORMAL = "common.event.IVI_TEMPERATURE_ABNORMAL", 834 835 /** 836 * The ivi voltage is recovery. 837 * This is a protected common event that can only be sent by system. 838 */ 839 COMMON_EVENT_IVI_VOLTAGE_RECOVERY = "common.event.IVI_VOLTAGE_RECOVERY", 840 841 /** 842 * The ivi temperature is recovery. 843 * This is a protected common event that can only be sent by system. 844 */ 845 COMMON_EVENT_IVI_TEMPERATURE_RECOVERY = "common.event.IVI_TEMPERATURE_RECOVERY", 846 847 /** 848 * The battery service is active. 849 * This is a protected common event that can only be sent by system. 850 */ 851 COMMON_EVENT_IVI_ACTIVE = "common.event.IVI_ACTIVE", 852 853 /** 854 * The usb device attached. 855 * This is a protected common event that can only be sent by system. 856 */ 857 COMMON_EVENT_USB_DEVICE_ATTACHED = 858 "usual.event.hardware.usb.action.USB_DEVICE_ATTACHED", 859 860 /** 861 * The usb device detached. 862 * This is a protected common event that can only be sent by system. 863 */ 864 COMMON_EVENT_USB_DEVICE_DETACHED = 865 "usual.event.hardware.usb.action.USB_DEVICE_DETACHED", 866 867 /** 868 * The usb accessory attached. 869 * This is a protected common event that can only be sent by system. 870 */ 871 COMMON_EVENT_USB_ACCESSORY_ATTACHED = 872 "usual.event.hardware.usb.action.USB_ACCESSORY_ATTACHED", 873 874 /** 875 * The usb accessory detached. 876 * This is a protected common event that can only be sent by system. 877 */ 878 COMMON_EVENT_USB_ACCESSORY_DETACHED = 879 "usual.event.hardware.usb.action.USB_ACCESSORY_DETACHED", 880 881 /** 882 * The external storage was removed. 883 * This is a protected common event that can only be sent by system. 884 */ 885 COMMON_EVENT_DISK_REMOVED = "usual.event.data.DISK_REMOVED", 886 887 /** 888 * The external storage was unmounted. 889 * This is a protected common event that can only be sent by system. 890 */ 891 COMMON_EVENT_DISK_UNMOUNTED = "usual.event.data.DISK_UNMOUNTED", 892 893 /** 894 * The external storage was mounted. 895 * This is a protected common event that can only be sent by system. 896 */ 897 COMMON_EVENT_DISK_MOUNTED = "usual.event.data.DISK_MOUNTED", 898 899 /** 900 * The external storage was bad removal. 901 * This is a protected common event that can only be sent by system. 902 */ 903 COMMON_EVENT_DISK_BAD_REMOVAL = "usual.event.data.DISK_BAD_REMOVAL", 904 905 /** 906 * The external storage was unmountable. 907 * This is a protected common event that can only be sent by system. 908 */ 909 COMMON_EVENT_DISK_UNMOUNTABLE = "usual.event.data.DISK_UNMOUNTABLE", 910 911 /** 912 * The external storage was eject. 913 * This is a protected common event that can only be sent by system. 914 */ 915 COMMON_EVENT_DISK_EJECT = "usual.event.data.DISK_EJECT", 916 917 /** 918 * The visible of account was updated. 919 * This is a protected common event that can only be sent by system. 920 */ 921 COMMON_EVENT_VISIBLE_ACCOUNTS_UPDATED = 922 "usual.event.data.VISIBLE_ACCOUNTS_UPDATED", 923 924 /** 925 * Account was deleted. 926 * This is a protected common event that can only be sent by system. 927 */ 928 COMMON_EVENT_ACCOUNT_DELETED = "usual.event.data.ACCOUNT_DELETED", 929 930 /** 931 * Foundation was ready. 932 * This is a protected common event that can only be sent by system. 933 */ 934 COMMON_EVENT_FOUNDATION_READY = "common.event.FOUNDATION_READY", 935 936 /** 937 * Indicates the common event Action indicating that the airplane mode status of the device changes. 938 * Users can register this event to listen to the change of the airplane mode status of the device. 939 */ 940 COMMON_EVENT_AIRPLANE_MODE_CHANGED = "usual.event.AIRPLANE_MODE", 941 942 /** 943 * sent by the window manager service when the window mode is split. 944 * @since 8 945 */ 946 COMMON_EVENT_SPLIT_SCREEN = "common.event.SPLIT_SCREEN", 947 } 948} 949 950export default commonEvent; 951