diff --git a/services/application/IAnsDistributedManager.idl b/services/application/IAnsDistributedManager.idl new file mode 100644 index 0000000000000000000000000000000000000000..21ecb54e896b2ade2812d6715e9eb00e7101e2ed --- /dev/null +++ b/services/application/IAnsDistributedManager.idl @@ -0,0 +1,87 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +interface OHOS.Notification.IAnsDialogCallback; +interface OHOS.Notification.IAnsSubscriberLocalLiveView; +interface OHOS.Notification.IAnsSubscriber; +interface OHOS.Notification.IAnsOperationCallback; + +sequenceable OHOS.Notification.NotificationBundleOption; +sequenceable OHOS.Notification.NotificationDisable; +sequenceable OHOS.Notification.NotificationDoNotDisturbDate; +sequenceable OHOS.Notification.NotificationDoNotDisturbProfile; +sequenceable OHOS.Notification.NotificationRequest; +sequenceable OHOS.Notification.NotificationSlot; +sequenceable OHOS.Notification.NotificationSubscribeInfo; +sequenceable OHOS.Notification.NotificationOperationInfo; +sequenceable OHOS.Notification.Notification; +sequenceable OHOS.Notification.NotificationButtonOption; +sequenceable OHOS.Notification.NotificationCheckRequest; +sequenceable OHOS.IRemoteObject; + +interface OHOS.Notification.IAnsDistributedManager { + void IsDistributedEnabled([out] boolean enabled); + + void SetDistributedEnabledBySlot( + [in] int slotTypeInt, [in] String deviceType, [in] boolean enabled); + + void IsDistributedEnabledBySlot( + [in] int slotTypeInt, [in] String deviceType, [out] boolean enabled); + + void EnableDistributed([in] boolean enabled); + + void EnableDistributedByBundle([in] sptr bundleOption, [in] boolean enabled); + + void EnableDistributedSelf([in] boolean enabled); + + void IsDistributedEnableByBundle([in] sptr bundleOption, [out] boolean enabled); + + void GetDeviceRemindType([out] int remindTypeInt); + + void GetAllDistribuedEnabledBundles([in] String deviceType, [out] NotificationBundleOption[] bundleOption); + + void SetDistributedEnabledByBundle( + [in] sptr bundleOption, [in] String deviceType, [in] boolean enabled); + + void SetDistributedEnabled([in] String deviceType, [in] boolean enabled); + + void IsDistributedEnabled([in] String deviceType, [out] boolean enabled); + + void GetDistributedAbility([out] int abilityId); + + void GetDistributedAuthStatus([in] String deviceType, [in] String deviceId, [in] int userId, [out] boolean isAuth); + + void SetDistributedAuthStatus([in] String deviceType, [in] String deviceId, [in] int userId, [in] boolean isAuth); + + void IsSmartReminderEnabled([in] String deviceType, [out] boolean enabled); + + void SetSmartReminderEnabled([in] String deviceType, [in] boolean enabled); + + void IsDistributedEnabledByBundle([in] sptr bundleOption, [in] String deviceType, [out] boolean enabled); + + void SetTargetDeviceStatus([in] String deviceType, [in] unsigned int status, [in] String deviceId); + + void SetTargetDeviceStatus([in] String deviceType, [in] unsigned int status, [in] unsigned int controlFlag, [in] String deviceId, [in] int userId); + + void GetTargetDeviceStatus([in] String deviceType, [out] int status); + + void DistributeOperation([in] null_sptr operationInfo, [in] IAnsOperationCallback operationCallback); + + void ReplyDistributeOperation([in] String hashCode, [in] int resultCode); + + void SetTargetDeviceBundleList([in] String deviceType, [in] String deviceId, [in] int operatorType, [in] String[] bundleList); + + void SetTargetDeviceSwitch([in] String deviceType, [in] String deviceId, [in] boolean notificaitonEnable, [in] boolean liveViewEnable); +} diff --git a/services/application/IAnsManager.idl b/services/application/IAnsManager.idl new file mode 100644 index 0000000000000000000000000000000000000000..36576d44ab3736a00fdf91a38e7cd9bda23eeffb --- /dev/null +++ b/services/application/IAnsManager.idl @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +interface OHOS.Notification.IAnsDialogCallback; +interface OHOS.Notification.IAnsSubscriberLocalLiveView; +interface OHOS.Notification.IAnsSubscriber; +interface OHOS.Notification.IAnsOperationCallback; + +sequenceable OHOS.Notification.NotificationBundleOption; +sequenceable OHOS.Notification.NotificationDisable; +sequenceable OHOS.Notification.NotificationDoNotDisturbDate; +sequenceable OHOS.Notification.NotificationDoNotDisturbProfile; +sequenceable OHOS.Notification.NotificationRequest; +sequenceable OHOS.Notification.NotificationSlot; +sequenceable OHOS.Notification.NotificationSubscribeInfo; +sequenceable OHOS.Notification.NotificationOperationInfo; +sequenceable OHOS.Notification.Notification; +sequenceable OHOS.Notification.NotificationButtonOption; +sequenceable OHOS.Notification.NotificationCheckRequest; +sequenceable OHOS.IRemoteObject; + +interface OHOS.Notification.IAnsManager { + void IsSupportTemplate([in] String templateName, [out] boolean support); + + void ShellDump( + [in] String cmd, + [in] String bundle, + [in] int userId, + [in] int recvUserId, + [out] String[] dumpInfo); + + void SetAdditionConfig([in] String key, [in] String value); +} diff --git a/services/application/IAnsNotificationManager.idl b/services/application/IAnsNotificationManager.idl new file mode 100644 index 0000000000000000000000000000000000000000..90b36a65f79abdc128ae9bd4a7a8b4c3b102880d --- /dev/null +++ b/services/application/IAnsNotificationManager.idl @@ -0,0 +1,134 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +interface OHOS.Notification.IAnsDialogCallback; +interface OHOS.Notification.IAnsSubscriberLocalLiveView; +interface OHOS.Notification.IAnsSubscriber; +interface OHOS.Notification.IAnsOperationCallback; + +sequenceable OHOS.Notification.NotificationBundleOption; +sequenceable OHOS.Notification.NotificationDisable; +sequenceable OHOS.Notification.NotificationDoNotDisturbDate; +sequenceable OHOS.Notification.NotificationDoNotDisturbProfile; +sequenceable OHOS.Notification.NotificationRequest; +sequenceable OHOS.Notification.NotificationSlot; +sequenceable OHOS.Notification.NotificationSubscribeInfo; +sequenceable OHOS.Notification.NotificationOperationInfo; +sequenceable OHOS.Notification.Notification; +sequenceable OHOS.Notification.NotificationButtonOption; +sequenceable OHOS.Notification.NotificationCheckRequest; +sequenceable OHOS.IRemoteObject; + +interface OHOS.Notification.IAnsNotificationManager { + void Publish([in] String label, [in] sptr notification); + [ipcincapacity 520] void PublishWithMaxCapacity([in] String label, [in] sptr notification); + + void PublishNotificationForIndirectProxy([in] sptr notification); + [ipcincapacity 520] void PublishNotificationForIndirectProxyWithMaxCapacity([in] sptr notification); + + void Cancel([in] int notificationId, [in] String label, [in] String instanceKey); + + void CancelAll([in] String instanceKey); + + void CancelAsBundle([in] int notificationId, [in] String representativeBundle, [in] int userId); + + void CancelAsBundle([in] sptr bundleOption, [in] int notificationId); + + void CancelAsBundle([in] sptr bundleOption, [in] int notificationId, [in] int userId); + + void GetActiveNotifications([out] sptr[] notifications, [in] String instanceKey); + + void GetActiveNotificationNums([out] unsigned long num); + + void GetAllActiveNotifications([out] sptr[] notifications); + + void GetAllNotificationsBySlotType([out] sptr[] notifications, [in] int slotTypeInt); + + void GetSpecialActiveNotifications([in] String[] key, [out] sptr[] notifications); + + [ipcoutcapacity 520] void GetActiveNotificationByFilter( + [in] sptr bundleOption, + [in] int notificationId, + [in] String label, + [in] String[] extraInfoKeys, + [out] null_sptr request); + + void PublishAsBundle([in] sptr notification, [in] String representativeBundle); + [ipcincapacity 520] void PublishAsBundleWithMaxCapacity([in] sptr notification, [in] String representativeBundle); + + void SetNotificationBadgeNum([in] int num); + + void TriggerLocalLiveView( + [in] sptr bundleOption, + [in] int notificationId, + [in] sptr buttonOption); + + void RemoveNotification( + [in] sptr bundleOption, + [in] int notificationId, + [in] String label, + [in] int removeReason); + + void RemoveAllNotifications([in] sptr bundleOption); + + void RemoveNotifications([in] String[] hashcodes, [in] int removeReason); + + void RemoveDistributedNotifications([in] String[] hashcodes, [in] int slotTypeInt, [in] int deleteTypeInt, [in] int removeReason); + + void Delete([in] String key, [in] int removeReason); + + void DeleteByBundle([in] sptr bundleOption); + + void DeleteAll(); + + void SubscribeLocalLiveView( + [in] IAnsSubscriberLocalLiveView subscriber, + [in] boolean isNative); + void SubscribeLocalLiveView( + [in] IAnsSubscriberLocalLiveView subscriber, + [in] sptr info, + [in] boolean isNative); + + void CancelGroup([in] String groupName, [in] String instanceKey); + + void RemoveGroupByBundle([in] sptr bundleOption, [in] String groupName); + + void PublishContinuousTaskNotification([in] sptr request); + + void CancelContinuousTaskNotification([in] String label, [in] int notificationId); + + void DeleteAllByUser([in] int userId); + + void SetBadgeNumber([in] int badgeNumber, [in] String instanceKey); + + void SetBadgeNumberByBundle([in] sptr bundleOption, [in] int badgeNumber); + + void SetBadgeNumberForDhByBundle([in] sptr bundleOption, [in] int badgeNumber); + + void RegisterPushCallback([in] IRemoteObject pushCallback, [in] sptr notificationCheckRequest); + + void UnregisterPushCallback(); + + void CancelAsBundleWithAgent([in] sptr bundleOption, [in] int id); + + [oneway] void UpdateNotificationTimerByUid([in] int uid, [in] boolean isPaused); + + void GetNotificationRequestByHashCode( + [in] String hashCode, [out] null_sptr notificationRequest); + + void SetHashCodeRule([in] unsigned int type); + + [macrodef NOTIFICATION_SMART_REMINDER_SUPPORTED] void RegisterSwingCallback([in] IRemoteObject swingCallback); +} diff --git a/services/application/IAnsSettingManager.idl b/services/application/IAnsSettingManager.idl new file mode 100644 index 0000000000000000000000000000000000000000..9146f57837ed1ad5f794f9683297bf62271c5c4e --- /dev/null +++ b/services/application/IAnsSettingManager.idl @@ -0,0 +1,146 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +interface OHOS.Notification.IAnsDialogCallback; +interface OHOS.Notification.IAnsSubscriberLocalLiveView; +interface OHOS.Notification.IAnsSubscriber; +interface OHOS.Notification.IAnsOperationCallback; + +sequenceable OHOS.Notification.NotificationBundleOption; +sequenceable OHOS.Notification.NotificationDisable; +sequenceable OHOS.Notification.NotificationDoNotDisturbDate; +sequenceable OHOS.Notification.NotificationDoNotDisturbProfile; +sequenceable OHOS.Notification.NotificationRequest; +sequenceable OHOS.Notification.NotificationSlot; +sequenceable OHOS.Notification.NotificationSubscribeInfo; +sequenceable OHOS.Notification.NotificationOperationInfo; +sequenceable OHOS.Notification.Notification; +sequenceable OHOS.Notification.NotificationButtonOption; +sequenceable OHOS.Notification.NotificationCheckRequest; +sequenceable OHOS.IRemoteObject; + +interface OHOS.Notification.IAnsSettingManager { + void AddSlotByType([in] int slotTypeInt); + + void AddSlots([in] sptr[] slots); + + void RemoveSlotByType([in] int slotTypeInt); + + void RemoveAllSlots(); + + void GetSlotByType([in] int slotTypeInt, [out] null_sptr slot); + + void GetSlots([out] sptr[] slots); + + void GetSlotNumAsBundle([in] sptr bundleOption, [out] unsigned long num); + + void CanPublishAsBundle([in] String representativeBundle, [out] boolean canPublish); + + void GetBundleImportance([out] int importance); + + void HasNotificationPolicyAccessPermission([out] boolean granted); + + void GetSlotsByBundle([in] sptr bundleOption, [out] sptr[] slots); + + void GetSlotByBundle([in] sptr bundleOption, [in] int slotTypeInt, + [out] null_sptr slot); + + void UpdateSlots([in] sptr bundleOption, [in] sptr[] slots); + + void RequestEnableNotification([in] String deviceId, [in] IAnsDialogCallback ansDialogCallback); + void RequestEnableNotification([in] String deviceId, [in] IAnsDialogCallback ansDialogCallback, [in] IRemoteObject callerToken); + + void RequestEnableNotification([in] String bundleName, [in] int uid); + + void SetNotificationsEnabledForBundle([in] String deviceId, [in] boolean enabled); + + void SetNotificationsEnabledForAllBundles([in] String deviceId, [in] boolean enabled); + + void SetNotificationsEnabledForSpecialBundle( + [in] String deviceId, [in] sptr bundleOption, [in] boolean enabled, [in] boolean updateUnEnableTime); + + void SetShowBadgeEnabledForBundle([in] sptr bundleOption, [in] boolean enabled); + + void GetShowBadgeEnabledForBundle([in] sptr bundleOption, [out] boolean enabled); + + void GetShowBadgeEnabled([out] boolean enabled); + + void IsAllowedNotify([out] boolean allowed); + + void IsAllowedNotifySelf([out] boolean allowed); + + void CanPopEnableNotificationDialog([in] IAnsDialogCallback ansDialogCallback, [out] boolean canPop, [out] String bundleName); + + void RemoveEnableNotificationDialog(); + + void IsSpecialBundleAllowedNotify([in] sptr bundleOption, [out] boolean allowed); + + void SetDoNotDisturbDate([in] sptr date); + + void GetDoNotDisturbDate([out] sptr date); + + void AddDoNotDisturbProfiles([in] sptr[] profiles); + + void RemoveDoNotDisturbProfiles([in] sptr[] profiles); + + void DoesSupportDoNotDisturbMode([out] boolean doesSupport); + + void IsNeedSilentInDoNotDisturbMode([in] String phoneNumber, [in] int callerType); + + void IsSpecialUserAllowedNotify([in] int userId, [out] boolean allowed); + + void SetNotificationsEnabledByUser([in] int userId, [in] boolean enabled); + + void SetDoNotDisturbDate([in] int userId, [in] sptr date); + + void GetDoNotDisturbDate([in] int userId, [out] sptr date); + + void SetEnabledForBundleSlot( + [in] sptr bundleOption, + [in] int slotTypeInt, + [in] boolean enabled, + [in] boolean isForceControl); + + void GetEnabledForBundleSlot( + [in] sptr bundleOption, + [in] int slotTypeInt, + [out] boolean enabled); + + void GetEnabledForBundleSlotSelf([in] int slotTypeInt, [out] boolean enabled); + + void SetSyncNotificationEnabledWithoutApp([in] int userId, [in] boolean enabled); + + void GetSyncNotificationEnabledWithoutApp([in] int userId, [out] boolean enabled); + + void GetSlotFlagsAsBundle([in] sptr bundleOption, [out] unsigned int slotFlags); + + void SetSlotFlagsAsBundle([in] sptr bundleOption, [in] unsigned int slotFlags); + + void GetNotificationSettings([out] unsigned int slotFlags); + + void GetAllNotificationEnabledBundles([out] NotificationBundleOption[] bundleOption); + + void GetAllLiveViewEnabledBundles([out] NotificationBundleOption[] bundleOption); + + void IsSilentReminderEnabled([in] sptr bundleOption, [out] int enabled); + + void SetSilentReminderEnabled([in] sptr bundleOption, [in] boolean enabled); + + void GetDoNotDisturbProfile([in] long id, [out] sptr profile); + + void AllowUseReminder([in] String bundleName, [out] boolean isAllowUseReminder); + + void DisableNotificationFeature([in] sptr notificationDisable); +} diff --git a/services/application/IAnsSubscriberManager.idl b/services/application/IAnsSubscriberManager.idl new file mode 100644 index 0000000000000000000000000000000000000000..1fb058ee36e506d1ab18a3210868f1eaf47bc609 --- /dev/null +++ b/services/application/IAnsSubscriberManager.idl @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +interface OHOS.Notification.IAnsDialogCallback; +interface OHOS.Notification.IAnsSubscriberLocalLiveView; +interface OHOS.Notification.IAnsSubscriber; +interface OHOS.Notification.IAnsOperationCallback; + +sequenceable OHOS.Notification.NotificationBundleOption; +sequenceable OHOS.Notification.NotificationDisable; +sequenceable OHOS.Notification.NotificationDoNotDisturbDate; +sequenceable OHOS.Notification.NotificationDoNotDisturbProfile; +sequenceable OHOS.Notification.NotificationRequest; +sequenceable OHOS.Notification.NotificationSlot; +sequenceable OHOS.Notification.NotificationSubscribeInfo; +sequenceable OHOS.Notification.NotificationOperationInfo; +sequenceable OHOS.Notification.Notification; +sequenceable OHOS.Notification.NotificationButtonOption; +sequenceable OHOS.Notification.NotificationCheckRequest; +sequenceable OHOS.IRemoteObject; + +interface OHOS.Notification.IAnsSubscriberManager { + void Subscribe([in] IAnsSubscriber subscriber); + void Subscribe([in] IAnsSubscriber subscriber, [in] sptr info); + + void SubscribeSelf([in] IAnsSubscriber subscriber); + + void Unsubscribe([in] IAnsSubscriber subscriber); + void Unsubscribe([in] IAnsSubscriber subscriber, [in] sptr info); +} diff --git a/services/domain/.gitkeep b/services/domain/.gitkeep new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/services/infrastructure/.gitkeep b/services/infrastructure/.gitkeep new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391