• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2025 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
16sequenceable CommonEventData..OHOS.EventFwk.CommonEventData;
17sequenceable CommonEventSubscribeInfo..OHOS.EventFwk.CommonEventSubscribeInfo;
18sequenceable CommonEventPublishInfo..OHOS.EventFwk.CommonEventPublishInfo;
19sequenceable OHOS.IRemoteObject;
20interface OHOS.EventFwk.ICommonEvent {
21    int PublishCommonEvent([in] CommonEventData event, [in] CommonEventPublishInfo publishInfo, [in] int userId);
22    int PublishCommonEvent([in] CommonEventData event, [in] CommonEventPublishInfo publishInfo,
23        [in] IRemoteObject commonEventListener, [in] int userId);
24
25    boolean PublishCommonEvent([in] CommonEventData event, [in] CommonEventPublishInfo publishInfo,
26        [in] unsigned int uid, [in] int callerToken, [in] int userId);
27    boolean PublishCommonEvent([in] CommonEventData event, [in] CommonEventPublishInfo publishInfo,
28        [in] IRemoteObject commonEventListener, [in] unsigned int uid, [in] int callerToken, [in] int userId);
29
30    int SubscribeCommonEvent([in] CommonEventSubscribeInfo subscribeInfo, [in] IRemoteObject commonEventListener,
31        [in] int instanceKey);
32    int UnsubscribeCommonEvent([in] IRemoteObject commonEventListener);
33    int UnsubscribeCommonEventSync([in] IRemoteObject commonEventListener);
34    boolean GetStickyCommonEvent([in] String event, [out] CommonEventData eventData);
35    boolean DumpState([in] unsigned char dumpType, [in] String event, [in] int userId, [out] String[] state);
36    boolean FinishReceiver([in] IRemoteObject proxy, [in] int code, [in] String receiverData, [in] boolean abortEvent);
37    boolean Freeze([in] unsigned int uid);
38    boolean Unfreeze([in] unsigned int uid);
39    boolean UnfreezeAll();
40    int RemoveStickyCommonEvent([in] String event);
41    int SetStaticSubscriberState([in] boolean enable);
42    int SetStaticSubscriberStateByEvents([in] String[] events, [in] boolean enable);
43    boolean SetFreezeStatus([in] Set<int> pidList, [in] boolean isFreeze);
44}