• 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
16interface OHOS.Notification.IAnsDialogCallback;
17interface OHOS.Notification.IAnsSubscriberLocalLiveView;
18interface OHOS.Notification.IAnsSubscriber;
19interface OHOS.Notification.IAnsOperationCallback;
20
21sequenceable OHOS.Notification.NotificationBundleOption;
22sequenceable OHOS.Notification.NotificationDisable;
23sequenceable OHOS.Notification.NotificationDoNotDisturbDate;
24sequenceable OHOS.Notification.NotificationDoNotDisturbProfile;
25sequenceable OHOS.Notification.NotificationRequest;
26sequenceable OHOS.Notification.NotificationSlot;
27sequenceable OHOS.Notification.NotificationSubscribeInfo;
28sequenceable OHOS.Notification.NotificationOperationInfo;
29sequenceable OHOS.Notification.Notification;
30sequenceable OHOS.Notification.NotificationButtonOption;
31sequenceable OHOS.Notification.NotificationCheckRequest;
32sequenceable OHOS.IRemoteObject;
33
34interface OHOS.Notification.IAnsSettingManager {
35    void AddSlotByType([in] int slotTypeInt);
36
37    void AddSlots([in] sptr<NotificationSlot>[] slots);
38
39    void RemoveSlotByType([in] int slotTypeInt);
40
41    void RemoveAllSlots();
42
43    void GetSlotByType([in] int slotTypeInt, [out] null_sptr<NotificationSlot> slot);
44
45    void GetSlots([out] sptr<NotificationSlot>[] slots);
46
47    void GetSlotNumAsBundle([in] sptr<NotificationBundleOption> bundleOption, [out] unsigned long num);
48
49    void CanPublishAsBundle([in] String representativeBundle, [out] boolean canPublish);
50
51    void GetBundleImportance([out] int importance);
52
53    void HasNotificationPolicyAccessPermission([out] boolean granted);
54
55    void GetSlotsByBundle([in] sptr<NotificationBundleOption> bundleOption, [out] sptr<NotificationSlot>[] slots);
56
57    void GetSlotByBundle([in] sptr<NotificationBundleOption> bundleOption, [in] int slotTypeInt,
58        [out] null_sptr<NotificationSlot> slot);
59
60    void UpdateSlots([in] sptr<NotificationBundleOption> bundleOption, [in] sptr<NotificationSlot>[] slots);
61
62    void RequestEnableNotification([in] String deviceId, [in] IAnsDialogCallback ansDialogCallback);
63    void RequestEnableNotification([in] String deviceId, [in] IAnsDialogCallback ansDialogCallback, [in] IRemoteObject callerToken);
64
65    void RequestEnableNotification([in] String bundleName, [in] int uid);
66
67    void SetNotificationsEnabledForBundle([in] String deviceId, [in] boolean enabled);
68
69    void SetNotificationsEnabledForAllBundles([in] String deviceId, [in] boolean enabled);
70
71    void SetNotificationsEnabledForSpecialBundle(
72        [in] String deviceId, [in] sptr<NotificationBundleOption> bundleOption, [in] boolean enabled, [in] boolean updateUnEnableTime);
73
74    void SetShowBadgeEnabledForBundle([in] sptr<NotificationBundleOption> bundleOption, [in] boolean enabled);
75
76    void GetShowBadgeEnabledForBundle([in] sptr<NotificationBundleOption> bundleOption, [out] boolean enabled);
77
78    void GetShowBadgeEnabled([out] boolean enabled);
79
80    void IsAllowedNotify([out] boolean allowed);
81
82    void IsAllowedNotifySelf([out] boolean allowed);
83
84    void CanPopEnableNotificationDialog([in] IAnsDialogCallback ansDialogCallback, [out] boolean canPop, [out] String bundleName);
85
86    void RemoveEnableNotificationDialog();
87
88    void IsSpecialBundleAllowedNotify([in] sptr<NotificationBundleOption> bundleOption, [out] boolean allowed);
89
90    void SetDoNotDisturbDate([in] sptr<NotificationDoNotDisturbDate> date);
91
92    void GetDoNotDisturbDate([out] sptr<NotificationDoNotDisturbDate> date);
93
94    void AddDoNotDisturbProfiles([in] sptr<NotificationDoNotDisturbProfile>[] profiles);
95
96    void RemoveDoNotDisturbProfiles([in] sptr<NotificationDoNotDisturbProfile>[] profiles);
97
98    void DoesSupportDoNotDisturbMode([out] boolean doesSupport);
99
100    void IsNeedSilentInDoNotDisturbMode([in] String phoneNumber, [in] int callerType);
101
102    void IsSpecialUserAllowedNotify([in] int userId, [out] boolean allowed);
103
104    void SetNotificationsEnabledByUser([in] int userId, [in] boolean enabled);
105
106    void SetDoNotDisturbDate([in] int userId, [in] sptr<NotificationDoNotDisturbDate> date);
107
108    void GetDoNotDisturbDate([in] int userId, [out] sptr<NotificationDoNotDisturbDate> date);
109
110    void SetEnabledForBundleSlot(
111        [in] sptr<NotificationBundleOption> bundleOption,
112        [in] int slotTypeInt,
113        [in] boolean enabled,
114        [in] boolean isForceControl);
115
116        void GetEnabledForBundleSlot(
117        [in] sptr<NotificationBundleOption> bundleOption,
118        [in] int slotTypeInt,
119        [out] boolean enabled);
120
121    void GetEnabledForBundleSlotSelf([in] int slotTypeInt, [out] boolean enabled);
122
123    void SetSyncNotificationEnabledWithoutApp([in] int userId, [in] boolean enabled);
124
125    void GetSyncNotificationEnabledWithoutApp([in] int userId, [out] boolean enabled);
126
127    void GetSlotFlagsAsBundle([in] sptr<NotificationBundleOption> bundleOption, [out] unsigned int slotFlags);
128
129    void SetSlotFlagsAsBundle([in] sptr<NotificationBundleOption> bundleOption, [in] unsigned int slotFlags);
130
131    void GetNotificationSettings([out] unsigned int slotFlags);
132
133    void GetAllNotificationEnabledBundles([out] NotificationBundleOption[] bundleOption);
134
135    void GetAllLiveViewEnabledBundles([out] NotificationBundleOption[] bundleOption);
136
137    void IsSilentReminderEnabled([in] sptr<NotificationBundleOption> bundleOption, [out] int enabled);
138
139    void SetSilentReminderEnabled([in] sptr<NotificationBundleOption> bundleOption, [in] boolean enabled);
140
141    void GetDoNotDisturbProfile([in] long id, [out] sptr<NotificationDoNotDisturbProfile> profile);
142
143    void AllowUseReminder([in] String bundleName, [out] boolean isAllowUseReminder);
144
145    void DisableNotificationFeature([in] sptr<NotificationDisable> notificationDisable);
146}
147