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