Lines Matching refs:commonEventManager
1 # @ohos.commonEventManager (公共事件模块)
12 import { commonEventManager } from '@kit.BasicServicesKit';
17 系统公共事件是指由系统服务或系统应用发布的事件,订阅这些公共事件需要特定的权限、使用相应的值,详见[系统定义的公共事件](./common_event/commonEventManager-defi…
19 ## commonEventManager.publish
33 | event | string | 是 | 表示要发送的公共事件。详见[系统公共事件定义](./common_event/commonEventManager…
63 commonEventManager.publish("event", publishCB);
70 ## commonEventManager.publish
84 …ing | 是 | 表示要发布的公共事件。详见[系统公共事件定义](./common_event/commonEventManager-definitions.…
106 let options:commonEventManager.CommonEventPublishData = {
121 commonEventManager.publish("event", options, publishCB);
128 ## commonEventManager.createSubscriber
159 let subscriber:commonEventManager.CommonEventSubscriber;
161 let subscribeInfo:commonEventManager.CommonEventSubscribeInfo = {
165 function createCB(err: BusinessError, commonEventSubscriber:commonEventManager.CommonEventSubscribe…
175 commonEventManager.createSubscriber(subscribeInfo, createCB);
182 ## commonEventManager.createSubscriber
217 let subscriber:commonEventManager.CommonEventSubscriber;
219 let subscribeInfo:commonEventManager.CommonEventSubscribeInfo = {
223 commonEventManager.createSubscriber(subscribeInfo).then((commonEventSubscriber:commonEventManager.C…
231 ## commonEventManager.createSubscriberSync<sup>10+</sup>
266 let subscriber: commonEventManager.CommonEventSubscriber;
268 let subscribeInfo: commonEventManager.CommonEventSubscribeInfo = {
273 subscriber = commonEventManager.createSubscriberSync(subscribeInfo);
280 ## commonEventManager.subscribe
314 let subscriber:commonEventManager.CommonEventSubscriber;
316 let subscribeInfo:commonEventManager.CommonEventSubscribeInfo = {
320 function SubscribeCB(err: BusinessError, data:commonEventManager.CommonEventData) {
328 function createCB(err: BusinessError, commonEventSubscriber:commonEventManager.CommonEventSubscribe…
334 commonEventManager.subscribe(subscriber, SubscribeCB);
345 commonEventManager.createSubscriber(subscribeInfo, createCB);
352 ## commonEventManager.unsubscribe
386 let subscriber:commonEventManager.CommonEventSubscriber;
388 let subscribeInfo:commonEventManager.CommonEventSubscribeInfo = {
392 function subscribeCB(err: BusinessError, data:commonEventManager.CommonEventData) {
400 function createCB(err: BusinessError, commonEventSubscriber:commonEventManager.CommonEventSubscribe…
408 commonEventManager.subscribe(subscriber, subscribeCB);
425 commonEventManager.createSubscriber(subscribeInfo, createCB);
435 commonEventManager.unsubscribe(subscriber, unsubscribeCB);