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