diff --git a/api/@ohos.commonEvent.d.ts b/api/@ohos.commonEvent.d.ts index 9920b8afb02338fc755799dc6f077589e559eb64..f4b038a2070d49942d28525cd58aa7362b4d2fea 100644 --- a/api/@ohos.commonEvent.d.ts +++ b/api/@ohos.commonEvent.d.ts @@ -20,7 +20,7 @@ import { CommonEventSubscribeInfo } from './commonEvent/commonEventSubscribeInfo import { CommonEventPublishData } from './commonEvent/commonEventPublishData'; /** - * Common event defination + * Common event definition * @name commonEvent * @since 7 * @syscap SystemCapability.Notification.CommonEvent @@ -35,7 +35,7 @@ declare namespace commonEvent { * @since 7 * @param event name of the common event. * @param callback Specified callback method. - * @return - + * @returns - * @deprecated since 9 * @useinstead ohos.commonEventManager.publish */ @@ -48,7 +48,7 @@ declare namespace commonEvent { * @param event name of the common event. * @param options Indicate the CommonEventPublishData containing the common event content and attributes. * @param callback Specified callback method. - * @return - + * @returns - * @deprecated since 9 * @useinstead ohos.commonEventManager.publish */ @@ -61,7 +61,7 @@ declare namespace commonEvent { * @param event Specified the names of the common events. * @param userId Specified the user to receive the common events. * @param callback Specified callback method. - * @return - + * @returns - * * @systemapi Hide this for inner system use. * @deprecated since 9 @@ -77,7 +77,7 @@ declare namespace commonEvent { * @param userId Specified the user to receive the common events. * @param options Indicates the CommonEventPublishData containing the common event content and attributes. * @param callback Specified callback method. - * @return - + * @returns - * * @systemapi Hide this for inner system use. * @deprecated since 9 @@ -91,7 +91,7 @@ declare namespace commonEvent { * @since 7 * @param subscribeInfo Indicates the information of the subscriber. * @param callback Specified callback method. - * @return - + * @returns - * @deprecated since 9 * @useinstead ohos.commonEventManager.createSubscriber */ @@ -102,7 +102,7 @@ declare namespace commonEvent { * * @since 7 * @param subscribeInfo Indicates the information of the subscriber. - * @return Returns common event subscriber object + * @returns Returns common event subscriber object * @deprecated since 9 * @useinstead ohos.commonEventManager.createSubscriber */ @@ -114,7 +114,7 @@ declare namespace commonEvent { * @since 7 * @param subscriber Indicate the subscriber of the common event. * @param callback Specified callback method. - * @return - + * @returns - * @deprecated since 9 * @useinstead ohos.commonEventManager.subscribe */ @@ -126,7 +126,7 @@ declare namespace commonEvent { * @since 7 * @param subscriber Indicate the subscriber of the common event. * @param callback Specified callback method. - * @return - + * @returns - * @deprecated since 9 * @useinstead ohos.commonEventManager.unsubscribe */ @@ -142,156 +142,156 @@ declare namespace commonEvent { */ export enum Support { /** - * this commonEvent means when the device is booted or system upgrade completed, and only be sent by system. + * This commonEvent means when the device is booted or system upgrade completed, and only be sent by system. */ COMMON_EVENT_BOOT_COMPLETED = "usual.event.BOOT_COMPLETED", /** - * this commonEvent means when the device finnish booting, but still in the locked state. + * This commonEvent means when the device finnish booting, but still in the locked state. */ COMMON_EVENT_LOCKED_BOOT_COMPLETED = "usual.event.LOCKED_BOOT_COMPLETED", /** - * this commonEvent means when the device is shutting down, note: turn off, not sleeping. + * This commonEvent means when the device is shutting down, note: turn off, not sleeping. */ COMMON_EVENT_SHUTDOWN = "usual.event.SHUTDOWN", /** - * this commonEvent means when the charging state, level and so on about the battery. + * This commonEvent means when the charging state, level and so on about the battery. */ COMMON_EVENT_BATTERY_CHANGED = "usual.event.BATTERY_CHANGED", /** - * this commonEvent means when the device in low battery state.. + * This commonEvent means when the device in low battery state.. */ COMMON_EVENT_BATTERY_LOW = "usual.event.BATTERY_LOW", /** - * this commonEvent means when the battery level is an ok state. + * This commonEvent means when the battery level is an ok state. */ COMMON_EVENT_BATTERY_OKAY = "usual.event.BATTERY_OKAY", /** - * this commonEvent means when the other power is connected to the device. + * This commonEvent means when the other power is connected to the device. */ COMMON_EVENT_POWER_CONNECTED = "usual.event.POWER_CONNECTED", /** - * this commonEvent means when the other power is removed from the device. + * This commonEvent means when the other power is removed from the device. */ COMMON_EVENT_POWER_DISCONNECTED = "usual.event.POWER_DISCONNECTED", /** - * this commonEvent means when the screen is turned off. + * This commonEvent means when the screen is turned off. */ COMMON_EVENT_SCREEN_OFF = "usual.event.SCREEN_OFF", /** - * this commonEvent means when the device is waked up and interactive. + * This commonEvent means when the device is awakened and interactive. */ COMMON_EVENT_SCREEN_ON = "usual.event.SCREEN_ON", /** - * this commonEvent means when the thermal state level change + * This commonEvent means when the thermal state level change * @since 8 */ COMMON_EVENT_THERMAL_LEVEL_CHANGED = "usual.event.THERMAL_LEVEL_CHANGED", /** - * this commonEvent means when the user is present after the device waked up. + * This commonEvent means when the user is present after the device is awakened. */ COMMON_EVENT_USER_PRESENT = "usual.event.USER_PRESENT", /** - * this commonEvent means when the current time is changed. + * This commonEvent means when the current time is changed. */ COMMON_EVENT_TIME_TICK = "usual.event.TIME_TICK", /** - * this commonEvent means when the time is set. + * This commonEvent means when the time is set. */ COMMON_EVENT_TIME_CHANGED = "usual.event.TIME_CHANGED", /** - * this commonEvent means when the current date is changed. + * This commonEvent means when the current date is changed. */ COMMON_EVENT_DATE_CHANGED = "usual.event.DATE_CHANGED", /** - * this commonEvent means when the time zone is changed. + * This commonEvent means when the time zone is changed. */ COMMON_EVENT_TIMEZONE_CHANGED = "usual.event.TIMEZONE_CHANGED", /** - * this commonEvent means when the dialog to dismiss. + * This commonEvent means when the dialog to dismiss. */ COMMON_EVENT_CLOSE_SYSTEM_DIALOGS = "usual.event.CLOSE_SYSTEM_DIALOGS", /** - * this commonEvent means when a new application package is installed on the device. + * This commonEvent means when a new application package is installed on the device. */ COMMON_EVENT_PACKAGE_ADDED = "usual.event.PACKAGE_ADDED", /** - * this commonEvent means when a new version application package is installed on the device and + * This commonEvent means when a new version application package is installed on the device and * replace the old version.the data contains the name of the package. */ COMMON_EVENT_PACKAGE_REPLACED = "usual.event.PACKAGE_REPLACED", /** - * this commonEvent means when a new version application package is installed on the device and + * This commonEvent means when a new version application package is installed on the device and * replace the old version, it does not contain additional data and only be sent to the replaced application. */ COMMON_EVENT_MY_PACKAGE_REPLACED = "usual.event.MY_PACKAGE_REPLACED", /** - * this commonEvent means when an existing application package is removed from the device. + * This commonEvent means when an existing application package is removed from the device. */ COMMON_EVENT_PACKAGE_REMOVED = "usual.event.PACKAGE_REMOVED", /** - * this commonEvent means when an existing application package is removed from the device. + * This commonEvent means when an existing application package is removed from the device. */ COMMON_EVENT_BUNDLE_REMOVED = "usual.event.BUNDLE_REMOVED", /** - * this commonEvent means when an existing application package is completely removed from the device. + * This commonEvent means when an existing application package is completely removed from the device. */ COMMON_EVENT_PACKAGE_FULLY_REMOVED = "usual.event.PACKAGE_FULLY_REMOVED", /** - * this commonEvent means when an existing application package has been changed. + * This commonEvent means when an existing application package has been changed. */ COMMON_EVENT_PACKAGE_CHANGED = "usual.event.PACKAGE_CHANGED", /** - * this commonEvent means the user has restarted a package, and all of its processes have been killed. + * This commonEvent means the user has restarted a package, and all of its processes have been killed. */ COMMON_EVENT_PACKAGE_RESTARTED = "usual.event.PACKAGE_RESTARTED", /** - * this commonEvent means the user has cleared the package data. + * This commonEvent means the user has cleared the package data. */ COMMON_EVENT_PACKAGE_DATA_CLEARED = "usual.event.PACKAGE_DATA_CLEARED", /** - * this commonEvent means the user has cleared the package cache. + * This commonEvent means the user has cleared the package cache. * @since 9 */ COMMON_EVENT_PACKAGE_CACHE_CLEARED = "usual.event.PACKAGE_CACHE_CLEARED", /** - * this commonEvent means the packages have been suspended. + * This commonEvent means the packages have been suspended. */ COMMON_EVENT_PACKAGES_SUSPENDED = "usual.event.PACKAGES_SUSPENDED", /** - * this commonEvent means the packages have been un-suspended. + * This commonEvent means the packages have been un-suspended. */ COMMON_EVENT_PACKAGES_UNSUSPENDED = "usual.event.PACKAGES_UNSUSPENDED", /** - * this commonEvent Sent to a package that has been suspended by the system. + * This commonEvent Sent to a package that has been suspended by the system. */ COMMON_EVENT_MY_PACKAGE_SUSPENDED = "usual.event.MY_PACKAGE_SUSPENDED", @@ -301,23 +301,23 @@ declare namespace commonEvent { COMMON_EVENT_MY_PACKAGE_UNSUSPENDED = "usual.event.MY_PACKAGE_UNSUSPENDED", /** - * a user id has been removed from the system. + * A user id has been removed from the system. */ COMMON_EVENT_UID_REMOVED = "usual.event.UID_REMOVED", /** - * the application is first launched after installed. + * The application is first launched after installed. */ COMMON_EVENT_PACKAGE_FIRST_LAUNCH = "usual.event.PACKAGE_FIRST_LAUNCH", /** - * sent by system package verifier when a package need to be verified. + * Sent by system package verifier when a package need to be verified. */ COMMON_EVENT_PACKAGE_NEEDS_VERIFICATION = "usual.event.PACKAGE_NEEDS_VERIFICATION", /** - * sent by system package verifier when a package is verified. + * Sent by system package verifier when a package is verified. */ COMMON_EVENT_PACKAGE_VERIFIED = "usual.event.PACKAGE_VERIFIED", @@ -335,7 +335,7 @@ declare namespace commonEvent { "usual.event.EXTERNAL_APPLICATIONS_UNAVAILABLE", /** - * the device configuration such as orientation,locale have been changed. + * The device configuration such as orientation,locale have been changed. */ COMMON_EVENT_CONFIGURATION_CHANGED = "usual.event.CONFIGURATION_CHANGED", @@ -350,57 +350,57 @@ declare namespace commonEvent { COMMON_EVENT_MANAGE_PACKAGE_STORAGE = "usual.event.MANAGE_PACKAGE_STORAGE", /** - * sent by the smart function when the system in drive mode. + * Sent by the smart function when the system in drive mode. */ COMMON_EVENT_DRIVE_MODE = "common.event.DRIVE_MODE", /** - * sent by the smart function when the system in home mode. + * Sent by the smart function when the system in home mode. */ COMMON_EVENT_HOME_MODE = "common.event.HOME_MODE", /** - * sent by the smart function when the system in office mode. + * Sent by the smart function when the system in office mode. */ COMMON_EVENT_OFFICE_MODE = "common.event.OFFICE_MODE", /** - * remind new user of preparing to start. + * Remind new user of preparing to start. */ COMMON_EVENT_USER_STARTED = "usual.event.USER_STARTED", /** - * remind previous user of that the service has been the background. + * Remind previous user of that the service has been the background. */ COMMON_EVENT_USER_BACKGROUND = "usual.event.USER_BACKGROUND", /** - * remind new user of that the service has been the foreground. + * Remind new user of that the service has been the foreground. */ COMMON_EVENT_USER_FOREGROUND = "usual.event.USER_FOREGROUND", /** - * remind new user of that the service has been switched to new user. + * Remind new user of that the service has been switched to new user. */ COMMON_EVENT_USER_SWITCHED = "usual.event.USER_SWITCHED", /** - * remind new user of that the service has been starting. + * Remind new user of that the service has been starting. */ COMMON_EVENT_USER_STARTING = "usual.event.USER_STARTING", /** - * remind new user of that the service has been unlocked. + * Remind new user of that the service has been unlocked. */ COMMON_EVENT_USER_UNLOCKED = "usual.event.USER_UNLOCKED", /** - * remind new user of that the service has been stopping. + * Remind new user of that the service has been stopping. */ COMMON_EVENT_USER_STOPPING = "usual.event.USER_STOPPING", /** - * remind new user of that the service has stopped. + * Remind new user of that the service has stopped. */ COMMON_EVENT_USER_STOPPED = "usual.event.USER_STOPPED", @@ -465,7 +465,7 @@ declare namespace commonEvent { COMMON_EVENT_WIFI_MPLINK_STATE_CHANGE = "usual.event.wifi.mplink.STATE_CHANGE", /** - * Indicates Wi-Fi P2P connection state notification acknowledged by connecting or disconnecting P2P. + * Indicates Wi-Fi P2P connection state notification acknowledged by connecting or disconnected P2P. */ COMMON_EVENT_WIFI_P2P_CONN_STATE = "usual.event.wifi.p2p.CONN_STATE_CHANGE", @@ -720,19 +720,19 @@ declare namespace commonEvent { "usual.event.bluetooth.a2dpsink.AUDIO_STATE_UPDATE", /** - * nfc state change. + * Nfc state change. */ COMMON_EVENT_NFC_ACTION_ADAPTER_STATE_CHANGED = "usual.event.nfc.action.ADAPTER_STATE_CHANGED", /** - * nfc field on detected. + * Nfc field on detected. */ COMMON_EVENT_NFC_ACTION_RF_FIELD_ON_DETECTED = "usual.event.nfc.action.RF_FIELD_ON_DETECTED", /** - * nfc field off detected. + * Nfc field off detected. */ COMMON_EVENT_NFC_ACTION_RF_FIELD_OFF_DETECTED = "usual.event.nfc.action.RF_FIELD_OFF_DETECTED", @@ -758,12 +758,12 @@ declare namespace commonEvent { COMMON_EVENT_POWER_SAVE_MODE_CHANGED = "usual.event.POWER_SAVE_MODE_CHANGED", /** - * user added. + * User added. */ COMMON_EVENT_USER_ADDED = "usual.event.USER_ADDED", /** - * user removed. + * User removed. */ COMMON_EVENT_USER_REMOVED = "usual.event.USER_REMOVED", @@ -783,7 +783,7 @@ declare namespace commonEvent { COMMON_EVENT_ABILITY_UPDATED = "common.event.ABILITY_UPDATED", /** - * gps mode state changed. + * Gps mode state changed. */ COMMON_EVENT_LOCATION_MODE_STATE_CHANGED = "usual.event.location.MODE_STATE_CHANGED", diff --git a/api/@ohos.commonEventManager.d.ts b/api/@ohos.commonEventManager.d.ts index c327741a045d984d5ae9e1777110ef0532cd32c4..1cafa28a65b658a84267f0b4e6116994b890a7de 100644 --- a/api/@ohos.commonEventManager.d.ts +++ b/api/@ohos.commonEventManager.d.ts @@ -165,7 +165,7 @@ declare namespace commonEventManager { COMMON_EVENT_SCREEN_OFF = "usual.event.SCREEN_OFF", /** - * This commonEvent means when the device is waked up and interactive. + * This commonEvent means when the device is awakened and interactive. */ COMMON_EVENT_SCREEN_ON = "usual.event.SCREEN_ON", @@ -175,7 +175,7 @@ declare namespace commonEventManager { COMMON_EVENT_THERMAL_LEVEL_CHANGED = "usual.event.THERMAL_LEVEL_CHANGED", /** - * This commonEvent means when the user is present after the device waked up. + * This commonEvent means when the user is present after the device is awakened. */ COMMON_EVENT_USER_PRESENT = "usual.event.USER_PRESENT", @@ -441,7 +441,7 @@ declare namespace commonEventManager { COMMON_EVENT_WIFI_MPLINK_STATE_CHANGE = "usual.event.wifi.mplink.STATE_CHANGE", /** - * Indicates Wi-Fi P2P connection state notification acknowledged by connecting or disconnecting P2P. + * Indicates Wi-Fi P2P connection state notification acknowledged by connecting or disconnected P2P. */ COMMON_EVENT_WIFI_P2P_CONN_STATE = "usual.event.wifi.p2p.CONN_STATE_CHANGE", diff --git a/api/@ohos.events.emitter.d.ts b/api/@ohos.events.emitter.d.ts index fbc91b20f597d4533cb8669a4433ef478ed9079a..6fbe9037b31d3db37a4568b6dac156fb8933111e 100644 --- a/api/@ohos.events.emitter.d.ts +++ b/api/@ohos.events.emitter.d.ts @@ -25,32 +25,32 @@ import { Callback } from './basic'; */ declare namespace emitter { /** - * Subscribes to a certain event in persistent manner and receives the event callback. + * Subscribe to a certain event in persistent manner and receives the event callback. * * @since 7 * @param event indicate event to subscribe to. * @param callback indicate callback used to receive the event. - * @return - + * @returns - */ function on(event: InnerEvent, callback: Callback): void; /** - * Subscribes to a certain event in one-shot manner and unsubscribes from it + * Subscribe to a certain event in one-shot manner and unsubscribe from it * after the event callback is received. * * @since 7 * @param event indicate event to subscribe to in one shot. * @param callback indicate callback used to receive the event. - * @return - + * @returns - */ function once(event: InnerEvent, callback: Callback): void; /** - * Unsubscribes from an event. + * Unsubscribe from an event. * * @since 7 * @param eventId indicate ID of the event to unsubscribe from. - * @return - + * @returns - */ function off(eventId: number): void; @@ -60,7 +60,7 @@ declare namespace emitter { * @since 7 * @param event indicate event to emit. * @param data indicate data carried by the event. - * @return - + * @returns - */ function emit(event: InnerEvent, data?: EventData): void; diff --git a/api/@ohos.notification.d.ts b/api/@ohos.notification.d.ts index 2c3d321c3ed562ad363c86059c3113851d1105a6..58647e30a6aa270de56f4f6631247c08533054bb 100644 --- a/api/@ohos.notification.d.ts +++ b/api/@ohos.notification.d.ts @@ -36,7 +36,7 @@ import { NotificationUserInput as _NotificationUserInput } from './notification/ /** * Manages notifications. * - *

Generally, only system applications have permissions on notification subscription and unsubscription. + *

Generally, only system applications have permissions on notification subscription and unsubscribe. * You can specify the content of a notification to be published and the content is carried by * {@link NotificationRequest}. A notification ID is unique in an application and must be specified * when using {@link NotificationRequest} to carry the notification content. If a notification @@ -98,7 +98,7 @@ declare namespace notification { function publishAsBundle(request: NotificationRequest, representativeBundle: string, userId: number): Promise; /** - * Cancels a notification with the specified ID. + * Cancel a notification with the specified ID. * * @param id of the notification to cancel, which must be unique in the application. * @param callback callback function @@ -108,7 +108,7 @@ declare namespace notification { function cancel(id: number, callback: AsyncCallback): void; /** - * Cancels a notification with the specified label and ID. + * Cancel a notification with the specified label and ID. * * @param id ID of the notification to cancel, which must be unique in the application. * @param label Label of the notification to cancel. @@ -120,7 +120,7 @@ declare namespace notification { function cancel(id: number, label?: string): Promise; /** - * Cancels a representative notification. + * Cancel a representative notification. * * @since 9 * @param id ID of the notification to cancel, which must be unique in the application. @@ -211,7 +211,7 @@ declare namespace notification { * * @param slotType Type of the notification slot to obtain. * @param callback callback function - * @return Returns the created {@link NotificationSlot}. + * @returns Returns the created {@link NotificationSlot}. * @deprecated since 9 * @useinstead ohos.notificationManager.getSlot */ @@ -221,7 +221,7 @@ declare namespace notification { /** * Obtains all NotificationSlot objects created by the current application. * - * @return Returns all notification slots of this application. + * @returns Returns all notification slots of this application. * @deprecated since 9 * @useinstead ohos.notificationManager.getSlots */ @@ -990,7 +990,7 @@ declare namespace notification { } /** - * The remind type of the nofication. + * The remind type of the notification. * * @since 8 * @systemapi Hide this for inner system use. diff --git a/api/@ohos.notificationManager.d.ts b/api/@ohos.notificationManager.d.ts index e35bfb4fcd63f8a38601ceed08799d05c114649a..cb1162fbb9ae53288eb10ab8c2078c1c057a617b 100644 --- a/api/@ohos.notificationManager.d.ts +++ b/api/@ohos.notificationManager.d.ts @@ -31,7 +31,7 @@ import { NotificationUserInput as _NotificationUserInput } from './notification/ /** * Manages notifications. - *

Generally, only system applications have permissions on notification subscription and unsubscription. + *

Generally, only system applications have permissions on notification subscription and unsubscribe. * You can specify the content of a notification to be published and the content is carried by * {@link NotificationRequest}. A notification ID is unique in an application and must be specified * when using {@link NotificationRequest} to carry the notification content. If a notification @@ -122,7 +122,7 @@ declare namespace notificationManager { function publishAsBundle(request: NotificationRequest, representativeBundle: string, userId: number): Promise; /** - * Cancels a notification with the specified ID. + * Cancel a notification with the specified ID. * @param { number } id - ID of the notification to cancel, which must be unique in the application. * @param { AsyncCallback } callback - The callback of cancel. * @throws { BusinessError } 401 - If the input parameter is not valid parameter. @@ -132,7 +132,7 @@ declare namespace notificationManager { function cancel(id: number, callback: AsyncCallback): void; /** - * Cancels a notification with the specified label and ID. + * Cancel a notification with the specified label and ID. * @param { number } id - ID of the notification to cancel, which must be unique in the application. * @param { string }label - Label of the notification to cancel. * @param { AsyncCallback } callback - The callback of cancel. @@ -143,7 +143,7 @@ declare namespace notificationManager { function cancel(id: number, label: string, callback: AsyncCallback): void; /** - * Cancels a notification with the specified label and ID. + * Cancel a notification with the specified label and ID. * @param { number } id - ID of the notification to cancel, which must be unique in the application. * @param { string }label - Label of the notification to cancel. * @returns { Promise } The promise returned by the function. @@ -154,7 +154,7 @@ declare namespace notificationManager { function cancel(id: number, label?: string): Promise; /** - * Cancels a representative notification. + * Cancel a representative notification. * @permission ohos.permission.NOTIFICATION_CONTROLLER and ohos.permission.NOTIFICATION_AGENT_CONTROLLER * @param { number } id - ID of the notification to cancel, which must be unique in the application. * @param { string } representativeBundle - bundle name of the representative. @@ -168,7 +168,7 @@ declare namespace notificationManager { function cancelAsBundle(id: number, representativeBundle: string, userId: number, callback: AsyncCallback): void; /** - * Cancels a representative notification. + * Cancel a representative notification. * @permission ohos.permission.NOTIFICATION_CONTROLLER and ohos.permission.NOTIFICATION_AGENT_CONTROLLER * @param { number } id - ID of the notification to cancel, which must be unique in the application. * @param { string } representativeBundle - bundle name of the representative. @@ -182,7 +182,7 @@ declare namespace notificationManager { function cancelAsBundle(id: number, representativeBundle: string, userId: number): Promise; /** - * Cancels all notifications of the current application. + * Cancel all notifications of the current application. * @param { AsyncCallback } callback - The callback of cancelAll. * @throws { BusinessError } 401 - If the input parameter is not valid parameter. * @syscap SystemCapability.Notification.Notification @@ -191,7 +191,7 @@ declare namespace notificationManager { function cancelAll(callback: AsyncCallback): void; /** - * Cancels all notifications of the current application. + * Cancel all notifications of the current application. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 401 - If the input parameter is not valid parameter. * @syscap SystemCapability.Notification.Notification @@ -1225,7 +1225,7 @@ declare namespace notificationManager { } /** - * The remind type of the nofication. + * The remind type of the notification. * @enum { number } * @syscap SystemCapability.Notification.Notification * @systemapi diff --git a/api/@ohos.notificationSubscribe.d.ts b/api/@ohos.notificationSubscribe.d.ts index a97f53a9b4bac07786e2093505b6cd002b897a96..ff5716fb8dd80ff0b8d630182e7cb5c248f321d9 100644 --- a/api/@ohos.notificationSubscribe.d.ts +++ b/api/@ohos.notificationSubscribe.d.ts @@ -23,7 +23,6 @@ import { EnabledNotificationCallbackData as _EnabledNotificationCallbackData } f * @name notificationSubscribe * @since 9 * @syscap SystemCapability.Notification.Notification - * @import import notificationSubscribe from '@ohos.notification.subscribe'; * @permission N/A */ declare namespace notificationSubscribe { diff --git a/api/@ohos.reminderAgentManager.d.ts b/api/@ohos.reminderAgentManager.d.ts index b66b9fbac3509cee5a9cca3f794a6dfa33abe2c7..5d91012d63f2b46a6e2701e4c112c9545fb6d3ba 100644 --- a/api/@ohos.reminderAgentManager.d.ts +++ b/api/@ohos.reminderAgentManager.d.ts @@ -19,7 +19,7 @@ import { NotificationSlot } from './notification/notificationSlot'; /** * Providers static methods for managing reminders, including publishing or canceling a reminder. - * adding or removing a notification slot, and obtaining or cancelling all reminders of the current application. + * Add or remove a notification slot, and obtain or cancel all reminders of the current application. * * @since 9 * @syscap SystemCapability.Notification.ReminderAgent @@ -50,7 +50,7 @@ declare namespace reminderAgentManager { function publishReminder(reminderReq: ReminderRequest): Promise; /** - * Cancels a reminder. + * Cancel a reminder. * * @since 9 * @syscap SystemCapability.Notification.ReminderAgent @@ -61,7 +61,7 @@ declare namespace reminderAgentManager { function cancelReminder(reminderId: number, callback: AsyncCallback): void; /** - * Cancels a reminder. + * Cancel a reminder. * * @since 9 * @syscap SystemCapability.Notification.ReminderAgent @@ -92,7 +92,7 @@ declare namespace reminderAgentManager { function getValidReminders(): Promise>; /** - * Cancels all the reminders of current application. + * Cancel all the reminders of current application. * * @since 9 * @syscap SystemCapability.Notification.ReminderAgent @@ -102,7 +102,7 @@ declare namespace reminderAgentManager { function cancelAllReminders(callback: AsyncCallback): void; /** - * Cancels all the reminders of current application. + * Cancel all the reminders of current application. * * @since 9 * @syscap SystemCapability.Notification.ReminderAgent @@ -419,7 +419,7 @@ declare namespace reminderAgentManager { minute: number; /** - * Days of a week when the reminder repeates. + * Days of a week when the reminder repeats. * @since 9 * @syscap SystemCapability.Notification.ReminderAgent */ diff --git a/api/application/MissionInfo.d.ts b/api/application/MissionInfo.d.ts index 5233bce35ebd239f203655f55dfa93045eece809..6402b4fdfe1ff374c5e9ef2c9cbdbccdbf38ec27 100644 --- a/api/application/MissionInfo.d.ts +++ b/api/application/MissionInfo.d.ts @@ -1,90 +1,89 @@ -/* - * Copyright (c) 2021 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. - */ - -import Want from "../@ohos.application.Want"; - -/** - * Mission information corresponding to ability. - * - * @since 8 - * @syscap SystemCapability.Ability.AbilityRuntime.Mission - * @permission N/A - * @systemapi hide for inner use. - */ -export interface MissionInfo { - /** - * Indicates mission id. - * - * @since 8 - * @syscap SystemCapability.Ability.AbilityRuntime.Mission - */ - missionId: number; - - /** - * Indicates running state. - * - * @since 8 - * @syscap SystemCapability.Ability.AbilityRuntime.Mission - */ - runningState: number; - - /** - * Indicates locked state. - * - * @since 8 - * @syscap SystemCapability.Ability.AbilityRuntime.Mission - */ - lockedState: boolean; - - /** - * Indicates the recent create or update time of the mission. - * - * @since 8 - * @syscap SystemCapability.Ability.AbilityRuntime.Mission - */ - timestamp: string; - - /** - * Indicates want of the mission. - * - * @since 8 - * @syscap SystemCapability.Ability.AbilityRuntime.Mission - */ - want: Want; - - /** - * Indicates label of the mission. - * - * @since 8 - * @syscap SystemCapability.Ability.AbilityRuntime.Mission - */ - label: string; - - /** - * Indicates icon path of the mission. - * - * @since 8 - * @syscap SystemCapability.Ability.AbilityRuntime.Mission - */ - iconPath: string; - - /** - * Indicates whether the mision is continuable. - * - * @since 8 - * @syscap SystemCapability.Ability.AbilityRuntime.Mission - */ - continuable: boolean; +/* + * Copyright (c) 2021 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. + */ + +import Want from "../@ohos.application.Want"; + +/** + * Mission information corresponding to ability. + * + * @since 8 + * @syscap SystemCapability.Ability.AbilityRuntime.Mission + * @systemapi hide for inner use. + */ +export interface MissionInfo { + /** + * Indicates mission id. + * + * @since 8 + * @syscap SystemCapability.Ability.AbilityRuntime.Mission + */ + missionId: number; + + /** + * Indicates running state. + * + * @since 8 + * @syscap SystemCapability.Ability.AbilityRuntime.Mission + */ + runningState: number; + + /** + * Indicates locked state. + * + * @since 8 + * @syscap SystemCapability.Ability.AbilityRuntime.Mission + */ + lockedState: boolean; + + /** + * Indicates the recent created or updated time of the mission. + * + * @since 8 + * @syscap SystemCapability.Ability.AbilityRuntime.Mission + */ + timestamp: string; + + /** + * Indicates want of the mission. + * + * @since 8 + * @syscap SystemCapability.Ability.AbilityRuntime.Mission + */ + want: Want; + + /** + * Indicates label of the mission. + * + * @since 8 + * @syscap SystemCapability.Ability.AbilityRuntime.Mission + */ + label: string; + + /** + * Indicates icon path of the mission. + * + * @since 8 + * @syscap SystemCapability.Ability.AbilityRuntime.Mission + */ + iconPath: string; + + /** + * Indicates whether the mission is continuable. + * + * @since 8 + * @syscap SystemCapability.Ability.AbilityRuntime.Mission + */ + continuable: boolean; } \ No newline at end of file diff --git a/api/application/MissionListener.d.ts b/api/application/MissionListener.d.ts index c40968b2796cb08afd5729d8d926c7e26ac9283e..ffae5f46c58674eaaabce86d576092070ecba9fd 100644 --- a/api/application/MissionListener.d.ts +++ b/api/application/MissionListener.d.ts @@ -46,7 +46,7 @@ import image from "../@ohos.multimedia.image"; onMissionDestroyed(mission: number): void; /** - * Called by system when mission shapshot changed. + * Called by system when mission snapshot changed. * * @since 8 * @syscap SystemCapability.Ability.AbilityRuntime.Mission @@ -56,7 +56,7 @@ import image from "../@ohos.multimedia.image"; onMissionSnapshotChanged(mission: number): void; /** - * Called by system when mission moved to fornt. + * Called by system when mission moved to front. * * @since 8 * @syscap SystemCapability.Ability.AbilityRuntime.Mission diff --git a/api/application/MissionParameter.d.ts b/api/application/MissionParameter.d.ts index e1b67f209e1602d710d58b85cb3b78f9c297bd18..a21e1097451d8bbcdf394d83aa99ce7c72040d58 100755 --- a/api/application/MissionParameter.d.ts +++ b/api/application/MissionParameter.d.ts @@ -31,7 +31,7 @@ export interface MissionParameter { deviceId: string; /** - * If needed to fix the versions confilct. + * If needed to fix the versions conflict. * * @since 9 * @syscap SystemCapability.Ability.AbilityRuntime.Mission diff --git a/api/application/ServiceExtensionContext.d.ts b/api/application/ServiceExtensionContext.d.ts index f2a68b6f2b3ad48f3745c88f153800f73b3ef203..3785406c2b7204a691f1ce7cd1c00294548d910f 100644 --- a/api/application/ServiceExtensionContext.d.ts +++ b/api/application/ServiceExtensionContext.d.ts @@ -274,7 +274,7 @@ export default class ServiceExtensionContext extends ExtensionContext { connectAbilityWithAccount(want: Want, accountId: number, options: ConnectOptions): number; /** - * Disconnects an ability to a service extension, in contrast to + * Disconnect an ability to a service extension, in contrast to * {@link connectAbility}. * * @since 9 @@ -322,7 +322,7 @@ export default class ServiceExtensionContext extends ExtensionContext { connectServiceExtensionAbilityWithAccount(want: Want, accountId: number, options: ConnectOptions): number; /** - * Disconnects an ability to a service extension, in contrast to {@link connectAbility}. + * Disconnect an ability to a service extension, in contrast to {@link connectAbility}. * @param { number } connection - the connection id returned from connectAbility api. * @param { AsyncCallback } callback - The callback of disconnectAbility. * @throws { BusinessError } 401 - If the input parameter is not valid parameter. @@ -333,7 +333,7 @@ export default class ServiceExtensionContext extends ExtensionContext { disconnectServiceExtensionAbility(connection: number, callback: AsyncCallback): void; /** - * Disconnects an ability to a service extension, in contrast to {@link connectAbility}. + * Disconnect an ability to a service extension, in contrast to {@link connectAbility}. * @param { number } connection - the connection id returned from connectAbility api. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 401 - If the input parameter is not valid parameter. diff --git a/api/common/full/featureability.d.ts b/api/common/full/featureability.d.ts index bca1c29fe18111af1e470c9be9efd3fde4ec6095..4a120bfcfc1c1692609f31650edb7886a2ac036c 100644 --- a/api/common/full/featureability.d.ts +++ b/api/common/full/featureability.d.ts @@ -44,7 +44,7 @@ export interface SubscribeMessageResponse { deviceId: string; /** - * Name of the bundle where the peer ability locates. The name is case sensitive. + * Name of the bundle where the peer ability has been located. The name is case sensitive. * @since 5 */ bundleName: string; @@ -68,7 +68,7 @@ export interface SubscribeMessageResponse { */ export interface CallAbilityParam { /** - * Name of the bundle where the ability locates. The name is case sensitive and must be the same as that on the AA side. + * Name of the bundle where the ability has been located. The name is case sensitive and must be the same as that on the AA side. * @since 5 */ bundleName: string; @@ -114,7 +114,7 @@ export interface CallAbilityParam { */ export interface SubscribeAbilityEventParam { /** - * Name of the bundle where the ability locates. The name is case sensitive and must be the same as that on the AA side. + * Name of the bundle where the ability has been located. The name is case sensitive and must be the same as that on the AA side. * @since 5 */ bundleName: string; @@ -161,7 +161,7 @@ export interface SendMessageOptions { deviceId: string; /** - * Name of the destination bundle where the ability locates. The name is case sensitive. + * Name of the destination bundle where the ability has been located. The name is case sensitive. * @since 5 */ bundleName: string; @@ -319,7 +319,7 @@ export declare class FeatureAbility { static startAbilityForResult(request: RequestParams): Promise; /** - * FA call the interface to destory itself and set the result as parameters. + * FA call the interface to destroy itself and set the result as parameters. * @param request Indicates the request param. * @returns A Promise object is returned, which contains the result whether to callback successfully. * @since 5 @@ -356,7 +356,7 @@ export declare class FeatureAbility { static continueAbility(): Promise; /** - * Subscribes to events of an AA. + * Subscribe to events of an AA. * @param param Indicates the request param. * @param func Indicates the event reporting callback. * @returns A Promise object is returned, which contains the result data returned by the AA. The result is a JSON string. @@ -366,7 +366,7 @@ export declare class FeatureAbility { static subscribeAbilityEvent(param: SubscribeAbilityEventParam, func: Function): Promise; /** - * Unsubscribes from events of an AA. + * Unsubscribe from events of an AA. * @param param Indicates the request param. * @returns A Promise object is returned, which contains the result data returned by the AA. The result is a JSON string. * @since 5 @@ -393,7 +393,7 @@ export declare class FeatureAbility { static subscribeMsg(options: SubscribeMessageOptions): void; /** - * Cancels the listening for messages sent from other devices. + * Cancel the listening for messages sent from other devices. * @syscap SystemCapability.ArkUI.ArkUI.Lite * @since 5 * @deprecated since 8 diff --git a/api/common/lite/featureability.d.ts b/api/common/lite/featureability.d.ts index ebfe0fa4b01bfcd825f671ac674d64b494e0c2c7..36ee944bf29358f1546131880155bcdbdc7234b0 100644 --- a/api/common/lite/featureability.d.ts +++ b/api/common/lite/featureability.d.ts @@ -26,7 +26,7 @@ export interface SubscribeMessageResponse { deviceId: string; /** - * Name of the bundle where the peer ability locates. The name is case sensitive. + * Name of the bundle where the peer ability has been located. The name is case sensitive. * @since 5 */ bundleName: string; @@ -57,7 +57,7 @@ export interface SendMessageOptions { deviceId: string; /** - * Name of the destination bundle where the ability locates. The name is case sensitive. + * Name of the destination bundle where the ability has been located. The name is case sensitive. * @since 5 */ bundleName: string; @@ -140,7 +140,7 @@ export declare class FeatureAbility { static subscribeMsg(options: SubscribeMessageOptions): void; /** - * Cancels the listening for messages sent from other devices. + * Cancel the listening for messages sent from other devices. * @syscap SystemCapability.ArkUI.ArkUI.Lite * @since 5 * @deprecated since 8 diff --git a/api/commonEvent/commonEventSubscriber.d.ts b/api/commonEvent/commonEventSubscriber.d.ts index 128dfb42e8127fe579e736cc86aa4acee8718790..904df95137d14446a4bd9f0cef13db6c3c5a38c3 100644 --- a/api/commonEvent/commonEventSubscriber.d.ts +++ b/api/commonEvent/commonEventSubscriber.d.ts @@ -72,7 +72,6 @@ export interface CommonEventSubscriber { * Obtains the result data of the current ordered common event. * * @since 7 - * @return * @returns Returns data of this common event */ getData(): Promise; @@ -152,7 +151,7 @@ export interface CommonEventSubscriber { isStickyCommonEvent(): Promise; /** - * Aborts the current ordered common event. + * Abort the current ordered common event. * * @since 7 * @param callback Indicate the callback function to receive the common event. @@ -161,7 +160,7 @@ export interface CommonEventSubscriber { abortCommonEvent(callback: AsyncCallback): void; /** - * Aborts the current ordered common event. + * Abort the current ordered common event. * * @since 7 * @returns - diff --git a/api/notification/notificationSubscriber.d.ts b/api/notification/notificationSubscriber.d.ts index f2356ec81f6d0943c7de7755327fd739703ea8c6..383eed775ce061d17eb2d913758273bfa75c1113 100644 --- a/api/notification/notificationSubscriber.d.ts +++ b/api/notification/notificationSubscriber.d.ts @@ -1,83 +1,83 @@ -/* - * Copyright (c) 2021 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. - */ - -import { NotificationRequest } from './notificationRequest'; -import { NotificationSortingMap } from './notificationSortingMap'; -import notification from '../@ohos.notification'; - -/** - * Provides methods that will be called back when the subscriber receives a new notification or - * a notification is canceled. - * - * @name NotificationSubscriber - * @syscap SystemCapability.Notification.Notification - * @permission N/A - * @systemapi Hide this for inner system use. - * @since 7 - */ -export interface NotificationSubscriber { - onConsume?:(data: SubscribeCallbackData) => void; - onCancel?:(data: SubscribeCallbackData) => void; - onUpdate?:(data: NotificationSortingMap) => void; - onConnect?:() => void; - onDisconnect?:() => void; - onDestroy?:() => void; - - /** - * Callback when the Do Not Disturb setting changed. - * @syscap SystemCapability.Notification.Notification - * @since 8 - */ - onDoNotDisturbDateChange?:(mode: notification.DoNotDisturbDate) => void; - - /** - * Callback when the notificaition permission is changed. - * @syscap SystemCapability.Notification.Notification - * @since 8 - */ - onEnabledNotificationChanged?:(callbackData: EnabledNotificationCallbackData) => void; -} - -/** - * Provides methods that will be called back when the subscriber receives a new notification or - * a notification is canceled. - * - * @name SubscribeCallbackData - * @syscap SystemCapability.Notification.Notification - * @permission N/A - * @systemapi Hide this for inner system use. - * @since 7 - */ -export interface SubscribeCallbackData { - readonly request: NotificationRequest; - readonly sortingMap?: NotificationSortingMap; - readonly reason?: number; - readonly sound?: string; - readonly vibrationValues?: Array; -} - -/** - * Describes the properties of the application that the permission to send notifications has changed. - * - * @name EnabledNotificationCallbackData - * @syscap SystemCapability.Notification.Notification - * @systemapi Hide this for inner system use. - * @since 8 - */ -export interface EnabledNotificationCallbackData { - readonly bundle: string; - readonly uid: number; - readonly enable: boolean; -} +/* + * Copyright (c) 2021 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. + */ + +import { NotificationRequest } from './notificationRequest'; +import { NotificationSortingMap } from './notificationSortingMap'; +import notification from '../@ohos.notification'; + +/** + * Provides methods that will be called back when the subscriber receives a new notification or + * a notification is canceled. + * + * @name NotificationSubscriber + * @syscap SystemCapability.Notification.Notification + * @permission N/A + * @systemapi Hide this for inner system use. + * @since 7 + */ +export interface NotificationSubscriber { + onConsume?:(data: SubscribeCallbackData) => void; + onCancel?:(data: SubscribeCallbackData) => void; + onUpdate?:(data: NotificationSortingMap) => void; + onConnect?:() => void; + onDisconnect?:() => void; + onDestroy?:() => void; + + /** + * Callback when the Do Not Disturb setting changed. + * @syscap SystemCapability.Notification.Notification + * @since 8 + */ + onDoNotDisturbDateChange?:(mode: notification.DoNotDisturbDate) => void; + + /** + * Callback when the notification permission is changed. + * @syscap SystemCapability.Notification.Notification + * @since 8 + */ + onEnabledNotificationChanged?:(callbackData: EnabledNotificationCallbackData) => void; +} + +/** + * Provides methods that will be called back when the subscriber receives a new notification or + * a notification is canceled. + * + * @name SubscribeCallbackData + * @syscap SystemCapability.Notification.Notification + * @permission N/A + * @systemapi Hide this for inner system use. + * @since 7 + */ +export interface SubscribeCallbackData { + readonly request: NotificationRequest; + readonly sortingMap?: NotificationSortingMap; + readonly reason?: number; + readonly sound?: string; + readonly vibrationValues?: Array; +} + +/** + * Describes the properties of the application that the permission to send notifications has changed. + * + * @name EnabledNotificationCallbackData + * @syscap SystemCapability.Notification.Notification + * @systemapi Hide this for inner system use. + * @since 8 + */ +export interface EnabledNotificationCallbackData { + readonly bundle: string; + readonly uid: number; + readonly enable: boolean; +}